👁 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

Base Conversion

Introduction to Number Bases and Base Conversion

Numbers are the language of mathematics and daily life. Most of us are familiar with the decimal system, which uses ten digits (0 to 9) to represent numbers. But did you know that numbers can be represented in different bases or radices? A number base defines how many unique digits, including zero, a number system uses to represent numbers.

For example, the decimal system is base 10 because it uses 10 digits. The binary system is base 2, using only digits 0 and 1. Other common bases include octal (base 8) and hexadecimal (base 16). Different bases are important in fields like computer science, digital electronics, and cryptography because computers operate using binary, but humans find decimal easier to understand.

In this chapter, you will learn how to convert numbers between these bases, understand the logic behind each system, and master techniques to switch from one base to another efficiently-skills essential for competitive exams and practical applications.

Understanding Number Bases

Every number system uses a positional notation, meaning the position of each digit determines its value. The value of a digit depends on the base and its position, counted from right to left starting at zero.

For example, in the decimal number 345:

  • The digit 5 is in the 0th position (units place) and represents \(5 \times 10^0 = 5\).
  • The digit 4 is in the 1st position (tens place) and represents \(4 \times 10^1 = 40\).
  • The digit 3 is in the 2nd position (hundreds place) and represents \(3 \times 10^2 = 300\).

The total value is the sum of these: \(300 + 40 + 5 = 345\).

This principle applies to all bases. The base tells us the number of digits and the value of each position.

Place Values in Different Bases (up to 4 places)
Position (from right) Decimal (Base 10) Binary (Base 2) Octal (Base 8) Hexadecimal (Base 16)
0 100 = 1 20 = 1 80 = 1 160 = 1
1 101 = 10 21 = 2 81 = 8 161 = 16
2 102 = 100 22 = 4 82 = 64 162 = 256
3 103 = 1000 23 = 8 83 = 512 163 = 4096

Notice how place values increase exponentially with the base. This is why the same digit in different bases represents different values.

Key Concept

Positional Notation in Number Bases

The value of each digit depends on its position and the base, calculated as digit x base^position.

Decimal to Other Bases Conversion

To convert a decimal number (base 10) to another base such as binary (base 2), octal (base 8), or hexadecimal (base 16), we use the division-remainder method. This method involves repeatedly dividing the decimal number by the target base and recording the remainders.

Why does this work? Because dividing by the base extracts the least significant digit (rightmost digit) in that base, and the remainders collected in reverse order form the converted number.

graph TD    Start[Start with decimal number N]    Divide[Divide N by base b]    Remainder[Record remainder r]    Update[Update N = quotient of division]    Check{Is N = 0?}    End[Write remainders in reverse order]    Start --> Divide    Divide --> Remainder    Remainder --> Update    Update --> Check    Check -- No --> Divide    Check -- Yes --> End

Follow these steps:

  1. Divide the decimal number by the new base.
  2. Write down the remainder.
  3. Replace the decimal number with the quotient.
  4. Repeat until the quotient is zero.
  5. The converted number is the remainders read from bottom to top (last remainder is the most significant digit).

Other Bases to Decimal Conversion

To convert a number from binary, octal, or hexadecimal to decimal, use the positional value method. Multiply each digit by its base raised to the power of its position (starting from 0 on the right) and sum all these values.

For example, to convert hexadecimal 2F to decimal:

Hexadecimal number: 2 F = (2 x 161) + (15 x 160) = (2 x 16) + (15 x 1) = 32 + 15 = 47 (decimal) 2 F

Note: In hexadecimal, digits 10 to 15 are represented by letters A to F.

Base to Base Conversion

Sometimes you need to convert directly between two non-decimal bases, such as binary to octal or binary to hexadecimal. There are two main methods:

  • Convert via decimal: Convert the original number to decimal, then convert decimal to the target base.
  • Grouping method: Use the fact that bases 8 and 16 are powers of 2 (octal is \(2^3\), hexadecimal is \(2^4\)). Group binary digits in sets of 3 or 4 from right to left, then convert each group to the corresponding octal or hexadecimal digit.
Binary Groupings for Octal and Hexadecimal
Base Group Size Example Binary Group Equivalent Digit
Octal (Base 8) 3 bits 101 5
Hexadecimal (Base 16) 4 bits 1101 D (13 decimal)

This method is faster and avoids intermediate decimal conversion.

Worked Examples

Example 1: Convert Decimal 156 to Binary Easy
Convert the decimal number 156 into binary using the division-remainder method.

Step 1: Divide 156 by 2.

156 / 2 = 78, remainder = 0

Step 2: Divide 78 by 2.

78 / 2 = 39, remainder = 0

Step 3: Divide 39 by 2.

39 / 2 = 19, remainder = 1

Step 4: Divide 19 by 2.

19 / 2 = 9, remainder = 1

Step 5: Divide 9 by 2.

9 / 2 = 4, remainder = 1

Step 6: Divide 4 by 2.

4 / 2 = 2, remainder = 0

Step 7: Divide 2 by 2.

2 / 2 = 1, remainder = 0

Step 8: Divide 1 by 2.

1 / 2 = 0, remainder = 1 (stop here)

Step 9: Write remainders from last to first:

