Loading....
Coupon Accepted Successfully!

 

Number Conversion

  • The binary number system is the most important one in digital system as it is very easy to implement in circuitry.

  • The decimal system is important because it is universally used to represent quantities outside a digital system.

  • This session tells you how to perform conversion from one system to another

  • Like decimal to binary, decimal to octal, decimal to hexadecimal and vice versa.

  • So, let us discuss them one by one.

Decimal to Binary Conversion

  • A popular way to convert decimal number is the double dabble method.

  • In this method the decimal number is divided by 2, writing down the remainder after each division.

  • The remainders are taken in reverse order to form the binary number.

  • For example, convert 2510 to binary number

25 ÷ 2 = 12 + remainder 1

12 ÷ 2 = 06 + remainder 0

6 ÷ 2 = 3 + remainder 0

3 ÷ 2 = 1 + remainder 1

1 ÷ 2 = 0 + remainder 1

Write the equivalent binary numbers from bottom to top
  • Hence the result will be as shown below
    2510 = 110012

Decimal to Binary Conversion (Fractions)

  • In this case, the decimal number is multiplied by 2 and the carry is recorded in the integer position.

  • The carries are taken in downward direction (from top to bottom) to obtain the required binary fraction.

  • The process can be stopped either after getting the result as zero or after getting six binary digits.

  • For example convert 0.8510 to binary number

Write the equivalent binary numbers from top to bottom
  • Hence the result of 0.8510 is

0.8510 = 0.11.1102

Binary to Decimal Conversion

  • In this case the binary number is multiplied by its positional values, where each binary digit carries a certain weight based on its position relative to the LSB.

  • The bit position of binary digit is given below

  • In that each value is multiplied with the base 2 and its power

  • For example

    21 = 2 x 1 = 2 and so on

  • The following figure explains the bit position

  • Let us consider an example of converting 101012 to decimal

Note: The alternate method for converting binary to decimal is done by the following step
  1. Write the binary number
  2. Write the weights 1, 2, 4, 8.....(20, 21, 22, 23......) under the corresponding binary numbers
  3. Cross out the weight of binary numbers as '0' (zero).
  4. Add the remaining weights to get the equivalent decimal number.
  5. Example : convert 1011 to its equivalent decimal number as
Step 1: 1 0 1 1
Step 2: 8 4 2 1
Step 3: 8 4 2 1
Step 4: 8 + 0 + 2 + 1
Answer = 11
Therefore 10112 = 1110

Binary to Decimal Conversion (Fractions)

  • To find the decimal equivalent of binary fraction, take the sum of the products of each digit value and its positional value
  • For example
    • 1101.0001012 to decimal

 

 

 

Decimal to Octal Conversion

  • Decimal to octal conversion can be accomplished using the double dabble method presented in the last section.
  • The integer part is converted with repeated divisions by the base 8 in the above example.
  • This is easily converted by the following procedure
  • For example convert 44410 to octal

Write the result in the bottom to top direction
  • Hence the result for

44410 = 6738

Decimal to Octal Conversion (fraction)

  • In this conversion, the decimal number is multiplied by 8 and the carry is recorded in the integer position.
  • The carries are written in down direction to obtain the required octal number
  • For example, Convert 0.8210 to its equivalent octal number

Write the number from top to bottom
  • Hence the result of

0.8210 is 6436568

 

Octal to Decimal Conversion

  • The weight of an octal number is eight.
  • Therefore to convert an octal number to its equivalent decimal number, multiply each octal digit by its weight and then add the resulting products.
For example, convert 1758 to its equivalent decimal number
 

= 1 7 5

= 1 x 82 + 7 x 81 + 5 x 80

= 1 x 64 + 7 x 8 + 5 x 1

= 64 + 56 + 5

= 12510

 

Octal to Decimal conversion (fraction)

  • An octal number can be easily converted into decimal; the procedure is to successively multiply the decimal fraction by the radix.
  • Base and collect all the numbers to the left of the decimal point, reading down.
  • For example, convert the fractional number 0.458 to its equivalent decimal number

