Octal Number System
The octal number system (base 8) uses eight digits: 0, 1, 2, 3, 4, 5, 6, 7. Place values are powers of 8. Octal was historically used in computing because it groups binary digits into sets of three, making binary much easier to read.
Octal has a long history in computing. Many early computers, including the PDP-8 and several IBM mainframes of the 1960s, used word sizes that were multiples of 3 bits (such as 12, 24, or 36 bits), which made octal a natural, compact way to display binary data on the printouts and control panels of the time. Octal even shows up outside computing: the Yuki people of Northern California traditionally counted using the eight spaces between their fingers rather than the fingers themselves, giving them a naturally base-8 number system long before computers existed.
Today, octal has mostly been replaced by hexadecimal for general computing use, because modern computers store data in 8-bit bytes, and hexadecimal's 4-bit digits divide evenly into a byte while octal's 3-bit digits do not. Octal has not disappeared, though: it remains the standard way to write Unix and Linux file permissions — a command like chmod 755 sets read, write, and execute permissions using octal digits — and it still appears in some programming languages and older systems built around 3-bit-aligned data.
Octal Place Values
| Place (from right) | Power of 8 | Decimal Value |
|---|---|---|
| 1st | 8⁰ | 1 |
| 2nd | 8¹ | 8 |
| 3rd | 8² | 64 |
| 4th | 8³ | 512 |
| 5th | 8⁴ | 4,096 |
Converting Octal to Decimal
Just like binary, every octal number is a sum of place values in disguise. Each digit sits in a place worth a power of 8, so to convert octal to decimal you multiply every digit by the value of its place, then add all the results together. Because octal digits already run from 0 to 7, there is no letter conversion to worry about — you are always working with the digits you can already see.
= (3×64) + (7×8) + (2×1)
= 192 + 56 + 2
= 250 (decimal)
Here is a larger, 4-digit example:
= (1×512) + (5×64) + (2×8) + (6×1)
= 512 + 320 + 16 + 6
= 854 (decimal)
See It Animated: Octal to Decimal
Click through each digit below, in order, to watch its place value join the running total. A new random number is generated each time you load this page or press Reset.
Converting372 (octal)
192 + 56 + 2 = 250.
More Examples
| Octal | Working | Decimal |
|---|---|---|
| 17 | (1×8) + (7×1) | 15 |
| 40 | (4×8) + 0 | 32 |
| 100 | (1×64) | 64 |
| 777 | (7×64)+(7×8)+(7×1) | 511 |
Practice: Octal to Decimal
Convert the octal number below into decimal. If you get it wrong (or leave it blank), we'll walk through the correct answer with you, one digit at a time.
Converting Decimal to Octal
To convert the other way, divide repeatedly by 8 and keep track of each remainder. Every remainder you get is automatically between 0 and 7 (since you're dividing by 8), which is exactly the range of a single octal digit. As with binary, the first remainder you calculate is the last digit of the answer, so once the division reaches 0, you read the remainders back in reverse — from bottom to top.
12 ÷ 8 = 1 remainder 4
1 ÷ 8 = 0 remainder 1
Read remainders bottom to top: 100 (decimal) = 144 (octal)
You can also work top-down by dividing by each place value directly, which mirrors the place value table above:
58 ÷ 8 = 7 remainder 2 (the 8s digit is 7)
2 ÷ 1 = 2 remainder 0 (the 1s digit is 2)
250 (decimal) = 372 (octal)
See It Animated: Decimal to Octal
Click through each division step below, and watch the octal answer assemble itself — each new remainder joins the front of the answer, since the first remainder you find is actually the last digit. A new random number is generated each time you load this page or press Reset.
Converting100 (decimal)
Reading the remainders from bottom to top gives 144.
Practice: Decimal to Octal
Convert the decimal number below into octal. If you get it wrong (or leave it blank), we'll divide by 8 together, step by step, until we reach the correct answer.
Octal and Binary
Each octal digit maps exactly to a 3-bit binary group:
| Octal | Binary (3-bit) |
|---|---|
| 0 | 000 |
| 3 | 011 |
| 5 | 101 |
| 7 | 111 |
- Octal uses digits 0–7; there is no digit 8 or 9 in octal.
- Place values are powers of 8: 1, 8, 64, 512, …
- Octal is often used in Unix file permissions.
- Converting octal ↔ binary: group binary digits in threes from the right.
Summary
The octal number system extends place value thinking to a base-8 framework. Because one octal digit equals exactly three binary digits, octal provides a compact shorthand for binary. Although hexadecimal has largely replaced octal in modern computing, octal remains important in Unix/Linux file permission notation and certain programming contexts.
