### 7. Converting hexadecimal numbers into binary numbers

posted Jun 30, 2014, 9:58 PM by Maurice Nyamoti   [ updated Jul 12, 2014, 5:18 AM ]

# Converting binary numbers to hexadecimal numbers

To convert binary numbers to their hexadecimal equivalents, simply group the digits of the binary number into groups of four from right to left e.g. 1101 0010. The next step is to write the hexadecimal equivalent of each group e.g.

1101       -               D

0010       -               2

The equivalent of 1101 00102 is D2H or D216:             H for hexadecimal

# Converting hexadecimal numbers to decimal and binary numbers

## Converting hexadecimal numbers to decimal number

To convert base 16 numbers to base 10, proceed as follows

i)                    Write  the place values starting from the right hand side

ii)                  If a digit is a letter such as an ‘A’ write its decimal equivalent

iii)                Multiply each hexadecimal digit with its corresponding place value and then add the products

Example:

Convert the hexadecimal number D8F16 to its equivalent decimal

Step1: write place values

 Place value 162 161 160 Hexadecimal absolute value D 8 F

Step2: Translate the absolute values of letters to number equivalent

 Place value 162 161 160 Hexadecimal absolute value 13 8 15

A             B             C              D             E              F

10           11           12           13           14           15

(162x13) + (161x8) + (160x15)

3328 + 128 + 15

3471

Therefore, D8F16 is equivalent to 347110

## Converting hexadecimal numbers into decimal numbers

 Hexadecimal digits Decimal equivalents Binary equivalent 00 00 0000 01 01 0001 02 02 0010 03 03 0011 04 04 0100 05 05 0101 06 06 0110 07 07 0111 08 08 1000 09 09 1001 A 10 1010 B 11 1011 C 12 1100 D 13 1101 E 14 1110 F 15 1111

To convert hexadecimal number into binary, proceed as follows:

1>     Convert individual numbers to binary

2>     Combine binary digits

Example:

Convert 32116 into binary

 Hexadecimal digits 3 2 1 Binary equivalents 0011 0010 0001

Combining the three sets of bits, we get 0011001000012

### Convert hexadecimal fraction to decimal fraction

Solved examples of octal fractions to decimal fraction conversion

Problem 1: Convert ( E  F . B 1 )16= ( ? )10
E F .  B  1
↑             ↑
MSD         LSD
= E x 161 + F x 160 .  B x 16-1 + 1 x 16-2

= 14 x 16  + 15 x 1   .  11 x ( 1 / 16 ) + 1 x ( 1 / 256 )

=  224   +    15        .  ( 0. 6 8 7 5 )  ( 0 . 0 0 3 9 0 6 2 5 )

=  239  +  0. 6914

=  239 . 691406

Therefore  ( E F . B 1 )16 =  ( 2 3 9  .  6 9 1 4 0 6 )10

Problem 2: Convert ( 0.9D9 )16= ( ? )10
=  0  . 9 D 9
↑            ↑
MSD          LSD

=  0 x 160 .  9 x 16-1 + D x 16-2  + 9 x 16-3

=  0 x 1  .  9 x ( 1 / 16 ) + 13 x ( 1 / 256 )  + 9 x ( 1 / 4096 )

=  0  .  (0. 5625) +  (0 . 050781 )   +  ( 0. 0021972 )

= 0  .  ( 0 . 6154782 )

0 . 6154782

Therefore  ( 0 . 9 D 9 )16 =  ( 0 . 6 1 5 4 7 8 2 )10

Problem 3: Convert ( BBC.1 0 )16= ( ? )10
=  B C  C . 1 0
↑                 ↑
MSD           LSD
= B x 16+ C x 16+ C x 160 .  1 x 16-1 + 0 x 16-2

= 11 x 256+ 12 x 16+ 12 x 1    .  1 x ( 1 / 16 ) + 1 x ( 1 / 256 )

= 2816      + 192       + 12          .  ( 0 . 0625 )  ( 0 )

= 3020   .   ( 0. 0625 )

= 3020 . 0625

Therefore  ( B C C . 1 0 )16 =  ( 3 0 2 0 . 0 6 2 5 )10

# Quiz

A.       Convert the following hexadecimal numbers into decimal numbers

1>     3216

2>     CCD16

3>     EFE16

4>     11916

5>     32816

6>     ABD16

7>     10AFFD16

8>     DDFF3416

9>     11ABDF16

10>  CDFF3116

### More questions

B.       Convert the following hexadecimal numbers into binary form

i)                    29416

ii)                  24716

iii)                EFD16

iv)                90716

vi)                CBDF16

vii)              585C16

viii)            ABCD16

ix)                 55C3A16

x)                   33111CF16

C.       Convert 1111000110111 to its hexadecimal equivalent.