👁 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 System
Study mode

Arithmetic in Different Bases

Introduction to Arithmetic in Different Bases

Numbers are the foundation of mathematics, and the way we represent numbers depends on the number base or radix. The base of a number system tells us how many unique digits, including zero, are used to represent numbers. For example, the familiar decimal system uses base 10, meaning digits range from 0 to 9.

But why do we use different bases? Different bases have practical applications in computing, digital electronics, and coding theory. For instance, computers use binary (base 2) because their circuitry has two states: ON and OFF. Octal (base 8) and hexadecimal (base 16) are compact ways to represent binary numbers more efficiently.

Understanding arithmetic in different bases is crucial for competitive exams, especially in sections involving number systems and logical reasoning. This chapter will guide you through how numbers are represented in various bases and how to perform arithmetic operations like addition, subtraction, multiplication, and division in these systems.

Number Bases and Base Representation

Every number system is defined by its base b. In base b, digits range from 0 to b - 1. Each digit's position represents a power of the base, starting from the rightmost digit (least significant digit) at power 0.

For example, the number \( 243 \) in base 10 (decimal) means:

\[2 \times 10^2 + 4 \times 10^1 + 3 \times 10^0 = 200 + 40 + 3 = 243\]

This positional value concept applies to all bases.

Place Values in Different Bases for a 4-Digit Number
Digit Position Base 2 (Binary) Base 8 (Octal) Base 10 (Decimal) Base 16 (Hexadecimal)
3 (leftmost) \( 2^3 = 8 \) \( 8^3 = 512 \) \( 10^3 = 1000 \) \( 16^3 = 4096 \)
2 \( 2^2 = 4 \) \( 8^2 = 64 \) \( 10^2 = 100 \) \( 16^2 = 256 \)
1 \( 2^1 = 2 \) \( 8^1 = 8 \) \( 10^1 = 10 \) \( 16^1 = 16 \)
0 (rightmost) \( 2^0 = 1 \) \( 8^0 = 1 \) \( 10^0 = 1 \) \( 16^0 = 1 \)

Note that in hexadecimal, digits go beyond 9 and include letters A to F representing 10 to 15.

Base Conversion Methods

Converting numbers between bases is essential to understand arithmetic in different bases. Two main methods are used:

  • From base \(b\) to decimal: Use the positional value expansion.
  • From decimal to base \(b\): Use repeated division by \(b\) and collect remainders.
graph TD    A[Start: Number in base b] --> B[Expand using positional values]    B --> C[Calculate sum to get decimal number]    C --> D[Decimal number obtained]    E[Start: Decimal number] --> F[Divide by base b]    F --> G[Record remainder]    G --> H[Divide quotient by base b again]    H --> I{Quotient = 0?}    I -- No --> F    I -- Yes --> J[Read remainders in reverse order]    J --> K[Number in base b obtained]

This flowchart shows the two-way conversion process clearly.

Addition and Subtraction in Different Bases

Arithmetic operations in different bases follow similar rules as decimal arithmetic but with adjustments for the base.

Addition

When adding two digits, if the sum equals or exceeds the base, a carry is generated to the next higher place value. For example, in base 8 (octal), digits range from 0 to 7. If the sum of two digits is 8 or more, subtract 8 and carry 1 to the next digit.

Add: 3568 + 4728 Step 1: Add units place (6 + 2 = 8) Since 8 ≥ 8, write 0 and carry 1 Step 2: Add tens place (5 + 7 + 1 carry = 13) 13 - 8 = 5, carry 1 Result so far: ? ? 0 Step 3: Add hundreds place (3 + 4 + 1 carry = 8) 8 - 8 = 0, carry 1 Final carry 1 added to next place Final sum: 1 0 5 08

Subtraction

Subtraction in base \(b\) requires borrowing when the digit being subtracted is larger than the digit it is subtracted from. Borrowing reduces the next higher digit by 1 and adds \(b\) to the current digit.

Multiplication and Division in Different Bases

