BIN2HEX

  • Updated

Converts a binary number to hexadecimal.

Sample Usage

BIN2HEX(101)
BIN2HEX(C5)

Syntax

BIN2HEX(number, [places])

  • number - The binary number to be converted.
  • places - [OPTIONAL] The number of places in the output.

Examples

BIN2HEX(1100) returns a value of c.
BIN2HEX(1100,3) returns a value of 00c.
BIN2HEX(C5) converts the binary number contained in C5 to hexadecimal.

Notes

  • If number is negative, the value of places is ignored and BIN2HEX returns a 10-character hexadecimal number. 
  • number cannot contain more than 10 characters.
  • If number is not a valid binary number, BIN2HEX returns the #NUM! error value.
  • If places is not an integer, it is truncated.
  • If places is non-numeric, BIN2HEX returns the #VALUE! error value.
  • If places is negative, BIN2HEX returns the #NUM! error value.
  • If the number of digits required is greater than the specified places, the #NUM! error is returned.