Converts a Binary number as text to a Hex number as text.

**bin2hex**( *value*, [*place*] )

*value*: (Text) Binary value as text to convert, such as `1100100`

.

*place*: (Number) The number of places to return.

Text

Invalid digits for a *value* parameter, including signs, are ignored.

The default value for *place* is however many places are necessary to represent the number.

You can experiment with this function in the test box below.

Test Input

`bin2hex(1100100)`

returns `64`

Open in Github

On This Page