# BASE function

**BASE**(number, radix, minimumLength?)

**BASE**(number; radix; minimumLength?)

## number

The number to convert.

## radix

The desired base (radix). Must be between 2 and 36 (inclusive).

## minimumLength

The minimum length of the returned string; it is padded with zeroes if necessary. If omitted, it is assumed to be 0, meaning that there is no length preference. If the minimum length is not 0, it must be a positive number.

## Returns

A text representation of a converted number.

Returns a text representation of a number converted to a certain base (radix). BASE(9, 2)BASE(9; 2) returns "1001", which is the base 2 representation of 9 (8 * 1 + 4 * 0 + 2 * 0 + 1 * 18 * 1 + 4 * 0 + 2 * 0 + 1 * 1).

In most contexts, numbers use base 10, but other popular bases in engineering contexts include base 2 (binary), base 8 (octal) and base 16 (hexadecimal).

Use the DECIMAL function to convert a number in a different base to its base 10 representation. Also consider using the more specialized DEC2BIN, DEC2OCT and DEC2HEX functions.

## Examples

Returns "1001", which is the binary representation of 9.

Returns "111", which is the binary representation of 7.

Returns "1101", which is the binary representation of 13.

Returns "15", which is the octal representation of 13.

Returns "D", which is the hexadecimal representation of 13.

Returns the array { "1101", "15", "D" }{ "1101"; "15"; "D" }, containing the binary, octal and hexadecimal representation of 13, in that order.