Before beginning this topic, if you want to learn some basic information about the number system, you can read the __number system explanation__. Again, I tried to make this topic easy to understand.

**Key Questions:**

**Convert from octal number system to decimal number system****Convert from decimal number system to octal number system****How to convert decimal fractions into octal fractions****How to convert octal fractions into decimal fractions**

**Decimal to Octal Conversion:**

The method of converting decimal numbers to octal numbers is the same as decimal to binary number conversion. The difference is that when converting from decimal to binary, we use **repeated division by 2. **But when converting from decimal to octal, we use **repeated division by 8. **For mantissa calculation, we use **repeated multiplication by 2** when converting a decimal fraction into a binary fraction. The method is explained in __decimal to binary conversion__. Similarly, when working with octal numbers, we use **repeated multiplication by 8** for mantissa calculation.

**Example#01:1899) _{10}=?)_{8}**

Repeated division by 8

1899/8 = 237 remainder **3**

237/8 = 29 remainder **5**

29/8 = **3** remainder **5**

**Answer 1899) _{10}= 3553)_{8}**

**Example#02:9876.87) _{10}=?)_{8}**

First, solve the integer part by Repeated division by 8

9876/8 = 1234 remainder **4**

1234/8 = 154 remainder **2**

154/8 = 19 remainder **2**

19/2 = **2** remainder **3**

9876)_{10}=23224)_{8}

For mantissa calculation, use repeated multiplication by 8 method

0.87*8=6.96 (Most significant digit)

0.96*8=7.68

0.68*8=5.44

0.44*8=3.52 (least significant digit)

**Answer 9876.87) _{10}= 23224.6752)_{8}**

**Example#03: 9248.356) _{10 }= ?)_{8}**

Repeated division by 8

9248/8 = 1156 remainder **0**

1156/8 = 144 remainder **4**

144/8 = 18 remainder **0**

18/2 = **2** remainder **2**

9248)_{10}=22040)_{8}

For mantissa calculation, use repeated multiplication by 8.

0.356*8=2.848 (most significant digit)

0.848*8=6.784

0.784*8=6.272 (least significant digit)

0.356)_{10}=0.266)_{8}

**Answer: 9248.356) _{10 }= 22040.266)_{8} **

**Octal to Decimal Conversation:**

When we are converting a number from the octal number system to a decimal number system, we use the sum of weights method. The method is the same as binary to decimal conversion, but the difference is base. In the binary number system, we multiply each digit by the power of 2. That is 2^{n}. You can learn __binary to decimal conversion__ here. Similarly, when working on an octal number system, we use the power of base 8. That is 8^{n}. At this point, I would like to add a table for the calculated values of the sum of weights. So it’s easy to add a table for quick reference.

8^{4} | 8^{3} | 8^{2} | 8^{1} | 8^{0} | 8^{-1} | 8^{-2} | 8^{-3} | 8^{-4} |
---|---|---|---|---|---|---|---|---|

4096 | 512 | 64 | 8 | 1 | 0.125 | 0.015625 | 0.001953125 | 0.000244140625 |

**Example#01:3553) _{8}=?)_{10}**

5554)_{8}=(3*8^{3})+(5*8^{2})+(5*8^{1})+(3*8^{0})

=(5*512)+(5*64)+(5*8)+(3*1)

=1536+320+40+3

=1899)_{10}

**Answer: 3553) _{8}=1899)_{10}**

**Example#02: 23224.6752) _{8}=?)_{10}**

23224.6752)_{8}=(2*8^{4})+(3*8^{3})+(2*8^{2})+(2*8^{1})+(4*8^{0}).(6*8^{-1})+(7*8^{-2})+(5*8^{-3})+(2*8^{-4})

=(2*4096)+(3*512)+(2*64)+(2*8)+(4*1).(6*0.125)+(7*0.015625)…… Neglecting the small fractions

=8192+1536+128+16+4.0.75+0.109375

=9876.86)_{10}

**Answer: 23224.6752) _{8}=9876.86)_{10}**

**Example#03: 22040.266) _{8} =?)_{10}**

22040.266)_{8}=(2*8^{4})+(2*8^{3})+(0*8^{2})+(4*8^{1})+(0*8^{0}).(2*8^{-1})+(6*8^{-2})+(6*8^{-3})

=(2*4096)+(2*512)+(0*64)+(4*8)+(0*1).(2*0.125)+(6*0.015625)+(6*0.001953125)

=8191+1024+0+32+0.+0.25+0.09375+0.012

=9248.36)_{10}

**Answer: 22040.266) _{8}=9248.36)_{10}**