Binary to Hex Converter

2
16
10

How to convert Binary to Hex?

To convert binary to hexadecimal (base 16), you use a method similar to the octal conversion, but instead of groups of three, you use groups of four binary digits. This is because $16 = 2^4$.

Step-by-Step Method

  1. Group: Starting from the rightmost digit, divide the binary number into groups of four.
  2. Pad: If the leftmost group has fewer than four digits, add leading zeros to make it a full set of four.
  3. Translate: Convert each 4-bit group into its equivalent hexadecimal digit ($0–9$ and $A–F$).
  4. Combine: Join the hex digits together.

Hexadecimal Conversion Table

Binary (4-bit) Hex Digit Binary (4-bit) Hex Digit
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

Example: Convert $11010110_2$ to Hex

  • Step 1 & 2 (Group and Pad):

    $(1101) (0110)$

    (No padding required here as both groups already have four digits.)

  • Step 3 (Translate):

    • $1101 = D$

    • $0110 = 6$

  • Step 4 (Combine):

    $D6_{16}$

Therefore, $11010110_2 = D6_{16}$.