Page 22 - ComputerScience_Class_11
P. 22
Some more examples are given below:
Example 1: Convert (39) to binary.
10
Answer:
Divisor Dividend Remainder
2 39
2 19 1
2 9 1
2 4 1
2 2 0
2 1 0
0 1
(39) = (100111) 2
10
Example 2: Convert (215.125) to binary.
10
Answer: Integer part Fractional part
Divisor Dividend Remainder Multiplication Result Integer part
2 215 0.125 x 2 = 0.250 0
2 107 1 0.250 x 2 = 0.500 0
2 53 1 0.500 x 2 = 1.000 1
2 26 1
2 13 0
2 6 1
2 3 0
2 1 1
0 1
(215.125) = (11010111.001) 2
10
1.2.2 Decimal to Octal
The steps to be followed are:
1. Divide the number by 8 and store the remainder of the division separately.
2. Assign quotient as the new number (dividend).
3. Repeat steps 1 & 2 until new number becomes 0.
4. Arrange the remainders from bottom (LSD) to top (MSD) to get the result.
5. For decimal part, repeat step 6 until fractional part becomes 0 or until four places after decimal are obtained.
6. Multiply fractional part by 8 and store the integer part of the product separately.
7. Arrange the octal digits of the integer part from top to bottom for the result of the fractional part.
The conversion of decimal to octal is similar to decimal to binary, but the divisor here is base 8. For the fractional part,
the same procedure is to be followed as in binary number conversion.
Example 1: Convert (39) to octal.
10
Answer: Divisor Dividend Remainder
8 39
8 4 7
0 4
(39) = (47) 8
10
20 Touchpad Computer Science (Ver. 3.0)-XI

