HEX2BIN (Number, DigitCount?) HEX2BIN (Number; DigitCount?)
Number
Text Text
A hexadecimal number.
DigitCount
Number Number (optional)
The number of digits to return. If omitted, the minimum number of digits necessary to accurately represent the number is used. It is ignored for negative numbers.
Returns
Text Text
A binary number.
Converts a hexadecimal number to a binary number. Negative numbers are written as ten digits in two's complement form. Also consider using the more general functions BASE and DECIMAL. Perform the reverse conversion using BIN2HEX.
Examples
HEX2BIN ("5")
HEX2BIN ("5")
Returns "101".
HEX2BIN ("5", 4)
HEX2BIN ("5"; 4)
Returns "0101".
HEX2BIN ("7B")
HEX2BIN ("7B")
Returns "1111011".
HEX2BIN ({ "5", "7B" })
HEX2BIN ({ "5"; "7B" })
Returns the array { "101", "1111011" }{ "101"; "1111011" }.
HEX2BIN ("FFFFFFFFFF")
HEX2BIN ("FFFFFFFFFF")
Returns "1111111111", -1 in two's complement form.