Multiplication and division follow the same principles as decimal arithmetic but require knowledge of multiplication tables in the given base.

  • Multiplication: Multiply digits, carry over as needed, and add partial products.
  • Division: Use repeated subtraction or long division, comparing multiples of the divisor in the base.

Memorizing multiplication tables for bases like 2, 8, and 16 helps speed up calculations.

Modular Arithmetic and Congruence

Modular arithmetic involves working with remainders after division by a fixed number called the modulus. It is denoted as:

\[a \equiv b \pmod{m}\]

This means \(a\) and \(b\) leave the same remainder when divided by \(m\).

Modular arithmetic is widely used in number theory and competitive exams for solving congruences, cryptography, and simplifying large calculations.

graph TD    A[Start with numbers a, b and modulus m] --> B[Calculate a mod m]    B --> C[Calculate b mod m]    C --> D[Perform operation (add, subtract, multiply)]    D --> E[Take result mod m]    E --> F[Final result modulo m]
Key Formulas:
Modular Addition: \((a + b) \mod m = ((a \mod m) + (b \mod m)) \mod m\)
Modular Multiplication: \((a \times b) \mod m = ((a \mod m) \times (b \mod m)) \mod m\)

Worked Examples

Example 1: Addition of Two Hexadecimal Numbers Medium
Add \(2A3_{16}\) and \(1F4_{16}\).

Step 1: Write digits and add from right to left.

Digits: \(2A3\) and \(1F4\)

Rightmost digit: \(3 + 4 = 7\) (less than 16, no carry)

Next digit: \(A_{16} = 10\), \(F_{16} = 15\), sum \(10 + 15 = 25\)

Since \(25 \geq 16\), subtract 16: \(25 - 16 = 9\), carry 1 to next digit.

Leftmost digit: \(2 + 1 + 1 (carry) = 4\)

Answer: \(497_{16}\)

2 A 3 + 1 F 4 Carry: 1 Sum: 4 9 7
Example 2: Conversion of Binary Number to Decimal Easy
Convert binary number \(1101_2\) to decimal.

Step 1: Identify place values from right to left:

Digit1101
Place Value\(2^3=8\)\(2^2=4\)\(2^1=2\)\(2^0=1\)
Calculation1 x 8 = 81 x 4 = 40 x 2 = 01 x 1 = 1

Step 2: Sum all values: \(8 + 4 + 0 + 1 = 13\)

Answer: \(1101_2 = 13_{10}\)

Example 3: Subtraction in Octal System Medium
Subtract \(346_8\) from \(725_8\).

Step 1: Write numbers aligned by place value:

7 2 5

- 3 4 6

Step 2: Subtract units place: \(5 - 6\) is not possible, borrow 1 from tens place.

Borrowing 1 in base 8 adds 8 to units place: \(5 + 8 = 13\)

Units place subtraction: \(13 - 6 = 7\)

Tens place after borrowing: \(2 - 1 = 1\)

Subtract tens place: \(1 - 4\) not possible, borrow 1 from hundreds place.

Borrowing 1 adds 8 to tens place: \(1 + 8 = 9\)

Tens place subtraction: \(9 - 4 = 5\)

Hundreds place after borrowing: \(7 - 1 = 6\)

Subtract hundreds place: \(6 - 3 = 3\)

Answer: \(357_8\)

7 2 5 -3 4 6 Borrow 1 from tens to units (5 + 8 = 13) Borrow 1 from hundreds to tens (1 + 8 = 9) Result: 3 5 7
Example 4: Multiplication of Two Binary Numbers Medium
Multiply \(1011_2\) by \(110_2\).

Step 1: Write the multiplicand and multiplier:

Multiplicand: 1011 (decimal 11)

Multiplier: 110 (decimal 6)

Step 2: Multiply each digit of multiplier by multiplicand, shifting left for each digit:

  • Rightmost digit (0): \(1011 \times 0 = 0\)
  • Next digit (1): \(1011 \times 1 = 1011\), shift left by 1 -> \(10110\)
  • Leftmost digit (1): \(1011 \times 1 = 1011\), shift left by 2 -> \(101100\)

