Converts a number into a text representation in another base, for example, base 2 for binary. Learn more.
In Google Sheets, BASE is a function that converts a decimal number to a number of a specified base. The function takes two or three arguments:
value: This is the decimal number that you want to convert to a number of the specified base. base: This is the base that you want to use for the conversion. The base can be any integer between 2 and 36, inclusive. [min_length]: This is an optional argument that specifies the minimum length of the resulting number.
If the converted number is shorter than the specified minimum length, the function pads the number with zeros to the left to make it the desired length.
The BASE function can be useful in various scenarios, such as when you want to convert decimal numbers to binary, octal, or hexadecimal numbers for programming or when you want to convert decimal numbers to other number systems used in mathematics or engineering.
For example, if you want to convert the decimal number 123 to a binary number with a minimum length of 8 digits, you can use the BASE function like this:
=BASE(123, 2, 8)
The resulting binary number would be "01111011".