Formualizer Docs
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!.
  • places must be at least the output width and at most 10, or #NUM! is returned.

Examples

Convert positive hex to binary
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
11111
Convert signed hex
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
1111111111

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

arg1

Any · Scalar

arg2

Any · Scalar

Caps

PURE

Source

On this page