Convert Hexadecimal to Binary with Steps

What is Binary Number? Binary number contained only two digits or bits; 0and 1. Therefore, base of the system is 2. What is Hexadecimal Number? The number to the base 16 is called Hexadecimal numbers. It uses the numbers from 0 to 9, A, B, C, D, E, and F. There are mainly two ways to convert hexadecimal number to binary number.

Convert Hexadecimal to Binary

Indirect Method

In indirect method first we need to convert hexadecimal number to decimal number then we can convert that decimal number to binary number.

For Example

Convert Hexadecimal number (D7)16 to Binary number ( )2

A) First, we convert hexadecimal number (D7)16to decimal number ( )10, we use the Multiplication method.

StepsDescriptionSolution
1Write down the hexadecimal number(D7)16
2Count right to left of the hexadecimal number.1 0
D 7
3List the powers of sixteen from right to left. Start at 160, evaluating it as “1”.
Increment the exponent by one for each power.
1      0
D      7

161 160
4Multiply each digit of the hexadecimal number by the corresponding power of 16D(13)x161 + 7×160
5Add all the numbers to get the decimal equivalent.= D(13)x161 + 7×160
= 13×16 + 7×1 
= 208 + 7 
= 215
(D7)16 = (215)10

B) Secondly, we convert Decimal number ( )10 to Binary number ( )2, we use the Division method.

StepsDescriptionSolution
1Divide decimal number by 2 until quotient is 0.215/2 = 107
Remainder is 1
107/2 = 53

Remainder is 1
53/2 = 26
Remainder is 1
26/2 = 13

Remainder is 0
13/2 = 6
Remainder is 1
6/2 = 3
Remainder is 0
3/2 = 1
Remainder is 1
1/2 = 0
Remainder is 1
2The last remainder obtained from the division is the most significant bit (MSB) of the binary number.
Hence arrange the number from the most significant bit (MSB) to the least significant bit (LSB).
Read from the bottom (MSB) to top (LSB).
(215)10 = (11010111)2

Hexadecimal number (D7)16to Binary number (11010111)2


Direct Method

In this method, we grouped hexadecimal number and replace their equivalent binary number. To get binary number of given hexadecimal number, we have to convert hexadecimal number into its 4 bits binary equivalent.

For Example

Convert Hexadecimal number (D7)16 to Binary number ( )2

StepsDescriptionSolution
1Write down the hexadecimal number(D7)16
2Group all the digits in sets of four starting from the LSB (far right).
Add zeros to the left of the last digit if there aren’t enough digits to make a set of three. Use the table below to convert each set of three into a binary digit.

(D)16 = (1101)2
(7)16 = (0111)2
3Group each value of step 2.1101 0111
4Join these values and remove zeros at left (if necessary) to get the binary result.
(D7)16 = (11010111)2

More Topics