Documentation/Calc Functions/BASE

From The Document Foundation Wiki
Jump to: navigation, search


Im-jabber.svg

Under construction.
For now, see the system Help files.


Function name:

BASE

Category:

Text

Summary:

Converts a positive integer to a specified base into a text from the numbering system. The digits 0-9 and the letters A-Z are used.

Syntax:

BASE(Number; Radix; [MinimumLength])

Returns:

Arguments:

Number is the positive integer to be converted.

Radix indicates the base of the number system. It may be any positive integer between 2 and 36.

MinimumLength (optional) determines the minimum length of the character sequence that has been created. If the text is shorter than the indicated minimum length, zeros are added to the left of the string.

Additional details:

Examples:

=BASE(17;10;4) returns 0017 in the decimal system.

=BASE(17;2) returns 10001 in the binary system.

=BASE(255;16;4) returns 00FF in the hexadecimal system.

Related LibreOffice functions:

ODF standard:

Equivalent Excel functions: