# 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

8^{3}** 8**^{2}** 8**^{1 }**8 **^{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 :

**8**^{3}** 8**^{2}** 8**^{1 }**8 **^{0}^{ }**← Weights in octal number system**

2 | 0 | 1 | 2 |

↑ ↑

MSB LSB

__Step 3:__Multiply the values and the associated octal weights shown below

**8**

^{0 }

^{ }←

**LSD**

^{ }

**← (1)**

**8**

^{1 }

**← (2)**

**8**

^{2 }

**← (3)**

**8**

^{3 }

**← MSD**

**← (4)**

__Step 4:__Add the products

**(1),**

**(2), (3), (4)**from step 3 as illustrated below

**2 x 8**

^{3 }+ 0 x 8^{2 }+ 1 x 8^{1 }+ 2 x 8^{0}

^{ }

^{ }**= 2 x 8**

^{3 }+ 0 x 8^{2 }+ 1 x 8^{1 }+ 2 x 8^{0}MSB LSB

**= 2 x 512**

^{ }+ 0 x 64^{ }+ 1 x 8^{ }+ 2 x 1

**= 1024**

^{ }+ 0^{ }+ 8+ 2

**= ( 1034 )**

_{10}