Printer Friendly Version

 Editor Wanted BellaOnline's Computer Networks Editor

Converting Decimals and Decimal Fractions to Octal

Untitled DocumentThe conversion of a decimal number to its base 8 equivalent is done by the repeated division method. You simply divide the base 10 number by 8 and extract the remainder. The first remainder will be the LSD, and the last remainder will be the MSD.

Example: Convert 25`10` to octal

The division problem will be setup as 25`10` ÷ 8
25`10` ÷ 8 = 3
25`10` – 24 = Remainder 1 -----> 1 (LSD)

3 ÷ 8 = 0
3 – 0 = Remainder 3 -----> 3 (MSD)

Now, write the number from MSD to LSD as 31`8`.

This same process can be used regardless of the size of the decimal. Here is an example of a larger decimal.

Example: Convert 258`10` to octal.

The division problem will be setup as 258`10` ÷ 8
258`10` ÷ 8 = 32
18 – 16 = Remainder 2 -----> 2 (LSD)

32 ÷ 8 = 4
32 – 32 = Remainder 0 -----> 0

4 ÷ 8 = 0
4 – 0 = Remainder 4 -----> 4 (MSD)

Now, write the number from MSD to LSD. You should end up with 402`8`.

To convert a decimal fraction to octal, you must multiply the fraction by 8. Then, you need to extract the number(s) that appear to the left of the decimal point. The first number that is extracted will be the MSD and will follow the decimal point. The last number that is extracted will be the LSD. Continue to desired accuracy. This type of problem may result in results containing a mixed decimal number, which requires the whole number and the fraction to become split in order to achieve its equivalent octal conversion.
Example: Convert 0.175`10` to octal.

The multiplication problem will be setup as

.0175`10`
× 8
0.1400 -----> 0 (MSD)

.1400
× 8
1.1200 -----> 1

.1200
× 8
0.9600 -----> 0

.9600
× 8
7.6800 -----> 7

.6800
× 8
5.4400 -----> 5

.4400
× 8
3.5200 -----> 3

.5200
× 8
4.1600 -----> 4

.1600
× 8
1.2800 -----> 1 (LSD)

Writing from MSD to LSD, you should end with .01075341`8`.

This site needs an editor - click to learn more!

Computer Networks Site @ BellaOnline