BIN2HEX Function
The BIN2HEX
function in Google Sheets converts a signed binary number to a hexadecimal number.
Syntax
BIN2HEX(signed_binary_number, [significant_digits])
signed_binary_number
: The binary number to be converted.significant_digits
(optional): The number of digits to return.
Examples
- Basic Conversion
To convert the binary number 1010
to hexadecimal:
=BIN2HEX("1010")
- Specifying Significant Digits
To convert 1010
to a hexadecimal with 4 significant digits:
=BIN2HEX("1010", 4)
Notes
- The
significant_digits
parameter pads the result with leading zeros if necessary. - Supports both positive and negative binary numbers.