How to Convert Binary to Hexadecimal
Learn how to group binary digits into sets of four to calculate hexadecimal values, with examples for standard and fractional binary inputs.
Try it: Binary to Hex mini-calculator
The 4-bit grouping method.
Hexadecimal is a base-16 number system, which means it uses 16 unique symbols (0-9 and A-F). Because 24 = 16, exactly **four binary digits** (bits) map to **one hexadecimal digit**. If you want to perform the opposite calculation, you can use our dedicated hex to binary converter.
To convert binary to hexadecimal, separate the binary string into groups of four starting from the rightmost digit. If you are grouping bits into sets of three instead of four, you can use our binary to octal converter.
Binary to hex steps by hand.
- Start with the binary number (e.g., 10110111).
- Separate the bits into groups of four, starting from the right. If the leftmost group has fewer than four bits, pad it with leading zeros:
10110111 ➔ [1011] [0111]
- Convert each 4-bit binary group into its decimal value, then map decimal values 10–15 to Hex letters A–F:
1011= 8 + 0 + 2 + 1 = 11 ➔ B0111= 0 + 4 + 2 + 1 = 7 ➔ 7
- Combine the results to get the hex representation: B7.
Fractional binary to hexadecimal.
For binary numbers containing a binary point, separate groupings in both directions starting from the decimal point. Pad rightmost bits with trailing zeros if necessary:
Frequently Asked Questions
How do you convert binary to hexadecimal? ▼
To convert binary to hexadecimal, group the binary digits into sets of four starting from the rightmost bit. Pad the leftmost group with leading zeros if it contains fewer than four bits. Next, convert each 4-bit group into its corresponding hexadecimal digit (0 to 9, A to F).
What is the hexadecimal equivalent of binary 1111? ▼
The binary number 1111 is equal to F in hexadecimal. In decimal, both equal 15.
How do you convert fractional binary to hex? ▼
For fractional numbers, split the value at the radix point. Group the integer bits to the left in sets of four (right-to-left) and pad with leading zeros if necessary. Group the fractional bits to the right in sets of four (left-to-right) and pad with trailing zeros on the far right if the final group is incomplete. Finally, translate each group into its hex digit.
Binary to Hex Table
| Bin | Hex | Bin | Hex |
|---|---|---|---|
| 0000 | 0 | 1000 | 8 |
| 0001 | 1 | 1001 | 9 |
| 0010 | 2 | 1010 | A |
| 0011 | 3 | 1011 | B |
| 0100 | 4 | 1100 | C |
| 0101 | 5 | 1101 | D |
| 0110 | 6 | 1110 | E |
| 0111 | 7 | 1111 | F |