 Hexadecimal number systems help computers to process the large quantity of data they are supposed to handle. Hexadecimal number systems is a numerical system of base 16. Different combinations of the 16 basic digits are used after 9 in the decimal system. Understanding the conversion between hexadecimal and binary numbers is vital in the field of digital electronics just like understanding the conversion of rupees to dollar or dollar to euro is in the physical world. Before understanding these conversions let us try and familiarize binary and hexadecimal number systems.

### Binary Number System

The binary number system is a system of numbers with base 2. This numerical system has only two numbers- 0 and 1. We use some combinations of these two digits to generate the entire binary number system. So (0)10( decimal number)is represented as (00)2in binary and (1)10 is 01. The next numbers are 10,11 etc.

We can easily find the corresponding binary representation to any decimal digit by continuously dividing the digit by 2 till the quotient is 0. For example, 24 in binary representation can be found by :

24/2 = 12; reminder = 0

12/2 = 6;   reminder = 0

6/2 = 3;    reminder = 0

3/2 = 1;    reminder = 1

1/2 = 0;    reminder = 1

Hence , (24)10 = (11000)2

We can even represent decimal point numbers like 0.205 and 1.234 in the binary system. In this case, instead of dividing with 2, we multiply the numbers after decimal point with 2 till the numbers after decimal point become 0. For example, to represent 0.25 in the binary system,

Take 0.25 out of .25 and multiply with 2.

0.25*2=0.50; The number before decimal point = 0;

0.50*2 = 1.00; The number before decimal point = 1;

Hence, (0.25)10 = (0.01)2

## Some Decimal Numbers in Binary Representation

 Decimal Digit Binary Digit 0 0000 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 7 0111 8 1000 9 1001 10 1010 11 1011 12 1100 13 1101 14 1110 15 1111

Hexadecimal number systems is a numerical system of base 16. Here just as we use 10,11,12 etc after 9 in the decimal system, we use different combinations of the 16 basic digits of the hexadecimal number system. Let us see the representation of decimal numbers in the hexadecimal number system.

 Decimal Digit Hexadecimal Digit 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 A 11 B 12 C 13 D 14 E 15 F

These are the basic hexadecimal numbers. Any decimal number can be converted to a hexadecimal number by dividing the number by 16 and then following a similar algorithm as seen above.

### Conversion of Hexadecimal to Binary

First, let us see how to convert a whole number from hexadecimal to binary.

Suppose we have a number E9A; To find the corresponding binary number we write each hex digit with the corresponding binary number. From the above table, we know,

• E is 14 in decimal representation and 14 is 1110 in binary representation.

• 9 is 9 in decimal representation and 1000 in binary.

• A is A in decimal and 111 in binary.

 E 9 A 1110 1001 1010

Hence (E9A)16 = 111010011010

Now let us see how to convert a decimal point hexadecimal number to binary. Convert  0.A39 to binary.

Here the rules are the same as above except we avoid the rightmost zeros in this case. These are called trailing zeros.

 A 3 8 1010 0011 1000

That is (0.A38)16 = (0.101000111)2

It will be very helpful to have a ‘hexadecimal to binary’ table. This can be achieved by combining the above tables.

 Decimal Digit Hexadecimal Digit Binary Digit 0 0 0000 1 1 0001 2 2 0010 3 3 0011 4 4 0100 5 5 0101 6 6 0110 7 7 0111 8 8 1000 9 9 1001 10 A 1010 11 B 1011 12 C 1100 13 D 1101 14 E 1110 15 F 1111

We have covered the basic idea of binary and hexadecimal number systems and the conversion of the ‘ hexadecimal to binary’ system. Let us try to summarize the rules:

• Write the hexadecimal number neatly.

• Underneath each digit write the corresponding decimal digit.

• Underneath each decimal term write the corresponding binary digit.

• String together all the digits, without any space in between.

• Rewrite the answer after leaving out leading and trailing zeros. We have obtained our final answer.