Binary to Hexadecimal

To convert from binary to hexadecimal we can use the properties of the numbers themselves. Consider the following table of numbers:

We can see that each hexadecimal digit maps to a unique sequence of four bits. Using this property we can convert binary to hex by:

  1. Starting from the right chopping the binary number into sets of 4 bits
  2. If there are fewer than 4 bits left pad them out with zeros at the left
  3. Convert each set of 4 bits into the appropriate hexadecimal digit

For example using the number 11001011101011:

  1. We show it as 11 / 0010 / 1110 / 1011
  2. Pad the left set as 0011
  3. Convert each set of four to give 32EB

Another example: Convert the binary number 100110101101010 to hexadecimal.

  1. Express the binary number as 100 / 1101 / 0110 / 1010.
  2. Pad the leftmost set to give 0100.
  3. Convert each set to a single hex digit giving 4D6A.

Next: Hexadecimal to Binary