Hexadecimal to binary conversion

Converting hexadecimal into binary is very simple. All we need is to remember that hexadecimal is a base 16 number.  This means that each number column can contain 16 characters.  Hexadecimal goes from 0 to F:

Decimal NumberBinary NumberHexadecimal Number
000000
100011
200102
300113
401004
501015
601106
701117
810008
910019
101010A
111011B
121100C
131101D
141110E
151111F

EG

Using the table – 7 in hex is 0111 in binary.

Using the table – A in hex is 1010 in binary.


Without the table for reference we can also convert the hexadecimal into decimal then convert into binary

EG

B in hexadecimal = 11 in decimal

Create a table with the numbers 8, 4, 2, 1 in the upper columns.

8421

Starting at the left hand side, try to subtract the number you have (11 in our case) from the number in the top column – 11 – 8 = 3. Because we can do this we put a 1 in the lower column and move our remainder to the next column.

8421
1

In the next column we ask if we can subtract 4 from 3. We can’t because this would leave a negative number, so we put a 0 underneath the 4 and carry the 3 over to the next column.

8421
10

In the next column we ask if 2 can be subtracted 3 without leaving a negative value. It can (3-2 = 1) so we put a 1 value under the 2 column and carry our remainder over to the last column.

8421
101

In the last column we ask if 1 can be subtracted from 1 without leaving a negative value. It can (1-1=0) so we put a 1 value under the 1 column and our calculation ends because we are left at 0.

8421
1011

We now have our binary number written under the columns – 1011.

B in hexadecimal = 1011 in binary


2 digit Hexadecimal to Binary Conversion

What do we do when we need to convert 2 digit hexadecimal into binary?  Again we need to remember that hexadecimal is a base 16 number and each number column can go from 0-9 and A-F. 


Example 1

Convert hexadecimal number A2 into Binary

Split the hexadecimal number into a 2 column table.

A2

Using the table above and our knowledge of binary, we can now convert the individual hexadecimal digits into binary. 

A2
A = 10102 = 0010

We now simply combine these 2 nibbles of binary into a byte:

A2 = 1010 0010 in binary


Example 2

Convert hexadecimal number 28 into binary

28
00101000

28 = 0010 1000 in binary


4 digit Hexadecimal to Binary Conversion

For the Infrastructure Technician course we need to be able to convert 4 digits of Hexadecimal into a binary so what do we do when we need to convert 4 digits of hexadecimal into binary?  Again we need to remember that hexadecimal is a base 16 number and each number column can go from 0-9 and A-F. 


Example 3

Convert hexadecimal number A24B into Binary

Split the hexadecimal number into a 4 column table.

A24B

Using the table above and our knowledge of binary, we can now convert the individual hexadecimal digits into binary. 

A24B
A = 11002 = 00104 = 01001011

A24B = 1100 0010 0100 1011 in binary


Time to test yourself

Now you know how to convert hexadecimal into binary it’s time to test yourself.