Description Converts a binary number (base 2) to a hexadecimal number (base 16).
Syntax BIN2HEX ( binary_number [, places])
Argument | Description |
---|---|
binary_number | Any number expressed in the binary number system (represented by the digits 1 or 0).Data may be entered in text or numerical form. A maximum of 9 value bits (or digits) is allowed in representing positive values. To represent negative values, enter exactly 10 digits--the first digit must be a 1. Positive values may be zero-padded on the left up to a maximum of 10 digits. |
places | Optional number of characters to use in the output. If places is omitted, the function returns the number of spaces required to display the result. The places argument can be used to 0-pad a positive number.If the number is negative, places is ignored and 10 characters are returned. |
Remarks Note that the result of this function is a text string.
Examples This function returns 3F:
BIN2HEX(111111)
This function returns FF:
BIN2HEX(11111111)
See Also BIN2DEC, BIN2OCT, DEC2BIN, DEC2HEX, DEC2OCT, HEX2BIN, HEX2DEC, HEX2OCT, OCT2BIN, OCT2DEC, OCT2HEX