Math Fundamentals18 sections · 814 units
Open in Course

Octal System

Base-8 basics

Octal (base-8) uses eight digits: 0 through 7. Each octal digit represents 3 binary bits. Octal was popular in older systems because 3 bits fit neatly into machine words.

The octal number 345 means 3×82+4×81+5×80=192+32+5=2293 \times 8^2 + 4 \times 8^1 + 5 \times 8^0 = 192 + 32 + 5 = 229 in decimal. To convert binary to octal, group bits by threes instead of fours.

Today, octal is rare. Hex dominates because 4 bits align with bytes (8 bits = 2 hex digits). You will see octal in Unix file permissions (755, 644) and legacy code, but hex is standard everywhere else.