Page 42 - Computer Science Class 11 Without Functions
P. 42
Example 2: (1000110) to (70) 10
2
Face Value 1 0 0 0 1 1 0
Place value 2 6 2 5 2 4 2 3 2 2 2 1 2 0
3
5
6
4
1
= 1 × 2 + 0 × 2 + 0 × 2 + 0 × 2 + 1 × 2 + 1 × 2 + 0 × 2 0
2
= 64 + 0 + 0 + 0 + 4 + 2 + 0
= 70
(1000110) = (70) 10
2
Decimal to Octal Conversion
To convert a whole decimal number to octal, we follow the following steps:
1. Divide the number by 8.
2. Note the remainder.
3. Repeat steps 3a and 3b until the quotient becomes 0
3a. Divide the quotient by 8
3b. Note the remainder
4. Write the remainders in reverse order from the binary number.
Example 3: Convert (450) to an equivalent octal number.
10
8 450 Remainder
8 56 2
8 7 0
0 7
(450) = (702) 8
10
Octal to Decimal Conversion:
The steps to convert an octal number to decimal are as follows:
1. Write the octal number.
2. Below each digit, write its place value, represented as a power of 8.
3. Multiply the face value of each digit with its place value.
4. Add all values in step 3 to get the decimal number.
We have already seen in example 3 that (702) is the octal representation of the decimal number (450) . So, suppose
8
10
we express the octal number (702) as a decimal number. In that case, we must get the original number (450) as
8
10
shown below:
Example 4: Convert (702) to (450)
8 10.
Face Value 7 0 2
Place value 8 2 8 1 8 0
= 7 × 8 + 0 × 8 + 2 × 8 0
2
1
= 448 + 0 + 2
= 450
(702) = (450)
8 10
40 Touchpad Computer Science-XI

