# HEX2BIN Function

> Convert a hexadecimal number to binary with HEX2BIN in TX Sheet Control: two's complement for negative numbers, the valid range, places and #NUM! errors.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > Formula Functions > HEX2BIN Function
- **210 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/hex2bin/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/hex2bin/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/hex2bin/llms-full.txt

---

Convert a hexadecimal number to binary. `number` is the hexadecimal number of up to 10 characters, in which a value from FFFFFFFE00 to FFFFFFFFFF is negative in two's complement; the valid range is FFFFFFFE00 to 1FF. `places` pads the result with leading zeros. A number out of range, an invalid hexadecimal number or too few `places` returns `#NUM!`.

### Syntax

```text
HEX2BIN(number, places)
```

Category: Engineering. Minimum arguments: 1. Maximum arguments: 2.

Available for supported offline calculation.

### Examples

```text
=HEX2BIN(10)
```

The formula returns the text 10000, the binary form of 16.

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

### See Also

- [Formulas](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formulas/llms-full.txt)
- [Custom Functions and Formula Data](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/custom-functions/llms-full.txt)

---

## Nearby

- **Previous:** [HARMEAN Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/harmean/llms-full.txt)
- **Next:** [HEX2DEC Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/hex2dec/llms-full.txt)
