Page 8 - Code Craft Computer-7
P. 8
• Divide the quotient obtained again by 2 and note down the resulting quotient and remainder.
• Repeat the procedure till you reach a quotient less than 2.
• List the last quotient and all the remainders (moving from bottom to top). You will get your
binary number.
Look at the given examples to understand the conversion better.
Example 1. Convert the decimal number Example 2. Convert the decimal number
(80) to binary. (72) to binary.
10 10
2 80 R 2 72 R [Note : R stands
2 40 0 2 36 0 for Remainder]
2 20 0 2 18 0
2 10 0 2 9 0
2 5 0 2 4 1
2 2 1 2 2 0
2 1 0 2 1 0
0 1 0 1
The binary equivalent of (80) is 1010000 The binary equivalent of (72) is 1001000
10 10
in other words (80) = (1010000) In other words (72) = (1001000)
10 2 10 2
BINARY TO DECIMAL CONVERSION
To convert a binary number into a decimal number, follow these steps:
• Start from the right-most digit known as the LSD before the fractional point, and move
leftwards.
• While doing so, multiply exact digit by 2 raised to a particular power. The powers of 2 start
from 0 and increase to 1, 2 and so on as you move leftwards.
• Add up all the resulting products. You will get your decimal number.
The given examples will help you to understand the conversion.
Example 1. Convert (1111) to decimal Example 2. Convert (10111) to decimal
2 2
number. number.
1 1 1 1 1 0 1 1 1
0
1 × 2 = 1 × 1 = 1 1 × 2 = 1 × 1 = 1
0
1
1 × 2 = 1 × 2 = 2 1 × 2 = 1 × 2 = 2
1
2
1 × 2 = 1 × 4 = 4 1 × 2 = 1 × 4 = 4
2
3
1 × 2 = 1 × 8 = 8 1 × 2 = 1 × 0 = 0
3
= 1 + 2 + 4 + 8 = 15 1 × 2 = 1 × 16 = 16
4
(1111) = (15) 10 = 1 + 2 + 4 + 0 + 16 = 23
2
(10111) = (23) 10
2
8
Computer-7

