ReferenceFunctionsEngineering Functions
HEX2BIN
HEX2BIN: Converts a hexadecimal text value to binary text.
Summary
Supports optional left-padding through the places argument.
Remarks
- Input must be hexadecimal text up to 10 characters and may be signed two's-complement.
- The converted decimal value must be in
[-512, 511], or the function returns#NUM!. placesmust be at least the output width and at most10, or#NUM!is returned.
Examples
Convert positive hex to binary
Grid
| Cell | Value | |
|---|---|---|
| No inputs on Sheet1. | ||
Formula
=
Result
Not evaluated yet.
Expected
11111
Convert signed hex
Grid
| Cell | Value | |
|---|---|---|
| No inputs on Sheet1. | ||
Formula
=
Result
Not evaluated yet.
Expected
1111111111
Related functions
FAQ
Why can valid hex text still produce #NUM! in HEX2BIN?
After conversion, the decimal value must fit [-512, 511]; otherwise binary output is rejected.
Runtime metadata
Category
Engineering
Signature
HEX2BIN(arg1: Any, arg2…: Any)Arity
min 1, max variadic
Arguments
arg1Any · Scalar
arg2Any · Scalar
Caps
PURE
Source