Convert Decimal to Octal
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 x8. It contains digits from 0 to 7. Example: (212)8, (121)8, etc.
How to Convert Decimal to Octal?
Follow the steps given below to learn the decimal to octal conversion:
- Write the given decimal number
- If the given decimal number is less than 8 the octal number is the same.
- If the decimal number is greater than 7 then divide the number by 8.
- Note the remainder we get after division
- Repeat step 3 and 4 with the quotient till it is less than 8
- Now, write the remainders in reverse order (bottom to top)
- The resultant is the equivalent octal number to the given decimal number.
Decimal to Octal Table
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 |
Decimal to Octal Examples
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 5210 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 10010 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