HEX2BIN

Using the Excel HEX2BIN Function

Summary

The Excel HEX2BIN function converts a hexadecimal number to binary.

Syntax

=HEX2BIN (number, [places])

Syntax Breakdown

Number
Required. The number, in hexadecimal format, that you wish to convert to binary. Negative numbers are represented using two's-complement notation. If the number argument is negative, the places argument will be ignored and the function will return a 10 character binary number.

If number is positive, it cannot be greater than 1FF, and if number is negative, it cannot be smaller than FFFFFFFE00.

Places
Optional. The number of characters to be used. If omitted, the function uses the minimum number of characters necessary. If the input is not an integer, it will be truncated.


Usage Notes

HEX2BIN converts a number from hexadecimal format to its binary equivalent.

HEX2BIN Errors
The function will return an error in the following instances:

1) The #NUM! error if places is negative

2) The #VALUE! error if places in non-numeric

3) The #NUM! error if number is not a valid hexadecimal number

4) The #NUM! error if not enough places are provided

5) The #NUM! error if number is < -513 or > 511