This function converts a binary number into a hexadecimal number.
Syntax
BIN2HEX(number; [places])
Arguments
- number(required) – The binary number to be converted:
- Maximum of 10 digits
- Uses two’s complement notation (see « Two’s Complement » section)
- Negative values return a 10-digit hexadecimal number
- places(optional) – Specifies the number of digits to display:
- Adds leading zeros if needed
- If omitted, displays only necessary digits
- Decimal places are ignored
Background
For comprehensive information about number systems and conversion methods, refer to the « Number Systems » section in the function introduction.
Examples
The following examples demonstrate the BIN2HEX() function:
- =BIN2HEX(000000001)returns 1
- =BIN2HEX(1110,4)returns 000E
- =BIN2HEX(000001010)returns 0A

Additional Resources
More examples can be found in the BIN2DEC() function documentation.
Key Features
- Handles both positive and negative binary numbers
- Optional places parameter for formatting
- Automatic sign detection through two’s complement
- 10-digit binary input limit
- Returns full 10-digit hex for negative numbers regardless of places parameter