Zoho Sheet HEX2BIN Function: Hexadecimal to Binary with Examples
Convert hexadecimal values to binary in Zoho Sheet with exact datasets, place-value checks, documented limits and practical examples.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
HEX2BIN converts a hexadecimal representation into binary. For the positive integer 42, the source numeral is 2A and the converted result is 101010. The base changes; the represented quantity does not. Use a width argument when a receiving report needs leading zeroes.
Syntax and availability
HEX2BIN(hexadecimal_number; [num_of_digits])
Zoho’s official HEX2BIN entry was checked on October 15, 2026. It describes the rolling web service. The first supported release and last functioning version are unknown; current documentation is separate from those historical endpoints. Mobile/offline parity is unverified. Results below are independent integer calculations, not native Zoho execution.
The required source contains at most ten characters, using only 0–9 and A–F. Hexadecimal input is documented as case-insensitive: A and a have the same meaning. Quote literal hexadecimal strings, for example “FF”. The checked entry does not fully specify signed interpretation of maximum-width values; these examples use small positive values and make no unsigned or two’s-complement promise at that boundary.
The second argument chooses the output width. When the representation is shorter, Zoho pads its left side with zeroes; an insufficient width is an error, not permission to cut off significant digits. Use positive integer widths here. Fractional widths, blank inputs and Boolean coercion are not verified.
Square brackets mark an optional argument and are not typed into a formula. Omitting width gives the unpadded representation in the ordinary positive examples. Follow your workbook’s locale separator; these formulas use semicolons.
Visible official control
Zoho explicitly gives =HEX2BIN("FF";12) with result 000011111111. That is direct evidence for a twelve-character output in this product; do not import another application’s ten-place restriction. Other vendor examples refer to cells whose inputs are not visible in the extracted help; the complete worksheet below supplies its own inputs rather than inventing those hidden cells.
Complete reproducible worksheet
Create Conversions with Source in A1, Decimal_check in B1, Converted in C1, and Padded in D1. Enter the following values in A2:B7. Set column A to text before entering hexadecimal strings so digit-looking codes remain source text; do not include the display quotes in the cell contents. Column B is an independent explanatory value, not an argument to the conversion formula.
| Row | A: source | B: decimal check | C: expected | D: expected width 8 |
|---|---|---|---|---|
| 2 | 1 | 1 | 1 | 00000001 |
| 3 | 7 | 7 | 111 | 00000111 |
| 4 | F | 15 | 1111 | 00001111 |
| 5 | 2A | 42 | 101010 | 00101010 |
| 6 | 3F | 63 | 111111 | 00111111 |
| 7 | FF | 255 | 11111111 | 11111111 |
Enter C2 =HEX2BIN(A2) and fill through C7.
Fill D2 =HEX2BIN(A2;8) through D7. The zeroes in D belong to the representation, not to a larger numeric value.
In a copy change A5 from 2A to 2B and update its explanatory B5 to 43. C5 becomes 101011 and D5 becomes 00101011. Other records remain unchanged. This gives a one-unit sensitivity check with a fully specified input.
Advanced: unpack an eight-bit diagnostic word
Put the text A5 in G2 and =HEX2BIN(G2;8) in H2. The expected bit sequence is 10100101. The hexadecimal A becomes 1010 and the 5 becomes 0101; the combined decimal value is 128+32+4+1=165.
Create a second control with A4 in G3. H3 =HEX2BIN(G3;8) becomes 10100100. The only changed position is the lowest bit. If the bit sequence is shown without its leading zero positions, a reader may misalign fields, so specify the exact eight-character presentation width for this report.
Zoho also documents a twelve-character example, but a twelve-character output is not automatically a valid input for a function limited to ten input characters. Keep an eight-character field for the byte audit and use a separate twelve-character field only when the receiving display explicitly needs it. Bit order and signedness are separate protocol decisions; this example specifies positive byte values and does not infer either from the function name.
Errors and troubleshooting
The documented #NUM! cases include an output that needs more places than the requested width, and width zero or negative. For example, =HEX2BIN("FF";1) cannot hold 11111111 in one position. Increasing the width preserves the whole representation; shortening the source value would change the data.
An invalid source digit also produces the documented #NUM! error; HEX2BIN("G") is an invalid-digit control. Do not remove an error merely to make a report appear complete: retain the raw value and investigate the format or width rule.
The shared help glossary mentions name, type and reference errors without defining a complete coercion matrix for this function. Check the source base, legal characters, cell type and literal quotation before investigating more complex formulas. Do not add 0x, 0b or other programming-language prefixes unless a product reference explicitly permits them.
Keep conversion and arithmetic separate. A nondecimal display can look like a decimal number, yet ordinary subtraction on that display need not measure the intended change. Preserve raw identifiers, document the source’s sign and width convention, and verify exported leading zeroes in the receiving system. Matching function names across spreadsheet products do not establish identical limits or behavior.