g
Printer Friendly Version

editor  
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 2510 to octal

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

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

Now, write the number from MSD to LSD as 318.

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

Example: Convert 25810 to octal.

The division problem will be setup as 25810 ÷ 8
25810 ÷ 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 4028.

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.17510 to octal.

The multiplication problem will be setup as

.017510
× 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 .010753418.

This site needs an editor - click to learn more!

Computer Networks Site @ BellaOnline
View This Article in Regular Layout

Content copyright © 2013 by Cathy Spearmon. All rights reserved.
This content was written by Cathy Spearmon. If you wish to use this content in any manner, you need written permission. Contact Editor Wanted for details.



| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2014 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor