How to Convert decimal to binary with 2 examples

Convert decimal to binary using successive division method by following the steps below as illustrated in Example 1.

  1. Division method is used to convert only integer part of a decimal number to its equivalent in binary number system.
  2. In this method the integer part of the decimal number is continuously divided until we reach a stage where the quotient becomes zero.
  3. The reminder that we obtain at each division iteration becomes the value of the weights or the digits in the binary number system.
  4. The reminders that we obtain are taken from the last step to first step i.e. the last reminder obtained during the division iteration is the most significant digit (MSD) and the first reminder the we obtained is the least significant digit in the binary number system.
  5. You will understand the procedure better with the following illustrative example.

Example 1 : Convert (32)10 decimal to binary number (?)2 using division method

1st Division Iteration

Divide 32 by 2

32 ÷ 2 = 16(Quotient)                     Reminder:0

2nd Division Iteration

Divide 16 by 2

16 ÷ 2 = 8(Quotient)                      Reminder=0  

3rd Division Iteration

Divide 8 by 2

8 ÷ 2 = 4(Quotient)                       Reminder=0 

4th Division Iteration

Divide 4 by 2

4 ÷ 2 = 2(Quotient)                       Reminder=0

5th Division Iteration

Divide 2 by 2

2 ÷ 2 = 1(Quotient)                       Reminder=0

6th Division Iteration

Divide 1 by 2

1 ÷ 2 = 0(Quotient)                       Reminder=1

Remainder from the last division iteration becomes MSD and reminder from 1st iteration becomes LSD.

Hence, the binary equivalent of the decimal number 32 is (100000)2.

Decimal to binary fraction conversion

Convert decimal fraction to binary

Convert Decimal to binary fraction using multiplication method by following the steps mentioned below and as illustrated in example 1.

  1. Successive multiplication method is used to convert a given fractional decimal to binary fraction equivalent.
  2. In this method of conversion the fractional part of the given decimal number is multiplied by 2 (i.e. the radix of binary number system).
  3. The product obtained has an integer part and fractional part, the integer part here is also referred as carry.
  4. The carry that we obtain at each multiplication iteration becomes a digit in the fractional binary number.
  5. The fractional part obtained is again multiplied and the process is repeated until the fractional part becomes zero or the number of multiplication iteration equals the number of significant digits after the decimal point in the given fractional decimal number.
  6. The carry that we obtain at each stage are taken from first iteration to the last iteration to form the numerals in the fractional binary number i.e. the carry obtained in the first multiplication iteration is the most significant bit (MSB) after the decimal point and the carry obtained in the last multiplication iteration is the least significant bit (LSB).
  7. This procedure is illustrated in the following example.

Example 1 : Convert (0.625)10 decimal to binary number (?)2 using successive multiplication method[0.625 as a fraction in binary from decimal]

1st Multiplication Iteration

Multiply 0.625 by 2

0.625 x 2 = 1.25(Product)        Fractional part=0.25         Carry=1(MSB)

2nd Multiplication Iteration

Multiply 0.25 by 2

0.25 x 2 = 0.50(Product)         Fractional part = 0.50       Carry=0

3rd Multiplication Iteration

Multiply 0.50 by 2

0.50 x 2 = 1.00(Product)         Fractional part = 1.00       Carry=1(LSB)

The fractional part in the 3rd iteration becomes zero and hence we stop the multiplication iteration.

Carry from the 1st multiplication iteration becomes MSB and carry from 3rd iteration becomes LSB.

Hence, the fractional binary number of the given fractional decimal number (0.625)10 is (0.101)2.