Q. Can you show the Decimal to Octal Conversion?
To convert decimal to octal is somewhat more difficult. The usual method to convert from decimal to octal is repeated division by 8. While we may as well use repeated subtraction by the weighted position value, it is more difficult for large decimal numbers.
For this method (Procedure), divide the decimal number by 8, and write the remainder on the side as the least significant digit. This Method (process) is continued by dividing the quotient by 8 and writing the remainder until the quotient is 0. While performing the division, the remainders which will represent the octal equivalent of the decimal number are written beginning at the least significant digit (right) and each new digit is written to the next more significant digit (the left) of the previous digit. Consider the number 44978.
Division
|
Quotient
|
Remainder
|
Octal Number
|
44978 / 8
|
5622
|
2
|
2
|
5622 / 8
|
702
|
6
|
62
|
702 / 8
|
87
|
6
|
662
|
87 / 8
|
10
|
7
|
7662
|
10 / 8
|
1
|
2
|
27662
|
1 / 8
|
0
|
1
|
127662
|
Like you can see, we are back with the original number. That is what we should anticipate.