conversion
Binary to Hexadecimal Converter
Convert binary to hex using the 4-bit nibble grouping shortcut. Each group of 4 bits equals one hex digit.
Click to show tips
Try an Example
Pick a scenario to see how the calculator works, then adjust the values
ASCII Letter A
Convert the ASCII code for uppercase A (65) across all bases.
Key values: Decimal 65 · Binary 1000001 · Hex 41
Byte Maximum
The largest value a single byte can hold (255).
Key values: Decimal 255 · Binary 11111111 · Hex FF
Hex Color Code
Convert a common hex color code (deep sky blue) to other bases.
Key values: Hex 00BFFF · Decimal 49151 · Binary nibbles
The 4-Bit Grouping Trick
Since , every group of 4 binary digits maps to exactly one hex digit. This makes conversion a simple lookup:
- Pad the binary number with leading zeros so its length is a multiple of 4.
- Split into groups of 4 from the right.
- Convert each group using the table below.
Example
Convert 110101011 (9 bits):
- Pad to 12 bits:
000110101011 - Group:
0001 | 1010 | 1011 - Look up:
1|A|B - Result:
1AB
Nibble-to-Hex Lookup Table
| Binary | Hex | Dec | Binary | Hex | Dec | |
|---|---|---|---|---|---|---|
0000 | 0 | 0 | 1000 | 8 | 8 | |
0001 | 1 | 1 | 1001 | 9 | 9 | |
0010 | 2 | 2 | 1010 | A | 10 | |
0011 | 3 | 3 | 1011 | B | 11 | |
0100 | 4 | 4 | 1100 | C | 12 | |
0101 | 5 | 5 | 1101 | D | 13 | |
0110 | 6 | 6 | 1110 | E | 14 | |
0111 | 7 | 7 | 1111 | F | 15 |
Hex to Binary (Reverse)
The conversion works in reverse just as easily — expand each hex digit into its 4-bit binary equivalent:
0xFF→1111 11110x3C→0011 11000xDEAD→1101 1110 1010 1101
Why Use Hex Instead of Binary?
Compactness. A 32-bit value like 11011110101011011011111011101111 is nearly unreadable, but its hex equivalent DEADBEEF is just 8 characters. Since the conversion is trivial (each hex digit = 4 bits), programmers use hex as a human-friendly shorthand for binary data: memory dumps, color codes, MAC addresses, and cryptographic hashes.
Frequently Asked Questions
How do you convert binary to hexadecimal?
Group the binary digits into sets of 4 from right to left, padding with leading zeros if needed. Then convert each 4-bit group to its hex digit using a lookup table. For example, 110101011 becomes 0001 1010 1011, which gives 1AB.
Why does the 4-bit grouping trick work?
Because , each hex digit represents exactly 4 binary digits. This perfect power-of-2 relationship means binary-to-hex conversion is a simple digit-by-digit substitution, not a division algorithm.
How do you convert hex back to binary?
Expand each hex digit into its 4-bit binary equivalent. For example, 0xFF becomes 1111 1111, 0x3C becomes 0011 1100, and 0xDEAD becomes 1101 1110 1010 1101.
Why do programmers use hex instead of writing binary directly?
Compactness. A 32-bit binary value like 11011110101011011011111011101111 is nearly unreadable, but its hex equivalent DEADBEEF is just 8 characters. Since conversion is trivial, hex serves as a human-friendly shorthand for binary.
What is the nibble-to-hex lookup table?
The 16 nibble values map as follows: 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.
Related conversion Variants
Explore more conversion options
Binary to Decimal
Binary to Decimal Converter
Decimal to Binary
Decimal to Binary Converter
Hex to Decimal
Hex to Decimal Converter
Decimal to Hex
Decimal to Hexadecimal Converter
Octal to Decimal
Octal to Decimal Converter
More Math Calculators
Explore the category