Step 3: Add partial products:

0 + 10110 + 101100

Adding:

      000000     +010110     +101100     --------      111010    

Answer: \(111010_2\) (decimal 66)

Example 5: Solving a Modular Arithmetic Problem Hard
Solve for \(x\) in the congruence \(7x \equiv 3 \pmod{11}\).

Step 1: Find the modular inverse of 7 modulo 11.

We want \(7 \times y \equiv 1 \pmod{11}\).

Check multiples of 7 mod 11:

  • 7 x 1 = 7 mod 11
  • 7 x 2 = 14 ≡ 3 mod 11
  • 7 x 3 = 21 ≡ 10 mod 11
  • 7 x 8 = 56 ≡ 1 mod 11

So, the modular inverse of 7 mod 11 is 8.

Step 2: Multiply both sides of original congruence by 8:

\[ 8 \times 7x \equiv 8 \times 3 \pmod{11} \] \[ (8 \times 7) x \equiv 24 \pmod{11} \] \[ 1 \times x \equiv 24 \pmod{11} \] \[ x \equiv 24 \pmod{11} \]

Since \(24 \mod 11 = 2\),

Answer: \(x \equiv 2 \pmod{11}\)

Decimal Value of a Number in Base b

\[N = \sum_{i=0}^{n-1} d_i \times b^i\]

To convert a number from base b to decimal

N = decimal number
\(d_i\) = digit at position i
b = base
n = number of digits

Conversion from Decimal to Base b

\[Repeated\ division:\ N \div b = q,\ remainder = r;\ digits\ are\ remainders\ read\ in\ reverse\]

To convert a decimal number to base b

N = decimal number
b = base
q = quotient
r = remainder

Modular Addition

\[(a + b) \mod m = ((a \mod m) + (b \mod m)) \mod m\]

To perform addition under modulo m

a, b = integers
m = modulus

Modular Multiplication

\[(a \times b) \mod m = ((a \mod m) \times (b \mod m)) \mod m\]

To perform multiplication under modulo m

a, b = integers
m = modulus

Tips & Tricks

Tip: Memorize multiplication tables for bases 2, 8, and 16.

When to use: To speed up multiplication and division in non-decimal bases during exams.

Tip: Use the repeated division-remainder method for converting decimal numbers to any base.

When to use: For quick and accurate base conversions without confusion.

Tip: Convert numbers to decimal first if arithmetic in the given base seems complex.

When to use: When unsure about direct arithmetic in a base, convert, calculate, then convert back.

Tip: Use modular arithmetic properties to simplify large number calculations.

When to use: In problems involving large numbers or congruences in competitive exams.

Tip: Remember that digits in base \(b\) range from 0 to \(b-1\).

When to use: To avoid invalid digit errors during arithmetic or conversion.

Common Mistakes to Avoid

❌ Using decimal carry rules directly in other bases.
✓ Apply carry rules based on the base; carry occurs when sum exceeds base - 1.
Why: Carry depends on the base, not decimal 10. For example, in base 8, carry occurs at 8, not 10.
❌ Using digits outside the valid range for a base (e.g., digit 9 in base 8).
✓ Ensure digits are within 0 to \(b-1\) for base \(b\).
Why: Invalid digits cause incorrect calculations and confusion.
❌ Skipping intermediate steps during base conversion.
✓ Perform all steps carefully, especially place value calculations.
Why: Rushing leads to errors and wrong answers.
❌ Confusing modular addition with normal addition.
✓ Always reduce the result modulo \(m\) after addition or multiplication.
Why: Modulo operation keeps results within the modulus range, essential for correctness.
❌ Forgetting to reverse remainders when converting decimal to other bases.
✓ Write remainders in reverse order to get the correct number.
Why: Remainders are generated from least significant digit upwards.
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
Arithmetic in Different Bases · 10 free messages
Ask me anything about this subtopic. You have 10 free messages this session — chat history isn't saved in preview.