This article explains the Octal Number System. Method to convert decimal to octal and octal to decimal number has also been explained with example.
What is Octal Number System?
A number system which uses only eight digits viz. 0, 1, 2, 3, 4, 5, 6 to 7 is called Octal Number System. The base or radix of this number system is 8. All the digits from 0 to 7 in octal system has the same meaning as in decimal system. However, the decimal numbers from 8 to 15 are represented as 10, 11, 12, 13, 14, 15, 16 & 17 respectively in octal system.
In Octal Number System, each significant position has a positional weight. The least significant position has a weight of 80 i.e. 1; the higher significant positions are given weight in the ascending powers of 8 i.e. 81, 82, 83, etc. respectively.
Decimal to Octal Conversion:
To convert a decimal into octal, the decimal number is divided by 8 progressively until a quotient of 0 is obtained. The remainder in each step of division when read in reverse order gives the equivalent octal number. This procedure to convert a decimal into octal number is similar to the double-dabble method.
The method to convert a decimal into octal is explained in the following example.
Suppose, the given decimal number is (444.456)10 and we need to convert this into its equivalent octal number. As a very first step, we will separate the integer and fraction part of the decimal number.
To convert integer part of decimal into octal, we will divide the integer by 8 repeatedly till quotient zero is obtained. Record the remainder in each step of division and arrange them in reverse order. This is shown below.
Reading the remainders from bottom to top, the decimal number (444)10 is equivalent to octal (674)8.
To convert the fraction part of decimal into octal, multiply the fraction by 8 continuously. Record the carry in the integer position in each multiplication. The process of multiplication is terminated when the significant digits are obtained. The carry when read in forward order gives the octal form of the fraction decimal. This is shown below.
|Multiplication||Generated Carry at Integer Position|
|8×0.456 = 3.648||3|
|8×0.648 = 5.184||5|
|8×0.184 = 1.472||1|
|8×0.472 = 3.776||3|
|8×0.776 = 6.208||6|
Reading the carry from top to bottom gives the equivalent octal number. Therefore, the decimal (0.456)10 is equivalent to octal (.35136)8.
Thus, the decimal number (444.456)10 is equivalent to octal (674.35136)8.
Octal to Decimal Conversion:
Each significant position in octal has a positional weight. The least significant position has a weight of 80 i.e. 1; the higher significant positions are given weight in the ascending powers of 8 i.e. 81, 82, 83, etc. respectively. However, the digits after the octal point has weight of 8-1, 8-2, 8-3 etc.
Let us consider an octal number (237.45)8. Let us convert this into decimal. First of all, assigning respective weight; multiply the digits with their positional weight and add them together. This is shown below.
Thus, the decimal no. is 159.578125 corresponding to octal number (237.45)8.