Convert between octal, decimal, binary, and hexadecimal. Perform octal arithmetic with step-by-step results.
The octal numeral system (base‑8) uses digits from 0 to 7. It is often used in computing as a compact representation of binary because each octal digit corresponds to exactly three binary digits (bits).
| Octal | Binary | Decimal |
|---|---|---|
| 0 | 000 | 0 |
| 1 | 001 | 1 |
| 2 | 010 | 2 |
| 3 | 011 | 3 |
| 4 | 100 | 4 |
| 5 | 101 | 5 |
| 6 | 110 | 6 |
| 7 | 111 | 7 |
Place values: In octal, each position represents a power of 8.
… 8³ (512) , 8² (64) , 8¹ (8) , 8⁰ (1) , 8⁻¹ (0.125) , 8⁻² (0.015625) …
Octal → Decimal: Multiply each digit by its place value and sum. For fractional part, use negative powers.
345₈ = 3×8² + 4×8¹ + 5×8⁰ = 192 + 32 + 5 = 229₁₀
Decimal → Octal: Repeatedly divide by 8, reading remainders from last to first. For fractions, multiply by 8 repeatedly.
Octal ↔ Binary: Each octal digit expands to exactly 3 binary bits (group from right).
345₈ = 011 100 101₂ = 11100101₂ Octal ↔ Hexadecimal: Usually convert via binary or decimal as intermediate.
Addition and subtraction work similarly to decimal, but you carry/borrow when a digit exceeds 7. For example:
3 4 5₈
+ 1 2 3₈
-------
4 7 0₈ 5 6₈
× 7₈
-----
5 1 2₈ Another addition example with carries:
7 7 7₈
+ 1 1 1₈
-------
1 1 1 0₈
The word “octal” comes from Latin octo (eight). Octal was widely used in early computers like the PDP-8 (1960s) because it simplified binary display. Today, its most common application is in Unix/Linux file permissions (e.g., chmod 755), where each octal digit represents read/write/execute permissions for owner, group, and others.
Calculator features: