Loading...
Login

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 8Decimal Value
1st8⁰1
2nd8
3rd64
4th512
5th8⁴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.

372 (octal)
= (3×64) + (7×8) + (2×1)
= 192 + 56 + 2
= 250 (decimal)

Here is a larger, 4-digit example:

1526 (octal)
= (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)

Digit is non-zero — added
Digit is 0 — skipped
64
3
8
7
1
2
0
Click Digit 1 or Auto Play to begin!
372 (octal) = 250 (decimal)
192 + 56 + 2 = 250.

More Examples

OctalWorkingDecimal
17(1×8) + (7×1)15
40(4×8) + 032
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.

Convert this octal number to decimal:

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.

100 ÷ 8 = 12 remainder 4
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:

250 ÷ 64 = 3 remainder 58  (the 64s digit is 3)
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)

100 ÷ 8 = 12 remainder 4
12 ÷ 8 = 1 remainder 4
1 ÷ 8 = 0 remainder 1
(octal so far: empty)
Click Step 1 or Auto Play to begin!
100 (decimal) = 144 (octal)
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.

Convert this decimal number to octal:

Octal and Binary

Each octal digit maps exactly to a 3-bit binary group:

OctalBinary (3-bit)
0000
3011
5101
7111
Key Points
  • 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.

Related Topics

Home About Resources Dashboard