Mathwords logoMathwords

Octal (Base 8) — Definition, Formula & Examples

Octal (base 8) is a number system that uses only the digits 0 through 7, where each place value represents a power of 8 instead of a power of 10.

The octal numeral system is a positional notation system with radix 8. A number written as dndn1d1d0d_n d_{n-1} \dots d_1 d_0 in base 8 represents the value dn8n+dn18n1++d181+d080d_n \cdot 8^n + d_{n-1} \cdot 8^{n-1} + \cdots + d_1 \cdot 8^1 + d_0 \cdot 8^0, where each digit di{0,1,2,3,4,5,6,7}d_i \in \{0, 1, 2, 3, 4, 5, 6, 7\}.

Key Formula

Value=dn8n+dn18n1++d181+d080\text{Value} = d_n \cdot 8^n + d_{n-1} \cdot 8^{n-1} + \cdots + d_1 \cdot 8^1 + d_0 \cdot 8^0
Where:
  • did_i = The digit in position i (must be 0–7)
  • 8i8^i = The place value of position i

How It Works

In our everyday base-10 system, place values go 1, 10, 100, 1000, and so on. In octal, place values go 1, 8, 64, 512, and so on — each one is 8 times the previous. You never use the digits 8 or 9 in octal, since reaching 8 units causes a carry to the next place. For example, counting in octal goes 5, 6, 7, 10, 11, 12 — the octal number 10 equals the decimal number 8. To convert from octal to decimal, multiply each digit by its place value and add the results together.

Worked Example

Problem: Convert the octal number 253₈ to decimal.
Step 1: Identify each digit and its place value.
282+581+3802 \cdot 8^2 + 5 \cdot 8^1 + 3 \cdot 8^0
Step 2: Compute each term.
264+58+31=128+40+32 \cdot 64 + 5 \cdot 8 + 3 \cdot 1 = 128 + 40 + 3
Step 3: Add the results.
128+40+3=171128 + 40 + 3 = 171
Answer: 253₈ = 171 in decimal.

Why It Matters

Octal is widely used in computing because each octal digit corresponds exactly to three binary digits, making it a shorthand for binary. Unix and Linux file permissions are expressed in octal notation, so understanding base 8 is practical for anyone learning computer science.

Common Mistakes

Mistake: Using the digits 8 or 9 in an octal number.
Correction: Octal only allows digits 0 through 7. If you see an 8 or 9, the number is not valid in base 8.