Converts a binary number to its corresponding hexadecimal representation.
Syntax:
BIN2HEX( number {, places:Number} )
number may be a string, or a number, of up to ten binary digits.
Two's complement representation is used: the highest (tenth) bit is the sign bit of the binary number and the highest (fortieth) bit is the sign bit of the hexadecimal result.
If specified, places must be in the range 1..10. If places is omitted, the minimum appropriate number of digits is returned.
Examples:
BIN2HEX("01000000", 4)
returns the text string "0040"
.
BIN2HEX("1111111111")
returns the text string "FFFFFFFFFF"
.
Revisions:
This function was added in Fireworkz 2.24.