The BIN2DEC function in Google Sheets is a valuable tool for converting a signed binary number into its corresponding decimal format. This function is particularly useful for those working with binary data or digital systems, allowing for easier calculations and data manipulation.
Syntax
BIN2DEC(value)
- value: A string or number representing a signed binary number that you wish to convert into a decimal format.
Example #1
=BIN2DEC("1101")
This function converts the binary number ‘1101’ to decimal, resulting in 13.
Example #2
=BIN2DEC("10010")
In this case, the binary ‘10010’ is transformed into decimal, yielding a result of 18.
Example #3
=BIN2DEC("11111111")
Here, converting ‘11111111’ gives a decimal result of 127, illustrating how the function interprets signed binary values.
Error handling
- VALUE!: This error appears if the input is not a valid binary number. Ensure that the input contains only 0s and 1s.
- NUM!: This indicates that the binary number is out of the valid range for conversion. The valid range is typically between -128 to 127 for signed binary numbers.