## What is an Octal Number System?

The octal number system operates on a base of 8 using the digits 0 to 7. While it was once used by some Native American tribes, it gained popularity at the beginning of the computer age due to the simplification of long binary sequences.

In octal, each digit represents three binary digits, making it a convenient abbreviation for binary code in systems divisible by three with word sizes such as 6-bit, 12-bit, 24-bit, or 36-bit architectures. While hexadecimal has largely replaced octal in modern computing, understanding octal numbers is important in electronics.

## What is a Decimal Number System?

The decimal system is the one we use every day, based on the number 10. It has 10 symbols: 0 to 9. But did you know that it has been around for ages? Ancient civilizations also used it. They ran into trouble when they really needed to represent large numbers. There came the Hindu-Arabic system.

This new system was much smarter. He ranked each digit in a number based on powers of 10. Therefore, in the number 2345.67, each digit has its own place: ones, tens, hundreds and so on. Even after the point, the digits have a special place: tenths, hundredths and beyond.

So, instead of just looking at 2345.67, we can break it down into parts by multiplying each by an appropriate power of ten. In this way, we can easily handle large numbers and decimals. Great, right?

## How to Calculate Octal to Decimal

Converting an octal number to a decimal number is quite easy. There are two main methods you can use. The first method is fairly straightforward, while the second method is a little more unique because it uses an inverted version of the repeated section and the rest of the algorithm.

**Method 1:**

- Count the number of digits in an octal number.
- Visualize the position of each digit as its significance, increasing from right to left by powers of 8.
- Multiply each digit by its corresponding power of 8 and add the results to get the decimal equivalent.

For example, let’s take the octal number (765)_{8} and convert it using this method.

```
Step 1: This octal number has 3 digits.
Step 2: n is 3.
Step 3: 5 is in position 1, so n-1 will be equal to 0. This will lead to 80
6 is in position 2, so n-1 will be 1. This will lead to 81;
7 is in position 3, so n-1 will be 2. This will lead to 82.
Step 4: (5 * 80) + (6 * 81) + (7 * 82)
Step 5: 5 + 48 + 448 = 501
Step 6: (501)10 equals (765)8
```

**Method 2:**

- Start with a result of 0.
- Take each digit of the octal number starting from the left side one by one.
- Add each digit to the result.
- After adding the digits, multiply the result by 8 to prepare the next addition.
- Continue doing this until you have added all the digits.
- Once you have added the last digit, simply add it to the previous result without multiplying and that is your decimal equivalent.

Let’s run this method with the same octal number, (765)_{8}.

```
Step 1: Write down 0.
Step 2: Remove 7 (the leftmost digit) and add it to 0, which is 0 + 7 = 7.
Step 3: Multiply the result by 8, which is 7 * 8 = 56.
Step 4: In the octal number (765)8, the leftmost digit is now 6. Add 6 to 56 and multiply the result by 8, which follows as: (6 + 56) * 8 = 496.
Step 5: In the octal number (765)8, we are only left with the digit 5. Therefore; 496 + 5 = 501.
Step 6: (501)10 equals (765)8
```

**Example 1: (345)8 = (229)10**

```
Method 1:
(5 * 80) + (4 * 81) + (3 * 82) = 5 + 32 + 192 = 229
Method 2:
0 + 3 = 3
3 * 8 = 24
24 + 4 = 28
28 * 8 = 224
224 + 5 = 229
```

**Example 2: (2675)8 = (1469)10**

```
Method 1:
(5 * 80) + (7 * 81) + (6 * 82) + (2 * 83) = 5 + 56 + 384 + 1024 = 1469
Method 2:
0 + 2 = 2
2 * 8 = 16
16 + 6 = 22
22 * 8 = 176
176 + 7 = 183
183 * 8 = 1464
1464 + 5 = 1469
```

## How To Convert From Octal to Decimal

A regular decimal number is the sum of the digits multiplied by 10n.

