👁 Preview — Study, Practice and Revise are open; mock tests and the rest of the syllabus unlock on subscription. Unlock all · ₹4,999
← Back to Number Systems & Logic
Study mode

Octal

Introduction to the Octal Number System

The octal number system is a base-8 numeral system that uses eight distinct digits: 0, 1, 2, 3, 4, 5, 6, and 7. Unlike the familiar decimal system, which is base-10, octal counts in powers of eight. This system has played an important role in the history of computing and remains relevant in computer aptitude tests and competitive exams.

Why is octal important? Early computers often used binary (base-2) internally, but binary numbers can become long and difficult to read. Octal offers a more compact way to represent binary numbers because each octal digit corresponds exactly to three binary digits. This makes conversions between binary and octal straightforward and less error-prone.

In this chapter, we will explore the basics of octal numbers, how to convert between octal, decimal, and binary systems, perform arithmetic operations in octal, and understand its applications in computing.

Octal Number System Basics

The octal system is based on powers of 8. Each digit in an octal number represents a value multiplied by a power of 8, depending on its position. The rightmost digit is multiplied by \(8^0\), the next by \(8^1\), then \(8^2\), and so on.

For example, the octal number 157 can be expanded as:

\(1 \times 8^2 + 5 \times 8^1 + 7 \times 8^0\)

To understand this better, let's compare place values in octal, decimal, and binary for the first few positions:

Position (from right) Octal Place Value Decimal Equivalent Binary Place Value
0 \(8^0\) 1 \(2^0 = 1\)
1 \(8^1\) 8 \(2^1 = 2\)
2 \(8^2\) 64 \(2^2 = 4\)
3 \(8^3\) 512 \(2^3 = 8\)

Key point: Octal digits range only from 0 to 7. Any digit 8 or 9 is invalid in octal.

Key Concept

Octal Number System

Base-8 system using digits 0 to 7, with place values as powers of 8.

Conversion Between Octal and Decimal

Understanding how to convert between octal and decimal is fundamental. There are two main methods:

Octal to Decimal Conversion

Use the positional notation method: multiply each octal digit by \(8^{position}\) and sum all results.

Decimal to Octal Conversion

Use the repeated division-remainder method: divide the decimal number by 8 repeatedly and collect the remainders. The octal number is formed by reading the remainders from bottom to top.

graph TD    A[Start] --> B{Convert Octal to Decimal?}    B -- Yes --> C[Multiply each digit by 8^position]    C --> D[Sum all products]    D --> E[Decimal Result]    B -- No --> F{Convert Decimal to Octal?}    F -- Yes --> G[Divide decimal by 8]    G --> H[Record remainder]    H --> I{Is quotient zero?}    I -- No --> G    I -- Yes --> J[Read remainders bottom to top]    J --> K[Octal Result]

Conversion Between Octal and Binary

Because 8 is \(2^3\), each octal digit corresponds exactly to three binary digits (bits). This makes conversions very straightforward:

  • Octal to Binary: Replace each octal digit with its 3-bit binary equivalent.
  • Binary to Octal: Group binary digits in sets of three (starting from the right), then convert each group to the corresponding octal digit.
Octal Digit Binary Equivalent (3 bits)
0000
1001
2010
3011
4100
5101
6110
7111
Key Concept

Octal-Binary Relationship

Each octal digit maps to exactly 3 binary bits, enabling easy conversion.

Worked Examples

Example 1: Convert Octal 157 to Decimal Easy
Convert the octal number 157 to its decimal equivalent.

Step 1: Identify the place values:

From right to left: \(7 \times 8^0\), \(5 \times 8^1\), \(1 \times 8^2\)

Step 2: Calculate each term:

\(7 \times 1 = 7\)

\(5 \times 8 = 40\)

\(1 \times 64 = 64\)

Step 3: Add the results:

\(64 + 40 + 7 = 111\)

Answer: Octal 157 = Decimal 111

Example 2: Convert Decimal 125 to Octal Easy
Convert the decimal number 125 to its octal equivalent.

Step 1: Divide 125 by 8:

125 / 8 = 15 remainder 5

Step 2: Divide 15 by 8:

15 / 8 = 1 remainder 7

Step 3: Divide 1 by 8:

1 / 8 = 0 remainder 1

Step 4: Write remainders from bottom to top:

1 7 5

Answer: Decimal 125 = Octal 175

