# Know How to Convert Octal to Decimal: It's Not That Difficult

Learning about decimal and octal numeric systems is a basic tool that most people dabbling in software should understand. You need to know how to convert between the various forms to make sense of machine-level data.

ScienceStruck Staff

Last Updated: Jun 3, 2018

The Decimal and Octal Numerical Systems

Everyone knows the decimal number system. It is the main number system we use today, and has 10 discrete digits from 0 to 9. The octal system on the other hand has only 8 digits (hence the name octal). The numbers in an octal system are only from 0 - 7. That means, there is no 8 and 9 in a normal octal system.

Conversion From Decimal to Octal

It is one of the most commonly explained problems in computer basics. An octal number can be converted to a decimal number using the following formula:

In this formula, 'a' is the individual digit being converted, while '

Here's how to do it step-by-step, using the octal number 765:

(1336)

= (1 x 512) + (3 x 64) + (3 x 8) + (6 x 1)

= 512 + 192 + 24 + 6

= 734

Thus (1336)

*Decimal Form*=**Ʃ(a**_{i}x 8^{i})In this formula, 'a' is the individual digit being converted, while '

*i*' is the position of the digit counting from the right-most digit in the number, the right-most digit being position 0. (This means from the decimal point. We will get to converting octal fractions later)Here's how to do it step-by-step, using the octal number 765:

- Figure out how many digits there are in the number. 765 has 3 digits.
- Then take each digit and multiply it with 8
^{(n-1)}, where 'n' is the position of the digit from the right. So**7**will be multiplied by 8^{(3-1)}, which is 8^{2}, or 64. And 7 x 64= 448. - Similarly, you take
**6**x 8^{(2-1)}(= 48),**5**x^{(1-1)}(= 5), then add all three results to get the decimal number. So 448 + 48 + 5 = 501. - Thus (765)
_{8}= (501)_{10}

**Convert (1336)**:_{8}to decimal(1336)

_{8}= (1 x 8^{3}) + (3 x 8^{2}) + (3 x 8^{1}) + (6 x 8^{0})= (1 x 512) + (3 x 64) + (3 x 8) + (6 x 1)

= 512 + 192 + 24 + 6

= 734

Thus (1336)

_{8}= (734)_{10}**Convert (21.21)8 to Decimal**

Here we have an octal number with two digits in the decimal place, i.e., 2 and 1. While converting the fraction from octal to decimal, we

*divide*the digits after the decimal point by 8

^{m}, where 'm' is the place of the digit after the decimal.

So, when we convert the octal fraction 21.21 to decimal, we multiply any digit on the left of the decimal with the relevant power of 8, and divide any digit on the right of the decimal with the relevant power of 8.

Thus we get,

2 x 8

^{(2-1)}+ 1 x 8

^{(1-1)}+ 2 ÷ 8

^{1}+ 1 ÷ 8

^{2}

= 2 x 8 + 1 x 1 + 2 ÷ 8 + 1 ÷ 64

= 16 + 1 + 0.25 + 0.015625

= 17 + 0.265625

= 17.265625

Thus, (21.21)

_{8}= (17.265625)

_{10}

Try the steps out with the following numbers:

- I: (5467)
_{8} - II: (6345)
_{8} - III: (76534)
_{8}

**Answers:**

- I: 2871
- II: 3301
- III: 32092