# BASE

The BASE function converts a number to a text representation in a specified base (radix), incorporating the characters 0-9 and A-Z (up to base 36). It provides a means to represent numbers in non-decimal bases, such as binary, octal, or hexadecimal.

## Syntax

=BASE(`Number`

, `Radix`

, `[Min length]`

)

`Number` | The number to be converted to a different base. |

`Radix` | The base to use for the conversion. It is an integer between 2 and 36. |

`Min length` (Optional) | The minimum length of the output. It prefixes the result with 0s to reach the desired length if necessary. |

## About BASE

With the BASE function in Excel, you have the functionality to transform numeric values into alternate base systems, offering flexibility in displaying numerical data beyond the conventional decimal format. Whether converting to binary (base 2), octal (base 8), hexadecimal (base 16), or any other base up to 36, BASE can cater to diverse numerical representation needs in both practical and educational contexts. By designating the desired base and adjusting optional parameters, you can generate text representations tailored to your specific requirements. This feature holds relevance in computer science, mathematics, and related fields where understanding and manipulation of different base systems are pertinent to the task at hand. Through BASE, Excel empowers users to seamlessly navigate between numerical bases, enriching their analytical and problem-solving capabilities with a versatile tool at their disposal.

## Examples

To convert the decimal number 123 to binary (base 2), use the formula: =BASE(123, 2) This will yield the result: 1111011

To convert the decimal number 255 to hexadecimal (base 16) with a minimum output length of 4, use the formula: =BASE(255, 16, 4) This will produce the result: 00FF

## Notes

The BASE function accepts positive and negative integers as well as floating-point numbers as its input. It is essential to ensure that the radix provided falls within the valid range of 2 to 36. Additionally, the Min length parameter, if utilized, modifies the output by padding zeroes at the beginning to achieve the specified minimum length.

## Questions

**What numerical bases can the BASE function handle?**

The BASE function can handle numerical bases ranging from 2 to 36, inclusive. It translates the provided number into a text representation using the characters 0-9 and A-Z for bases exceeding 10.

**Can the BASE function convert negative numbers?**

Yes, the BASE function can convert both positive and negative numbers into their corresponding representations in the specified base.

**How does the Min length parameter affect the output of the BASE function?**

The Min length parameter, if specified, prefixes the result with 0s to attain the desired minimum length. This can be useful for ensuring consistent output formats, especially when working with fixed-length representations in numerical systems.