Example 3: Convert Octal 345 to Binary Medium
Convert the octal number 345 to its binary equivalent.

Step 1: Write each octal digit and its 3-bit binary equivalent:

3 -> 011

4 -> 100

5 -> 101

Step 2: Combine all binary groups:

011 100 101

Answer: Octal 345 = Binary 011100101 (or simply 11100101)

Example 4: Add Octal Numbers 27 + 35 Medium
Add the octal numbers 27 and 35.

Step 1: Write the numbers aligned by place value:

2 7

+ 3 5

Step 2: Add the rightmost digits (units place):

7 + 5 = 12 (decimal)

Since octal digits max at 7, convert 12 decimal to octal:

12 decimal = 14 octal (1 carry, 4 remainder)

Write 4 and carry 1 to the next column.

Step 3: Add the left digits plus carry:

2 + 3 + 1 (carry) = 6

Step 4: Write the result digits:

6 (left) and 4 (right)

Answer: 27 + 35 = 64 (octal)

Example 5: Subtract Octal Numbers 54 - 26 Medium
Subtract the octal number 26 from 54.

Step 1: Write the numbers aligned:

5 4

- 2 6

Step 2: Subtract units place:

4 - 6 is not possible, so borrow 1 from the 5 (which is 8 in octal).

5 becomes 4, and 4 becomes 4 + 8 = 12 (decimal)

Now, 12 - 6 = 6 (octal digit)

Step 3: Subtract tens place:

4 - 2 = 2

Answer: 54 - 26 = 26 (octal)

Formula Bank

Octal to Decimal Conversion
\[ D = \sum_{i=0}^{n-1} d_i \times 8^i \]
where: \(D\) = decimal number, \(d_i\) = digit at position \(i\) (from right, starting at 0), \(n\) = number of digits
Decimal to Octal Conversion
Repeated division by 8; octal digits are remainders collected bottom to top
No variables; process-based formula
Octal to Binary Conversion
Each octal digit \(d_i \rightarrow\) 3-bit binary equivalent
where: \(d_i\) = octal digit
Binary to Octal Conversion
Group binary digits in sets of 3 from right to left, convert each group to octal digit
Binary digits grouped in 3s

Tips & Tricks

Tip: Remember that each octal digit corresponds exactly to 3 binary bits.

When to use: When converting between octal and binary for quick and error-free conversion.

Tip: Use repeated division by 8 for decimal to octal conversion instead of memorizing place values.

When to use: When converting large decimal numbers to octal efficiently.

Tip: Group binary digits in sets of three starting from the right for binary to octal conversion.

When to use: To simplify binary to octal conversion and avoid mistakes.

Tip: For octal addition, remember that carry occurs when sum ≥ 8, not 10.

When to use: During octal arithmetic operations to avoid incorrect carries.

Tip: Practice converting small numbers frequently to build intuition.

When to use: To improve speed and accuracy in competitive exams.

Common Mistakes to Avoid

❌ Treating octal digits as decimal digits during addition or subtraction.
✓ Remember that octal digits range from 0 to 7 and carry occurs at 8, not 10.
Why: Students often confuse octal base with decimal base, leading to incorrect carries.
❌ Incorrect grouping of binary digits when converting to octal.
✓ Always group binary digits in sets of three starting from the right, adding leading zeros if necessary.
Why: Misalignment leads to wrong octal digits.
❌ Forgetting to multiply each octal digit by the correct power of 8 during conversion to decimal.
✓ Use positional notation carefully, starting from the rightmost digit as power 0.
Why: Skipping or miscalculating powers leads to wrong decimal values.
❌ Using decimal place values when converting octal to decimal.
✓ Always use powers of 8, not powers of 10, for place values in octal.
Why: Confusion between number systems causes errors.
❌ Not converting intermediate binary numbers correctly when converting between octal and decimal.
✓ Use direct conversion methods or verify binary-octal mappings carefully.
Why: Intermediate step errors propagate to final answer.
Curated videos per subtopic
Top YouTube explainers, AI-ranked for your exam and language. Unlocks with subscription.
Unlock

Try Practice next.

Progress tracking is paywalled — subscribe to mark subtopics as understood and save your streak.

Go to practice →
Ask a doubt
Octal · 10 free messages
Ask me anything about this subtopic. You have 10 free messages this session — chat history isn't saved in preview.