Octal Number System
Base-8, octal to binary and decimal conversion.
Unix file permissions, PDP-11 instruction encodings, and legacy BIOS codes all relied on octal — the base-8 number system that groups binary digits in threes, making large binary numbers far easier to read for engineers working with 12-bit and 18-bit word-length machines.
Core Concept
The octal number system uses base 8 with digits 0 through 7. Each digit represents exactly three binary bits. This one-to-three correspondence makes octal a compact shorthand for binary — group binary bits from the right in sets of three, pad the leftmost group with leading zeros if needed, and replace each group with its octal digit.
Positional weight follows the standard rule: each digit position carries a power of 8. The rightmost digit has weight 8⁰ = 1, the next has 8¹ = 8, then 8² = 64, 8³ = 512, and so on. To convert octal to decimal, multiply each digit by its positional weight and sum. The notation (375)₈ means (3×64) + (7×8) + (5×1) = 192 + 56 + 5 = (253)₁₀.
Octal appears in Unix/Linux file permission codes (chmod 755 = rwxr-xr-x), PDP-11 minicomputer assembly language, and legacy CDC 6600 supercomputer programming where 60-bit words divided neatly into 20 octal digits. Modern systems prefer hexadecimal because 8-bit bytes group into two hex digits, but octal remains in the GATE syllabus and in Unix system programming.
Boolean Expression
The value of an n-digit octal number dₙ₋₁ dₙ₋₂ ... d₁ d₀ is given by N = Σ dᵢ × 8ⁱ for i from 0 to n-1. For octal-to-binary conversion, each digit dᵢ expands to exactly three bits: d=0→000, d=1→001, ..., d=7→111. For binary-to-octal, partition binary digits into groups of three from the LSB, pad the MSB group with zeros, and convert each group.
Given:
Convert (10111010110)₂ to octal, then to decimal
Formula / Rule:
Binary to Octal: group bits in 3s from right, convert each group
Octal to Decimal: N = d₂×8² + d₁×8¹ + d₀×8⁰
Step by step:
Binary: 10111010110
Group from right (pad left with 0): 010 | 111 | 010 | 110
Convert each group:
010 → 2
111 → 7
010 → 2
110 → 6
Octal result: (2726)₈
Octal to decimal:
(2726)₈ = 2×8³ + 7×8² + 2×8¹ + 6×8⁰
= 2×512 + 7×64 + 2×8 + 6×1
= 1024 + 448 + 16 + 6
= 1494
Final Answer:
(10111010110)₂ = (2726)₈ = (1494)₁₀
Verify: 1494 in binary = 10111010110 ✓Exam Tip: The most common GATE error in octal conversion is grouping bits from the left instead of the right. Always start grouping from the LSB (rightmost bit). For octal-to-hexadecimal, convert octal→binary→hex (group the binary bits in 4s from the right for hex). Never try to convert octal directly to hex without going through binary — there is no simple direct digit mapping. Also note that octal digits go only 0-7; digit 8 or 9 does not exist in octal.
Key Properties
- Base: 8; valid digits: 0, 1, 2, 3, 4, 5, 6, 7 — digits 8 and 9 do not exist in octal
- Each octal digit = exactly 3 binary bits — the 1-to-3 mapping makes binary↔octal conversion trivial
- Positional weights: 8⁰=1, 8¹=8, 8²=64, 8³=512, 8⁴=4096, 8⁵=32768
- Maximum n-digit octal value: 8ⁿ - 1 (e.g., 3 digits max = 777₈ = 511₁₀)
- Unix chmod uses 3 octal digits: owner | group | others (e.g., 755 = rwxr-xr-x)
- Octal → hex: convert to binary first, then regroup in 4s — no direct digit shortcut
- Notation: prefix 0 in C/C++ (e.g., 0755), subscript 8 in textbooks (e.g., 375₈), or suffix O in some assemblers
Quick Revision
- Octal = base 8; digits 0-7; each digit = 3 binary bits
- Binary → octal: group bits in 3s from LSB, pad left group with zeros, convert each group
- Octal → binary: replace each digit with its exact 3-bit binary code
- Octal → decimal: multiply each digit by 8ⁱ (i = position from right, starting at 0)
- Decimal → octal: repeatedly divide by 8, collect remainders from bottom to top
- Real-world use: Unix file permissions (chmod), PDP-11 ISA, CDC mainframes
- Exam trap: grouping binary bits from the MSB (left) instead of LSB (right) gives a wrong octal result
Octal Number System
Test your ability to convert between octal, binary, and decimal number systems.
Q1.The octal number 357 converted to decimal is:
Related Articles
Number System Conversions
Direct methods between binary, octal, decimal, hex.
8 min read
Signed Number Representation
Sign magnitude, 1s complement, 2s complement, range.
10 min read
Binary Addition
Rules of binary addition, carry propagation.
11 min read
Binary Subtraction
Direct subtraction and complement methods.
8 min read
BCD Code
Binary coded decimal, valid and invalid BCD, BCD addition.
12 min read