Representation of octal number




Representing a number in the octal number system follows the same steps that we have seen in decimal and binary number system, the only difference here is the weights used in octal number system are powers of 8 and the values that are assigned to the weights range from 0 to 7. In this system it is not permitted to use the digits beyond 7.









Note: In this number system 20 is not equal to twenty but its equal to twenty four in decimal.

Let us take a simple example 1034 in decimal number system and (2012) its equivalent number in the octal number system, we will not worry much about how we got the octal equivalent at this moment and concentrate on how we represent in octal number system.


Step 1: ( 2 0 1 2 )8
Here subscript 8 indicates the number is in octal number system

We will now write down the weights in the form of table without assigning the values as shown below


    83      82       81       0                 ← Weights in octal number system
                                  
    ↑                             ↑
MSD                          LSD


Step 2 : The values are assigned starting from LSD to MSD, the right most digit in the given example is LSD and the left most digit is MSD as done below :


    83       82       81       0                 ← Weights in octal number system
   2      0       1      2    
    ↑                             ↑
MSB                          LSB

Step 3: Multiply the values and the associated octal weights shown below 

Beginning from LSD to MSD

2 x 0    LSD             ← (1)
1 x 1                                  ← (2)
0 x 2                                  ← (3)
2 x 3   ← MSD             ← (4)



Step 4: Add the products (1), (2), (3), (4) from step 3 as illustrated below

       2 x + 0 x + 1 x + 2 x 0

 =    2 x + 0 x + 1 x + 2 x 0
        ↑                                          ↑
      MSB                                    LSB

=    2 x 512 + 0 x 64 + 1 x 8 + 2 x 1


=    1024 + 0 + 8+ 2


=    ( 1034 )10 


comments powered by Disqus