= 0. 4 5

= 4 x 8-1 + 5 x 8-2

= 4 x 1 / 8 + 5 x 1 /64

= 0.5 + 0.578125

= 0.57812510

  • Hence the result of

0.458 = 0.57812510

  

Decimal to Hexadecimal conversion

  • A hex dabble method, similar to double dabble method.
  • Divide the decimal number by 16 and write down the remainder after each division.
  • The remainder in reverse order form the octal number
  • For example, convert 653810 to its hexadecimal equivalent

 

Write from bottom to top to obtain the result

  • Hence the result of

653810 = 198A16

 
Note: on the above example the value of 10 is termed as A because according the hexadecimal the conversion of 10 is A.
 
Decimal to Hexadecimal conversion (Fraction)
  • In this conversion, the decimal number is multiplied by 16 and records the carry in the integer's position.
  • The carries are written in downward direction, to obtain the required hexadecimal number.
  • For example, convert a fractional decimal 93510 to hexadecimal number

 

Write the result in downward direction

  • Hence the result of

.93510 = EF5C2816

 

Hexadecimal to Decimal Conversion

  • The weight of the hexadecimal number is 16.
  • Therefore to convert a hexadecimal number to its equivalent decimal number, multiply each hexadecimal digit by its weight
  • Then add the resulting products
  • For example, convert A25 to its equivalent decimal number

  • Hence the result of

A2516 = 259710

 
Hexadecimal to Decimal conversion (Fraction)
  • To convert the fractional part of the number, repeated multiplications are required.
  • For example, convert .B516 to decimal equivalent

= . B 5

= B x 1/ 16-1 + 5 X 1/16-2

= 11 x 0.0625 + 5 x 0.00390625

= 0.6875 + 0.0195312

= 0.7070312

  • Hence the result of

.B516 = 0.707031210

Binary to Hexadecimal conversion

  • This method is made by grouping the numbers into four starting at the binary point.
  • The following table gives the conversion of hexadecimal to binary equivalent number

Hexadecimal number

Equivalent Binary number

0

0000

1

0001

2

0010

3

0011

4

0100

5

0101

6

0110

7

0111

8

1000

9

1001

10

1010

11

A

1011

12

B

1100

13

C

1101

14

D

1110

15

E

1111

  • For example convert a binary number 10111110101011. 1011101011 to its equivalent hexadecimal number
  • The binary number is grouped as follows

Hexadecimal to binary conversion

  • Like the octal number system, the hexadecimal number system is used primarily as a shorthand method.
  • This method is the reverse method of converting the binary to hexadecimal.
  • For example convert BAD16 to binary equivalent

= B A D

= 11 10 13

= 1011 1010 1100

= 1011101011002

  • Hence the result of

BAD16 = 1011101011002

Binary to Octal Conversion

  • In this method, first the binary number is arranged in group of 3 bits from right to left
  • Suppose the binary numbers are not completely in the form of 3 digits, sufficient zeros are added to the left most side of integer number
  • And also sufficient zeros are added to the right most side of the fractional number
  • The following table gives the binary equivalent values for the given octal number

Octal number

Equivalent Binary number

0

000

1

001

2

010

3

011

4

100

5

101

6

110

7

111

  • For example convert the binary number of 10110111. 101112 to its equivalent octal number

  • Hence the result of

10110111. 101112 = 267.568

Octal to Binary Conversion

  • The weight of an octal number is 8 and the weight of the binary number is 2
  • The weight of the octal is the third power of binary (23= 8)
  • Hence in octal to binary conversion, each octal digit is converted into its equivalent three digit binary form.
  • For example convert an octal number 326.548 to its equivalent binary value

= 3 2 6 .5 4

= 011 010 110 . 101 100

= 11010110.1011002

  • Hence the result of

326.548 = 11010110.1011002





Test Your Skills Now!
Take a Quiz now
Reviewer Name