
How to Convert Hex to Binary: Table, Steps & Examples
The easiest way to convert hex to binary is to replace each hexadecimal digit with its equivalent 4-bit binary value, then join the groups together. For example, hex 2F becomes binary 101111: 2 → 0010, F → 1111. This works because hexadecimal is base 16, binary is base 2, and 16 = 2⁴ — so one hex digit always represents exactly four binary bits. This guide covers the full mapping table, a repeatable step-by-step process, and several verified examples of increasing difficulty.
What Is Hexadecimal?
Hexadecimal is a base-16 number system. Where decimal has ten digit symbols (0-9), hexadecimal needs sixteen, so once it runs out of numerals after 9, it borrows six letters — A through F — to represent the remaining values:
| Hex | Decimal |
|---|---|
| 0-9 | 0-9 |
| A | 10 |
| B | 11 |
| C | 12 |
| D | 13 |
| E | 14 |
| F | 15 |
Like decimal and binary, hexadecimal is a positional number system: each digit's value depends on its position, representing a power of 16 rather than a power of 10.
What Is Binary?
Binary is a base-2 number system. It uses only two digit symbols, 0 and 1, commonly called bits. Every value a computer stores or processes is ultimately represented in binary, which is why converting other number systems — like hexadecimal — into binary is useful for reading raw bit-level data.
Why Is Hexadecimal Easy to Convert to Binary?
Hex-to-binary conversion is unusually simple compared to converting decimal to binary, and the reason comes down to one relationship: 16 = 2⁴.
One hex digit can represent 16 possible values (0 through 15). Four binary bits can represent exactly 16 possible values too (0000 through 1111). Since both ranges match exactly, every hex digit corresponds to precisely one 4-bit binary group — sometimes called a nibble — with no carrying, borrowing, or repeated division involved, just direct substitution.
Decimal doesn't have this property. Because 10 isn't a power of 2, there's no fixed number of bits that lines up evenly with a single decimal digit, which is why converting decimal to binary requires a different method (repeated division by 2) rather than simple digit substitution.
Hex to Binary Conversion Table
Each hexadecimal digit has exactly one 4-bit binary equivalent:
| Hex | Decimal | Binary |
|---|---|---|
| 0 | 0 | 0000 |
| 1 | 1 | 0001 |
| 2 | 2 | 0010 |
| 3 | 3 | 0011 |
| 4 | 4 | 0100 |
| 5 | 5 | 0101 |
| 6 | 6 | 0110 |
| 7 | 7 | 0111 |
| 8 | 8 | 1000 |
| 9 | 9 | 1001 |
| A | 10 | 1010 |
| B | 11 | 1011 |
| C | 12 | 1100 |
| D | 13 | 1101 |
| E | 14 | 1110 |
| F | 15 | 1111 |
This table is the entire method. Converting any hexadecimal number to binary just means looking up each digit here and joining the results.
How to Convert Hex to Binary Step by Step
- Write the hexadecimal number and confirm every digit is 0-9 or A-F.
- Separate the digits so each one is handled individually.
- Find the 4-bit binary equivalent for each digit using the table above.
- Join the binary groups together in the same order as the original digits.
- Remove unnecessary leading zeros from the very front of the combined result, if a normalized (shortest) binary value is wanted.
Example: Convert 2F Hex to Binary
Hex digit: 2 F
4-bit group: 0010 1111
Combine: 0010 1111
2F₁₆ = 00101111₂ (grouped)
2F₁₆ = 101111₂ (normalized)
Checking the result against decimal confirms it: 2F₁₆ = (2 × 16) + (15 × 1) = 47₁₀, and 101111₂ = 32 + 8 + 4 + 2 + 1 = 47₁₀. Both sides match.
More Hex to Binary Examples
| Hex | 4-Bit Groups | Binary (Normalized) |
|---|---|---|
| A | 1010 | 1010 |
| F | 1111 | 1111 |
| 10 | 0001 0000 | 10000 |
| 1A | 0001 1010 | 11010 |
| 3C | 0011 1100 | 111100 |
| 7B | 0111 1011 | 1111011 |
| FF | 1111 1111 | 11111111 |
| 1A3 | 0001 1010 0011 | 110100011 |
Each row was checked by converting the same hex value straight to decimal and comparing it against the decimal value of the resulting binary — for instance, hex 7B = 123 in decimal, and binary 1111011 also equals 123, confirming the conversion.
If you'd rather not do the digit-by-digit lookup by hand, the Hex to Binary Converter performs the same conversion instantly and shows the 4-bit breakdown for any hex input.
Leading Zeros: What Gets Dropped and What Doesn't
Leading zeros can be a source of confusion because the grouped form and the normalized form of the same number look different. Take hex A: its 4-bit group is 1010, and there's no leading zero to drop at all — the fixed mapping already starts with a 1.
For a multi-digit number like 2F, the grouped intermediate form is 0010 1111. The leading zeros in that very first group (from the digit 2 → 0010) aren't significant to the number's value, so they can be dropped once the groups are joined, leaving 101111. But zeros that appear in the middle or at the end of a number — like the zeros in hex 10 → 0001 0000 → 10000 — must stay, because dropping those would change the value entirely (10000 is 16, not 1).
The rule is simple: only drop leading zeros from the very front of the final combined result. Never remove zeros from the middle or the end.
Can You Convert Hex to Binary Through Decimal?
Yes. Hex → decimal → binary is a valid alternative: convert the hexadecimal number to decimal using powers of 16, then convert that decimal value to binary using repeated division by 2. It produces the same answer, but it takes two conversion steps and a decimal intermediate value instead of one direct lookup. For ordinary hex-to-binary conversion, the 4-bit mapping method above is simpler and less error-prone. If you specifically need the hex-to-decimal step explained, see How to Convert Hex to Decimal.
Why Binary and Hex Group So Cleanly
The 4-bit relationship works in both directions. Grouping a binary number into sets of 4 bits (counting from the right) and converting each group to its hex digit gives the hexadecimal equivalent directly:
| Binary | Hex |
|---|---|
| 0000 | 0 |
| 0001 | 1 |
| 0010 | 2 |
| 0011 | 3 |
| 0100 | 4 |
| 0101 | 5 |
| 0110 | 6 |
| 0111 | 7 |
| 1000 | 8 |
| 1001 | 9 |
| 1010 | A |
| 1011 | B |
| 1100 | C |
| 1101 | D |
| 1110 | E |
| 1111 | F |
This is the exact same table as the hex-to-binary table above, just read in the opposite direction — which is why the two conversions are mirror images of each other.
What Does 0x Mean Before a Hexadecimal Number?
Many programming languages and tools prefix a hexadecimal literal with 0x to mark it as hex rather than decimal — 0x2F and 2F represent the identical value. The prefix is notation, not a numeric digit: drop the 0x before applying the 4-bit mapping to the remaining characters.
Common Hex to Binary Conversion Mistakes
- Forgetting the A-F values. A hex digit like C isn't skipped or treated as a letter — it stands for decimal 12 and maps to the 4-bit group
1100. - Not using exactly 4 bits per digit. Every hex digit maps to exactly four binary bits, even ones like 1 or 2 that could technically be written with fewer bits (
1instead of0001). Skipping the padding during the digit-by-digit step misaligns every group after it. - Treating the whole hex value as decimal. Hex 10 is not "ten" in the usual sense — treating it with base-10 place values instead of base-16 gives a completely different (and wrong) result; hex 10 is decimal 16.
- Reversing the binary groups. Each 4-bit group must stay in the same left-to-right order as its source hex digit; swapping group order changes the value.
- Dropping zeros that aren't leading. Only the non-significant zeros at the very front of the combined result can be removed — zeros elsewhere in the number are significant and change the value if dropped.
- Confusing hex-to-binary with binary-to-hex. The two conversions use the same table but go in opposite directions — applying the wrong direction gives a result that looks plausible but isn't correct for the number you started with.
- Including the 0x prefix as a digit.
0x2Fhas only two hex digits, 2 and F — the0xis notation, not part of the value being converted.
Hex to Binary vs Binary to Hex
These two conversions are inverse operations that share the same 4-bit mapping table, just applied in opposite directions:
- Hex to binary: replace each hex digit with its 4-bit binary group, then join the groups.
- Binary to hex: starting from the right, group the binary digits into sets of four, then replace each group with its hex digit.
If you need to go from binary to hex, How to Convert Binary to Hex covers that direction step by step, and the Binary to Hex Converter handles it instantly.
How to Check a Hex to Binary Conversion
Two reliable ways to verify a conversion:
- Recheck each digit's group. Walk back through the hexadecimal number one digit at a time and confirm each one matches its row in the conversion table above.
- Compare decimal values. Convert both the original hex number and your binary answer to decimal — if they match, the binary conversion is correct. The Hex to Binary Converter shows the decimal and octal equivalents alongside the binary result, so you can cross-check all three at once.
Frequently Asked Questions
How do you convert hex to binary? Replace each hexadecimal digit with its 4-bit binary equivalent, then join the groups together in order. For example, hex 2F converts digit by digit: 2 → 0010, F → 1111, giving 00101111, which normalizes to 101111 in binary.
Why does each hexadecimal digit map to four binary bits? Hexadecimal is base 16, and 16 = 2⁴. One hex digit can represent 16 possible values (0-15), which is exactly the range that 4 binary bits can represent (0000-1111). Since the ranges match exactly, each hex digit maps to precisely one 4-bit binary group.
What is the hex-to-binary conversion table? 0 = 0000, 1 = 0001, 2 = 0010, 3 = 0011, 4 = 0100, 5 = 0101, 6 = 0110, 7 = 0111, 8 = 1000, 9 = 1001, A = 1010, B = 1011, C = 1100, D = 1101, E = 1110, and F = 1111. Each row shows the exact 4-bit binary group for that hex digit.
What is 2F in hexadecimal converted to binary? 2F (base 16) equals 101111 in binary: 2 → 0010, F → 1111, combined as 00101111 and normalized to 101111.
What are A through F in hexadecimal? A, B, C, D, E, and F are the six extra digit symbols hexadecimal needs beyond 0-9. They stand for decimal values 10 through 15: A=10, B=11, C=12, D=13, E=14, F=15.
Do I remove leading zeros after converting hex to binary? Only the non-significant leading zeros from the first digit's 4-bit group can be dropped from the final normalized result. Zeros inside or at the end of the number must stay, since removing those would change the value.
Can I convert hex to binary through decimal? Yes — convert hex to decimal first, then decimal to binary. It produces the same result, but for a direct hex-to-binary conversion the 4-bit mapping method is faster and doesn't require an intermediate decimal step.
What does 0x mean before a hexadecimal number? 0x is a prefix many programming languages use to mark a literal as hexadecimal rather than decimal, so 0x2F and 2F represent the same value. The 0x itself isn't part of the number — drop it before converting the remaining digits.
Try Our Free SEO Tools
Put what you learned into action with our free SEO analysis tools.