# Decimal to octal conversion

Any decimal number can be converted to its octal equivalent.

•  For integers ,conversion is obtained just by dividing number continuously by 8 and keeping track of remainders obtained .

Example:

(  260  )10 = (   ?   )8

Solution: Firstly Divide 260  by 8,
Now ,quotient obtained from this division will become dividend in next step,

dividend =32 ( rem=4 )
again, divide it with 2.( Keeping track of remainders),

dividend = 4 ( rem=0)

repeat the same process until dividend become less than the divisor.
now, dividend =4 is less than 8

Stop dividing when dividend become less than the divisor.

Now write in following sequence,
First write the last dividend in left and then write remainders obtained in reverse order .
As shown below,

(last dividend is 4 & remainders in reverse order)

So, the final answer is this , (  4 0 4  )8

• While for fractional part ,the conversion is done by continuous multiplication by 8 and keeping track of the integers generated. See in given example,

Example:

(  0.625  )10 = (   ?   )8

Solution:

0.625 ×  8  = 5.00  , integer obtained is 5

again, multiply the fractional part obtained  with 8

0.00  × 8 = 0 ,integer obtained  0
now, we don’t have any fractional part left .So stop multiplying here.
Next step is , write down the integer obtained  in the sequence they obtained after radix point ,as follows:

=  (  0.5 0 )=(  0.5 )8

This is the way we can convert a decimal number into its octal equivalent.

# Another Example:

(  95.5  )10= (   ?   )8
Solution:
Integer part:
divide 95 by 8 = 11 is obtained with rem 7
divide 11 by 8 = 1 is obtained with rem 3
now 1 < 8 so, 1 will be last dividend .Now write in reverse order 1 , 3 and then 7.

1 3 7

Fractional part:
0.5 ×  8  = 4.00  , integer obtained is 4
now,multiply the fractional part obtained  with 8 again,

.00  × 8 = 0 ,integer obtained  0.
now, we don’t have any fractional part left.