1 0 0 1 1 1 0 0

Answer: \(156_{10} = 10011100_2\)

Example 2: Convert Binary 110101 to Decimal Easy
Convert the binary number 110101 to decimal using positional values.

Step 1: Write the binary digits with their positions:

Positions (right to left): 0 1 2 3 4 5

Digits: 1 1 0 1 0 1

Step 2: Calculate each digit x \(2^{position}\):

  • \(1 \times 2^5 = 1 \times 32 = 32\)
  • \(1 \times 2^4 = 1 \times 16 = 16\)
  • \(0 \times 2^3 = 0\)
  • \(1 \times 2^2 = 1 \times 4 = 4\)
  • \(0 \times 2^1 = 0\)
  • \(1 \times 2^0 = 1 \times 1 = 1\)

Step 3: Sum all values:

32 + 16 + 0 + 4 + 0 + 1 = 53

Answer: \(110101_2 = 53_{10}\)

Example 3: Convert Hexadecimal 2F to Decimal Medium
Convert the hexadecimal number 2F to decimal.

Step 1: Identify the digits and their decimal equivalents:

2 = 2, F = 15

Step 2: Assign positions from right (0) to left:

F at position 0, 2 at position 1

Step 3: Calculate each digit x \(16^{position}\):

  • \(2 \times 16^1 = 2 \times 16 = 32\)
  • \(15 \times 16^0 = 15 \times 1 = 15\)

Step 4: Sum the values:

32 + 15 = 47

Answer: \(2F_{16} = 47_{10}\)

Example 4: Convert Binary 101101 to Octal Medium
Convert the binary number 101101 to octal using the grouping method.

Step 1: Group binary digits in sets of 3 from right to left:

101 101

Step 2: Convert each group to decimal (octal digit):

  • 101 = \(1 \times 2^2 + 0 \times 2^1 + 1 \times 2^0 = 4 + 0 + 1 = 5\)
  • 101 = 5 (same calculation)

Step 3: Write the octal number:

55

Answer: \(101101_2 = 55_8\)

Example 5: Convert Octal 725 to Hexadecimal Hard
Convert the octal number 725 to hexadecimal.

Step 1: Convert octal 725 to decimal.

Positions: 5 at 0, 2 at 1, 7 at 2

\(7 \times 8^2 + 2 \times 8^1 + 5 \times 8^0 = 7 \times 64 + 2 \times 8 + 5 \times 1 = 448 + 16 + 5 = 469\)

Step 2: Convert decimal 469 to hexadecimal using division-remainder method.

  • 469 / 16 = 29 remainder 5
  • 29 / 16 = 1 remainder 13 (D in hex)
  • 1 / 16 = 0 remainder 1

Step 3: Write remainders from last to first:

1 D 5

Answer: \(725_8 = 1D5_{16}\)

Base-n to Decimal Conversion

\[N = \sum_{i=0}^{k} d_i \times b^i\]

Sum of each digit times base raised to its position

N = Decimal equivalent
\(d_i\) = Digit at position i
b = Base
k = Highest position index

Division-Remainder Method

\[Repeatedly divide decimal number by base b, collect remainders r_i; number in base b is r_k r_{k-1} ... r_0\]

Used to convert decimal to any other base

\(r_i\) = Remainder at ith division step

Tips & Tricks

Tip: Group binary digits in sets of 3 for octal and 4 for hexadecimal conversions.

When to use: When converting binary numbers directly to octal or hexadecimal to speed up the process.

Tip: Memorize hexadecimal digits 10-15 as A-F.

When to use: When working with hexadecimal numbers to quickly identify digit values and avoid confusion.

Tip: Use the division-remainder method for decimal to any base conversion.

When to use: When converting decimal numbers to binary, octal, or hexadecimal efficiently.

Tip: Convert to decimal as an intermediate step for base-to-base conversions.

When to use: When direct base-to-base conversion is complex or unknown, especially for bases without simple grouping relations.

Tip: Remember place values increase from right to left starting at 0.

When to use: For all positional number system conversions to avoid miscalculations.

Common Mistakes to Avoid

❌ Confusing the order of remainders in the division-remainder method.
✓ Write remainders from last division to first to get the correct number.
Why: Students often read remainders in the order they are obtained, reversing the number and getting wrong results.
❌ Misinterpreting hexadecimal digits beyond 9.
✓ Remember A=10, B=11, C=12, D=13, E=14, F=15.
Why: Lack of familiarity with hexadecimal digit values leads to errors in conversion and arithmetic.
❌ Incorrect grouping of binary digits when converting to octal or hexadecimal.
✓ Always group from right to left in sets of 3 (octal) or 4 (hexadecimal).
Why: Grouping from left or incorrect group size causes wrong conversion results.
❌ Forgetting to multiply digits by the correct power of the base during conversion.
✓ Use positional indices starting from 0 on the right and increase leftwards.
Why: Misalignment of powers leads to incorrect decimal values.
❌ Mixing up bases during calculations.
✓ Clearly note the base of each number before performing operations.
Why: Confusion between bases causes wrong arithmetic and conversions.
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
Base Conversion · 10 free messages
Ask me anything about this subtopic. You have 10 free messages this session — chat history isn't saved in preview.