
How to Convert Binary to Hex: Table, Steps & Examples
To convert binary to hexadecimal, split the binary number into groups of four bits starting from the right, pad the leftmost group with leading zeros if it's short, convert each 4-bit group to its hexadecimal equivalent, and join the results. For example, binary 101111 groups into 0010 and 1111, which convert to 2 and F — so 101111₂ = 2F₁₆. This guide covers the full mapping table, a repeatable step-by-step process, and several verified examples of increasing difficulty.
What Is Binary?
Binary is a base-2 number system. It uses only two digit symbols, 0 and 1, commonly called bits. Computers store and process every value in binary at the hardware level, which is why binary numbers are often converted into a more compact notation — like hexadecimal — for people to read and write.
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 — for the remaining values:
| Hex | Decimal |
|---|---|
| 0-9 | 0-9 |
| A | 10 |
| B | 11 |
| C | 12 |
| D | 13 |
| E | 14 |
| F | 15 |
Like binary and decimal, 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.
Why Binary Converts Easily to Hexadecimal
Binary-to-hex conversion is far simpler than converting binary to decimal, and the reason comes down to one relationship: 16 = 2⁴.
Four binary bits can represent exactly 16 possible values (0000 through 1111). One hex digit can represent exactly 16 possible values too (0 through 15). Because both ranges match exactly, every group of four bits — sometimes called a nibble — corresponds to precisely one hex digit, with no carrying, borrowing, or repeated division involved. It's direct substitution, just like hex-to-binary conversion in reverse.
Decimal doesn't share this property. Because 10 isn't a power of 2, there's no fixed number of bits that lines up evenly with a decimal digit, which is why converting binary to decimal requires positional-value math instead of simple grouping.
Binary to Hex Conversion Table
Each 4-bit binary group has exactly one hexadecimal equivalent:
| Binary | Decimal | Hex |
|---|---|---|
| 0000 | 0 | 0 |
| 0001 | 1 | 1 |
| 0010 | 2 | 2 |
| 0011 | 3 | 3 |
| 0100 | 4 | 4 |
| 0101 | 5 | 5 |
| 0110 | 6 | 6 |
| 0111 | 7 | 7 |
| 1000 | 8 | 8 |
| 1001 | 9 | 9 |
| 1010 | 10 | A |
| 1011 | 11 | B |
| 1100 | 12 | C |
| 1101 | 13 | D |
| 1110 | 14 | E |
| 1111 | 15 | F |
This table is the entire method. Converting any binary number to hex just means grouping its bits into sets of four and looking up each group here.
How to Convert Binary to Hex Step by Step
- Start at the right side of the binary number.
- Separate the bits into groups of four, working right to left.
- Pad the leftmost group with leading zeros if it ends up with fewer than four bits.
- Convert each 4-bit group to its hex digit using the table above.
- Join the resulting hex digits in the same order as their groups.
Grouping starts from the right because place value in binary — like in any positional number system — increases from right to left. Starting the grouping at the right guarantees each 4-bit group lines up with a consistent power-of-16 boundary; starting from the left would misalign every group except by coincidence.
Example: Convert 101111 Binary to Hex
101111 (group into 4-bit chunks from the right)
10 1111
Pad the leftmost group: 0010 1111
0010 = 2
1111 = F
101111₂ = 2F₁₆
Checking the result against decimal confirms it: 101111₂ = 32 + 8 + 4 + 2 + 1 = 47₁₀, and 2F₁₆ = (2 × 16) + (15 × 1) = 47₁₀. Both sides match.
More Binary to Hex Examples
| Binary | 4-Bit Groups | Hex |
|---|---|---|
| 1010 | 1010 | A |
| 11010 | 0001 1010 | 1A |
| 111100 | 0011 1100 | 3C |
| 10101010 | 1010 1010 | AA |
| 101101001 | 0001 0110 1001 | 169 |
Each row was checked by converting the same binary value straight to decimal and comparing it against the decimal value of the resulting hex — for instance, binary 10101010 = 170 in decimal, and hex AA also equals 170, confirming the conversion.
If you'd rather not do the grouping by hand, the Binary to Hex Converter performs the same conversion instantly and shows the 4-bit breakdown for any binary input.
Grouping From the Right: Why It Matters
Grouping from the wrong side is one of the most common binary-to-hex mistakes, because an incomplete final group changes the answer. Take binary 101101:
Correct (group from the right):
10 1101 → pad → 0010 1101
0010 = 2, 1101 = D
101101₂ = 2D₁₆ (= 45 in decimal)
Incorrect (group from the left):
1011 01 → pad the wrong group → 1011 0100
1011 = B, 0100 = 4
Gives B4₁₆ (= 180 in decimal) — wrong
Grouping from the left shifts every bit's place value, producing a completely different — and incorrect — result. Always start counting groups of four from the rightmost bit.
Leading Zeros: Padding the Leftmost Group
If the leftmost group ends up with fewer than four bits, add zeros to its left to complete it. For example, binary 101 has only three bits, so it becomes 0101 before conversion — still four bits, still the same value, now ready to map directly to hex 5.
Padding zeros added to the front of the leftmost group never change the number's value. What you must never do is add or remove zeros from the middle or the end of the binary number — those zeros are significant. Binary 10000 (16 in decimal) is not the same as 1 (1 in decimal), even though dropping the trailing zeros might look like a shortcut.
Hexadecimal A Through F
Hexadecimal needs six symbols beyond 0-9 because a single hex digit must represent sixteen possible values, and the ordinary decimal digits only go up to nine:
- A = 10
- B = 11
- C = 12
- D = 13
- E = 14
- F = 15
For example, binary 1111 equals decimal 15, which is hex F. Any 4-bit group with a decimal value of 10 or higher always converts to one of these six letters, never a two-digit number — hex digits are always single characters.
Can You Convert Binary to Hex Through Decimal?
Yes. Binary → decimal → hex is a valid alternative: convert the binary number to decimal using positional powers of 2, then convert that decimal value to hex using repeated division by 16. It produces the same answer, but it takes two conversion steps and a decimal intermediate value instead of one direct lookup. For ordinary binary-to-hex conversion, the 4-bit grouping method above is simpler and less error-prone, precisely because 16 is a power of 2 and decimal isn't. If you specifically need the binary-to-decimal step explained, see How to Convert Binary to Decimal. This 4-bit grouping is also the second half of converting octal to hexadecimal, which starts by turning octal digits into binary — see How to Convert Octal to Hexadecimal for the full method.
Binary to Hex vs Hex to Binary
These two conversions are inverse operations that share the same 4-bit mapping table, just applied in opposite directions:
- Binary to hex: starting from the right, group the binary digits into sets of four, then replace each group with its hex digit.
- Hex to binary: replace each hex digit with its 4-bit binary group, then join the groups.
If you need to go the other way, How to Convert Hex to Binary covers that direction step by step, and the Hex to Binary Converter handles it instantly.
Common Binary to Hex Mistakes
- Grouping from the wrong side. Groups of four must be counted starting from the rightmost bit — grouping from the left misaligns every group and produces a wrong result (see the 101101 example above).
- Forgetting to pad the leftmost group. An incomplete 4-bit group must be padded with leading zeros before converting it; treating a 2-bit or 3-bit remainder as its own value skips digits it doesn't have.
- Padding on the wrong side. Padding zeros always go on the left of the leftmost group, never the right — padding on the right changes which power of 2 each bit represents.
- Using groups of three instead of four. Groups of three bits map to octal, not hex. Binary-to-octal and binary-to-hex use different group sizes and different lookup tables.
- Confusing the A-F values. Each letter stands for one specific decimal value (A=10 through F=15) — mixing them up produces a hex digit that doesn't match the source bits.
- Dropping zeros that aren't leading. Only non-significant zeros at the very front of the number can be removed; zeros in the middle or at the end of a binary number are significant and change the value if dropped.
- Converting each bit individually instead of each 4-bit group. A single 0 or 1 isn't a hex digit on its own — the conversion always operates on complete 4-bit groups.
How to Check Your Answer
Two reliable ways to verify a binary-to-hex conversion by hand:
- Recheck each group. Walk back through the binary number one 4-bit group at a time and confirm each one matches its row in the conversion table above.
- Compare decimal values. Convert both the original binary number and your hex answer to decimal — if they match, the conversion is correct, the same way the 101111 → 2F example was checked above.
Once you've worked through a conversion manually, the Binary to Hex Converter is a fast way to confirm the result and see the 4-bit breakdown for any binary input, including much longer values than are practical to group by hand.
Frequently Asked Questions
How do you convert binary to hex? Group the binary digits into sets of four starting from the right, padding the leftmost group with zeros if it has fewer than four digits, then convert each 4-bit group to its hex digit and join the results. For example, binary 101111 groups into 10 and 1111, pads to 0010 and 1111, and converts to hex 2F.
Why does every hexadecimal digit correspond to four binary bits? Hexadecimal is base 16, and 16 = 2⁴. Four binary bits can represent exactly 16 possible values (0000 through 1111), which is exactly the range one hex digit covers (0 through 15). Since the ranges match exactly, every 4-bit group maps to precisely one hex digit.
What is the binary-to-hex conversion table? 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, and 1111 = F. Each row shows the hex digit for that 4-bit binary group.
What is 101111 in binary converted to hexadecimal? 101111 in binary equals 2F in hexadecimal. Grouped from the right it splits into 10 and 1111, and padding the leftmost group gives 0010 and 1111 — which convert to 2 and F.
What do A, B, C, D, E, and F mean in hexadecimal? They are the six extra digit symbols hexadecimal needs beyond 0-9, standing for decimal values 10 through 15: A=10, B=11, C=12, D=13, E=14, F=15.
What if the binary number doesn't divide evenly into groups of four? Pad the leftmost group with leading zeros until every group has exactly four bits. The padding doesn't change the number's value — for example, binary 101 becomes 0101 before conversion, which is still hex 5.
Can you convert binary to hex through decimal? Yes — convert the binary number to decimal first, then convert that decimal value to hex. It produces the same result, but the direct 4-bit grouping method is faster since it skips the decimal step entirely.
Is binary base 2 and hexadecimal base 16? Yes. Binary uses only two digit symbols, 0 and 1, while hexadecimal uses sixteen, 0-9 and A-F. That difference in base is exactly why one hexadecimal digit can carry the same information as four binary digits.
Try Our Free SEO Tools
Put what you learned into action with our free SEO analysis tools.