**Example #1**

137 in base 10 is equal to each digit multiplied by its corresponding 10n:

13710 = 1×102+3×101+7×100 = 100+30+7

Octal numbers are read the same way, but each digit counts 8n instead of 10n.

Multiply each digit of the hex number with its corresponding 8n.

**Example #2**

37 in base 8 is equal to each digit multiplied with its corresponding 8n:

378 = 3×81+7×80 = 24+7 = 31

**Example #3**

7014 in base 8 is equal to each digit multiplied with its corresponding power of 8:

70148 = 7×83+0×82+1×81+4×80= 3584+0+8+4 = 3596

**Octal to Decimal Conversion Table**

In the table below, we have listed the decimal equivalents of the smallest non-negative octal numbers down to 100.

08 = 010 | 18 = 110 | 28 = 210 |

38 = 310 | 48 = 410 | 58 = 510 |

68 = 610 | 78 = 710 | 108 = 810 |

118 = 910 | 128 = 1010 | 138 = 1110 |

148 = 1210 | 158 = 1310 | 168 = 1410 |

178 = 1510 | 208 = 1610 | 218 = 1710 |

228 = 1810 | 238 = 1910 | 248 = 2010 |

258 = 2110 | 268 = 2210 | 278 = 2310 |

308 = 2410 | 318 = 2510 | 328 = 2610 |

338 = 2710 | 348 = 2810 | 358 = 2910 |

368 = 3010 | 378 = 3110 | 408 = 3210 |

418 = 3310 | 428 = 3410 | 438 = 3510 |

448 = 3610 | 458 = 3710 | 468 = 3810 |

478 = 3910 | 508 = 4010 | 518 = 4110 |

528 = 4210 | 538 = 4310 | 548 = 4410 |

558 = 4510 | 568 = 4610 | 578 = 4710 |

608 = 4810 | 618 = 4910 | 628 = 5010 |

638 = 5110 | 648 = 5210 | 658 = 5310 |

668 = 5410 | 678 = 5510 | 708 = 5610 |

718 = 5710 | 728 = 5810 | 738 = 5910 |

748 = 6010 | 758 = 6110 | 768 = 6210 |

778 = 6310 | 1008 = 6410 | 1018 = 6510 |

1028 = 6610 | 1038 = 6710 | 1048 = 6810 |

1058 = 6910 | 1068 = 7010 | 1078 = 7110 |

1108 = 7210 | 1118 = 7310 | 1128 = 7410 |

1138 = 7510 | 1148 = 7610 | 1158 = 7710 |

1168 = 7810 | 1178 = 7910 | 1208 = 8010 |

1218 = 8110 | 1228 = 8210 | 1238 = 8310 |

1248 = 8410 | 1258 = 8510 | 1268 = 8610 |

1278 = 8710 | 1308 = 8810 | 1318 = 8910 |

1328 = 9010 | 1338 = 9110 | 1348 = 9210 |

1358 = 9310 | 1368 = 9410 | 1378 = 9510 |

1408 = 9610 | 1418 = 9710 | 1428 = 9810 |

1438 = 9910 | 1448 = 10010 |

## Convert Octal to Decimal Worked Examples

1) Convert 275 from octal to decimal.

Step 1) Write down the place value of each digit.

8^{2} | 8^{1} | 8^{0} |
---|---|---|

64 | 8 | 1 |

2 | 7 | 5 |

Step 2) Add up the place value of each digit.

```
(2 x 64) + (7 x 8) + (5 x 1)
= 128 + 56 + 5 = 189
```

So 275 in octal is equal to 189.

2) Convert 3250 from octal into decimal.

Step 1) Write down the place value of each digit.

8^{3} | 8^{2} | 8^{1} | 8^{0} |
---|---|---|---|

512 | 64 | 8 | 1 |

3 | 2 | 5 | 0 |

