To convert decimal to octal, we have to learn about both the number system first. A number to the base 8 is the octal number and a number to the base 10 is the decimal number. Here we will convert a decimal number to an equivalent octal number. It is same as converting any decimal number to binary or decimal to hexadecimal. In decimal to binary, we divide the number by 2, in decimal to hexadecimal we divide the number by 16. In case of decimal to octal, we divide the number by 8 and write the remainders in the reverse order to get the equivalent octal number.
Decimal Number: All the numbers to the base ten are called as decimal numbers. These are the commonly used number system, which are 0-9. It has both integer part and decimal part. It is separated by a decimal point(.). Numbers on the left of the decimal are integers and numbers on the right of the decimal is decimal part. Example: (236.89)_{10}, (54.2)_{10}, etc.
Octal number: These are the numbers with base 8. If x is a number then the octal number is denoted as x_{8}. It contains digits from 0 to 7. Example: (212)_{8}, (121)_{8}, etc.
Follow the steps given below to learn the decimal to octal conversion:
Decimal |
Equivalent Octal Number |
Decimal |
Equivalent Octal Number |
0 |
0 |
9 |
11 |
1 |
1 |
10 |
12 |
2 |
2 |
11 |
13 |
3 |
3 |
12 |
14 |
4 |
4 |
13 |
15 |
5 |
5 |
14 |
16 |
6 |
6 |
15 |
17 |
7 |
7 |
16 |
20 |
8 |
10 |
17 |
21 |
Example 1: Convert (127)_{10} to Octal.
Solution: Divide 127 by 8
127 ÷ 8= 15(Quotient) and (7)Remainder
Divide 15 by 8 again.
15 ÷ 8 = 1(Quotient) and (7) Remainder
Divide 1 by 8, we get;
1 ÷ 8 = 0(Quotient) and (1) Remainder
Since the quotient is zero now, no more division can be done. So by taking the remainders in reverse order, we get the equivalent octal number.
Hence, (127)_{10} = (177)_{8}
Example 2: Convert 52_{10} to octal.
Solution: Divide 52 by 8
52 ÷ 8 = 6(Quotient) and (4)Remainder
Divide 6 by 8 again.
6 ÷ 8 = 0(Quotient) and (6) Remainder
Since the quotient is zero now, no more division can be done. So by taking the remainders in reverse order, we get the equivalent octal number.
Hence, (52)_{10} = (64)_{8}
Example 3: Convert 100_{10} to octal.
Solution: Divide 100 by 8
100 ÷ 8= 12(Quotient) and (4)Remainder
Divide 12 by 8 again.
12 ÷ 8 = 1(Quotient) and (4) Remainder
Divide 1 by 8, we get;
1 ÷ 8 = 0(Quotient) and (1) Remainder
Since the quotient is zero now, no more division can be done. So by taking the remainders in reverse order, we get the equivalent octal number.
Hence, (100)_{10} = (144)_{8}