Octal to Decimal Conversion
To convert any octal number to Decimal we multiply the value in each position by its octal weight and add each value.
Let us take an example to better understand this. Let we have any octal number 31321Q to be converted into its corresponding decimal number. Then we will follow the following steps:
3*84 + 1*83 + 3*82 + 2*81 + 1*80
= 3*4096 + 1*512 + 3*64 + 2*8 + 1*1
= 12288 + 512 + 192 + 16 + 1
= 13009
Decimal to Octal Conversion
To convert decimal to octal is slightly more difficult. The typical method to convert from decimal to octal is repeated division by 8. For this method we divide the decimal number by 8 and write the remainder on the side as the least significant digit. This process is continued by dividing the quotient by 8 and writing the remainder until the quotient is 0.
When 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.
|