Step 2) Add up the place value of each digit.

```
(3 x 512) + (2 x 64) + (5 x 8) + (0 x 1)
1536 + 128 + 40 + 0 = 1704
```

So 3250 in octal is equal to 1704.

## Convert Decimal to Octal Worked Examples

Example 1) Convert 139 from decimal to octal.

**Step 1) Look at what octal place values we need.**

The powers of 8 are 1, 8, 64, 512, 4096, …

Our value is just 139, so the powers of 8 we need are 1, 8 and 64 (up to 8^{2}).

**Step 2) Divide 139 by the highest place value number.**

So we now divide 139 by 64 = 2 r. 11

The quotient tells us what number goes into with the place value of 64, which is 2.

8^{2} | 8^{1} | 8^{0} |
---|---|---|

64 | 8 | 1 |

2 | ? | ? |

**Step 3) We now divide the remainder by the next (lower) power of 8.**

So we have 11 ÷ 8 = 1 r. 3

The quotient us what number goes with the place value of 8, which is 1.

8^{2} | 8^{1} | 8^{0} |
---|---|---|

64 | 8 | 1 |

2 | 1 | ? |

**Step 4) Divide the remainder by the next (lower) power of 8.**

So we have 3 ÷ 1 = 3

This tells us which number goes with the place value of 1s which is 3.

8^{2} | 8^{1} | 8^{0} |
---|---|---|

64 | 8 | 1 |

2 | 1 | 3 |

**Step 5) Put your place value parts together.**

Our number 139 = (**2** x 64) + (**1** x 8) + (**3** x 1).

So our octal answer is 213.

Example 2) Convert 946 from decimal to octal.

Step 1) Look at what octal place values we need.

The powers of 8 are 1, 8, 64, 512, 4096, …

Our value is just 946, so the powers of 8 we need are 1, 8, 64, and 512(up to 8^{3}).

Step 2) Divide 946 by the highest place value number.

So we now divide 946 by 512 = 1 r. 434

The quotient tells us what number goes into the place value of 512, which is 1.

8^{3} | 8^{2} | 8^{1} | 8^{0} |
---|---|---|---|

512 | 64 | 8 | 1 |

1 | ? | ? | ? |

Step 3) We now divide the remainder by the next (lower) power of 8.

So we have 434 ÷ 64 = 6 r. 50

The quotient is what number goes with the place value of 64, which is 6.

8^{3} | 8^{2} | 8^{1} | 8^{0} |
---|---|---|---|

512 | 64 | 8 | 1 |

1 | 6 | ? | ? |

Step 4) We now divide the remainder by the next (lower) power of 8.

So we have 50 ÷ 8 = 6 r. 2

The quotient is what number goes with the place value of 8, which is 6.

8^{3} | 8^{2} | 8^{1} | 8^{0} |
---|---|---|---|

512 | 64 | 8 | 1 |

1 | 6 | 6 | ? |

Step 5) We now divide the remainder by the next (lower) power of 8.

So we have 2 ÷ 1 = 2

The quotient us what number goes with the place value of 1s, which is 2.

8^{3} | 8^{2} | 8^{1} | 8^{0} |
---|---|---|---|

512 | 64 | 8 | 1 |

1 | 6 | 6 | 2 |

Step 6) Put your place value parts together.

Our number 946 = (**1** x 512) + (**6** x 64) + (**6** x 8) + (**2** x 1).

So our octal answer is 1662.

## FAQs – Questions & Answers

### Q: How can you tell if a number is octal or decimal?

A: Just by looking at the number, you cannot tell whether it is octal or decimal, unless it is marked with a special prefix. For octal numbers, the prefix “0o” is commonly used, especially in computer contexts.

### Q: When do you need to convert an octal number to a regular decimal number?

A: If you are working with older computer systems that use base 8 you may need to convert octal numbers to decimals yourself, but you want to understand the numbers in the more familiar decimal format.