Convert a number in a different base to a decimal number
=DECIMAL(number, radix)
| Parameter | Description |
|---|---|
number |
A text string representing a number. |
radix |
The base of the number to be converted, an integer between 2-36. |
In the hexadecimal number system, the number 255 is represented as "FF". To convert the text string "FF" to the decimal number 255, you can use the DE
=DECIMAL("FF",16) // returns 255
To convert the binary number 1101 to its decimal number equivalent, 13, use DECIMAL like this:
=DECIMAL("1101",2) // returns 13
In the example shown, the numbers in column B are in different bases, and the base is given in column C. The formula in column D5 is:
=DECIMAL(B5,C5) // returns 3
The BASE function performs the opposite conversion as the DECIMAL function:
=BASE(100,2) // returns "1100100"
=DECIMAL("1100100",2) // returns 100