# Excel BASE function

## Summary

The Excel BASE function is used to convert a number from decimal to another base (binary, octal, or any base up to 36). This function is especially useful in computer science and engineering fields, where data representation in different bases is a common requirement.
##### Syntax
```				```
```
```
• number: The decimal number you want to convert.
• radix: The base to convert to (between 2 and 36).
• [min_length]: [Optional] The minimum length of the returned string. If the converted number is shorter than this length, zeros are added to the left to reach the desired length.
##### Return value
A text representation of the number in the specified base.

## How to use

Use BASE to convert a decimal number to a specified base. Provide the decimal number as the first argument, the target base as the second, and optionally specify the minimum length for the resulting string.

## Examples

##### Simple BASE
Converting Decimal to Binary: To convert a decimal number to binary:
```				```
=BASE(15, 2)
```
```
This formula converts the decimal number 15 to binary, returning “1111”.
##### BASE to Octal
Decimal to Octal Conversion: To convert a decimal number to octal:
```				```
=BASE(123, 8)
```
```
Converts the decimal number 123 to octal, resulting in “173”.
##### BASE with Minimum Length
Specifying Minimum Length in Conversion: To convert a decimal number to binary with a minimum length:
```				```
=BASE(5, 2, 5)
```
```
Converts the decimal number 5 to binary with a minimum length of 5 digits, resulting in “00101”.
```				```
=BASE(255, 16)
```
```
Converts 255 to hexadecimal, yielding “FF”.
##### BASE in Data Analysis
Using BASE in Data Analysis: To represent decimal data in a different base for analysis:
```				```
=BASE(A2, 2, 8)
```
```
This converts the decimal number in cell A2 to an 8-digit binary number, adding zeros to the left if necessary.