BIN2HEX(number,places)

Number is the binary number you want to convert. Number cannot contain more than 10 characters (10 bits). The most significant bit of number is the sign bit. The remaining 9 bits are magnitude bits. Negative numbers are represented using two's-complement notation.

Places is the number of characters to use. If places is omitted, BIN2HEX uses the minimum number of characters necessary. Places is useful for padding the return value with leading 0s (zeros).

DEC2HEX(number,places)

Number is the decimal integer you want to convert. If number is negative, places is ignored and DEC2HEX returns a 10-character (40-bit) hexadecimal number in which the most significant bit is the sign bit. The remaining 39 bits are magnitude bits. Negative numbers are represented using two's-complement notation.

Places is the number of characters to use. If places is omitted, DEC2HEX uses the minimum number of characters necessary. Places is useful for padding the return value with leading 0s (zeros).

Remarks:

- If number < -549,755,813,888 or if number > 549,755,813,887, DEC2HEX returns the #NUM! error value.
- If number is nonnumeric, DEC2HEX returns the #VALUE! error value.

- If DEC2HEX requires more than places characters, it returns the #NUM! error value.
- If places is not an integer, it is truncated.
- If places is nonnumeric, DEC2HEX returns the #VALUE! error value.

- If places is negative, DEC2HEX returns the #NUM! error value.

## Like this thread? Share it with others