Decimal to octal number

 
Decimal to octal conversion

Decimal to octal conversion can be performed using multiple methods. Some methods are more widely used than the others.
 
In earlier post, we have seen the procedure for converting a given decimal number to its equivalent binary number.

In this post, we will see the step-by-step procedure to convert given decimal number to its equivalent in the octal number system.

As discussed earlier, we will implement the same division method used earlier, to convert decimal to octal and all the steps will be very much similar to the steps shown in decimal to binary conversion except for the change in the radix from 2 to 8 since here the target number system is octal number system.



  1. Integer part of the given decimal number is successively divided by the radix(base) of the target number system 8(octal) until we reach a stage where the quotient becomes zero(0).
  2. The reminder obtained at the end of each division step, becomes a part of the octal number.
  3. The reminders that obtained at the end of each step are assigned weights in the octal number system starting from the reminder obtained at the last division iteration to the first division iteration in decreasing order.
  4. The reminder in the last division iteration has the highest weight (MSD) and the reminder obtained in the first division iteration has the lowest weight (LSD) in the octal number system.
  5. The procedure is illustrated in the example below:

 

Decimal to Octal Conversion Example


Ex1: Convert (83)10 decimal number to octal number (?)8 using division method

1st Division Iteration

Divide 83 by 8
83 ÷ 8 = 10(Quotient)                     Reminder:3


2nd Division Iteration

Divide 10 by 8
     10 ÷ 8 = 1(Quotient)                     Reminder=2   

3rd Division Iteration

Divide 1 by 8
     1 ÷ 8 = 0(Quotient)                      Reminder=1   

    
Remainder from the last division iteration becomes MSD and reminder from 1st iteration becomes LSD.

Hence, the octal equivalent of the decimal number 83 is (123).
comments powered by Disqus