# HEX2BIN

The `HEX2BIN` function is an Engineering function that converts a signed hexadecimal number to a signed binary number. It returns a text string and is commonly used in computer science and engineering fields.

## Usage

Use the `HEX2BIN` formula with the syntax shown below, it has 1 required parameter and 1 optional parameter:

Parameters:
The signed hexadecimal number to be converted.
2. significant_digits (optional):
An optional parameter specifying the number of significant digits to return in the binary number. If omitted, the function will return the full binary number.

## Examples

Here are a few example use cases that explain how to use the `HEX2BIN` formula in Google Sheets.

### Converting hexadecimal numbers to binary

The `HEX2BIN` function can be used to quickly convert hexadecimal numbers to binary numbers in engineering and computer science fields.

### Working with signed binary numbers

The `HEX2BIN` function can be used to convert signed hexadecimal numbers to signed binary numbers, which is useful in many engineering applications.

## Common Mistakes

`HEX2BIN` not working? Here are some common mistakes people make when using the `HEX2BIN` Google Sheets Formula:

### Incorrect input format

The signed_hexadecimal_number argument should be a signed hexadecimal number, with a maximum of 10 characters (40 bits). If the input is not in the correct format, the formula will return an error.

### Missing argument

The HEX2BIN formula requires at least one argument, the signed_hexadecimal_number. If the significant_digits argument is not provided, the formula will use the default value of 10 significant digits.

### Invalid significant_digits argument

The significant_digits argument should be a positive integer between 1 and 10. If the argument is not a valid integer or is outside of this range, the formula will return an error.

### Incorrect output format

The HEX2BIN formula returns a binary number as a text string. If the cell format is not set to text, the formula result may be displayed as a number in scientific notation or as a date.

### Unsupported input

The HEX2BIN formula only supports signed hexadecimal numbers. If the input is not a signed hexadecimal number, the formula will return an error.

The following functions are similar to `HEX2BIN` or are often used with it in a formula:

• `BIN2HEX`

The `BIN2HEX` function converts a signed binary number to hexadecimal format. This function is commonly used in engineering and scientific fields where binary numbers are used to represent data. The output of this function is a text string in hexadecimal format.

• `HEX2DEC`

The `HEX2DEC` function converts a signed hexadecimal number to its decimal equivalent. This function is commonly used in engineering calculations where hexadecimal numbers are used to represent signed values.

• `DEC2HEX`

The `DEC2HEX` formula is an engineering formula in Google Sheets that converts a decimal number to its hexadecimal equivalent. It is commonly used to convert numbers to a format that is easier to read and work with in certain applications.

You can learn more about the `HEX2BIN` Google Sheets function on Google Support.