👁 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

Number Bases

Number Bases

We are all familiar with the decimal system, which is the standard way of writing numbers using digits 0 to 9. This system is called base 10 because it uses 10 different digits and each digit's position represents a power of 10.

But did you know that numbers can be represented in other bases as well? For example, computers use binary (base 2), which only has digits 0 and 1. Other common bases include octal (base 8) and hexadecimal (base 16). Understanding these number bases is crucial for competitive exams and fields like computer science.

In this section, we will explore how numbers are represented in different bases, how to convert between them, and how to perform arithmetic operations in these systems.

Base Representation and Place Value

Every number in any base is made up of digits, each having a place value determined by its position and the base. The rightmost digit is the least significant digit (units place), and the place value increases as we move left.

For example, consider the decimal number 345. It can be expanded as:

\[ 345 = 3 \times 10^2 + 4 \times 10^1 + 5 \times 10^0 \]

Here, the digit 3 is in the hundreds place (\(10^2\)), 4 is in the tens place (\(10^1\)), and 5 is in the units place (\(10^0\)).

Similarly, in binary (base 2), the number 1011 represents:

\[ 1011_2 = 1 \times 2^3 + 0 \times 2^2 + 1 \times 2^1 + 1 \times 2^0 \]

Calculating this gives \(8 + 0 + 2 + 1 = 11\) in decimal.

345 (Base 10) 3 x 10² 4 x 10¹ 5 x 10⁰ 1011 (Base 2) 1 x 2³ 0 x 2² 1 x 2¹ 1 x 2⁰

Base Conversion Methods

Converting numbers between bases is a common task. There are two main types of conversions:

  • From base \(n\) to decimal (base 10)
  • From decimal to base \(n\)

Let's understand the step-by-step methods for each.

graph TD    A[Start] --> B{Is number in base n?}    B -- Yes --> C[Multiply each digit by n^position]    C --> D[Sum all values]    D --> E[Decimal number obtained]    B -- No --> F[Divide decimal number by n]    F --> G[Record remainder]    G --> H{Is quotient 0?}    H -- No --> F    H -- Yes --> I[Write remainders in reverse order]    I --> J[Number in base n obtained]

From Base \(n\) to Decimal

Multiply each digit by the base raised to the power of its position (starting from 0 at the right) and add all results.

Example: Convert \(234_5\) to decimal.

\[ 234_5 = 2 \times 5^2 + 3 \times 5^1 + 4 \times 5^0 = 2 \times 25 + 3 \times 5 + 4 \times 1 = 50 + 15 + 4 = 69 \]

From Decimal to Base \(n\)

Repeatedly divide the decimal number by the target base \(n\), record the remainders, and write them in reverse order.

Example: Convert decimal 69 to base 5.

  • 69 / 5 = 13 remainder 4
  • 13 / 5 = 2 remainder 3
  • 2 / 5 = 0 remainder 2

Write remainders in reverse: \(234_5\).

Arithmetic Operations in Different Bases

Arithmetic in bases other than 10 follows the same principles as decimal arithmetic but uses the base's digit set and carry rules.

For addition and multiplication:

  • Add or multiply digits along with carry.
  • Calculate the new digit as \((a + b + \text{carry}) \bmod n\) for addition or \((a \times b + \text{carry}) \bmod n\) for multiplication.
  • Calculate the new carry as integer division by the base.
Addition and Multiplication Tables
Binary Addition 0 1
001
1110 (carry 1)
Hexadecimal Addition (Digits 0-F)
+019A (10)F (15)
0019AF
112AB10 (carry 1)
99A12 (carry 1)13 (carry 1)18 (carry 1)
Addition in Base \(n\):
\[ \text{Digit} = (a + b + \text{carry}) \bmod n, \quad \text{carry} = \left\lfloor \frac{a + b + \text{carry}}{n} \right\rfloor \]
Multiplication in Base \(n\):
\[ \text{Digit} = (a \times b + \text{carry}) \bmod n, \quad \text{carry} = \left\lfloor \frac{a \times b + \text{carry}}{n} \right\rfloor \]

Worked Examples

Example 1: Binary to Decimal Conversion of 1101 Easy
Convert the binary number \(1101_2\) to its decimal equivalent.

Step 1: Write the place values for each digit from right to left:

\(1 \times 2^3 + 1 \times 2^2 + 0 \times 2^1 + 1 \times 2^0\)

Step 2: Calculate each term:

\(1 \times 8 + 1 \times 4 + 0 \times 2 + 1 \times 1 = 8 + 4 + 0 + 1\)

Step 3: Add the results:

\(8 + 4 + 0 + 1 = 13\)

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

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

Step 1: Divide 254 by 16:

254 / 16 = 15 remainder 14

Step 2: Divide quotient 15 by 16:

15 / 16 = 0 remainder 15

Step 3: Write remainders in reverse order:

15 (F), 14 (E) -> \(FE_{16}\)

Answer: \(254_{10} = FE_{16}\)

Example 3: Addition of Octal Numbers \(157_8 + 263_8\) Medium
Add the octal numbers \(157_8\) and \(263_8\).

Step 1: Add digits from right to left, base 8:

7 + 3 = 10 decimal = 12 octal -> Write 2, carry 1

5 + 6 + 1 (carry) = 12 decimal = 14 octal -> Write 4, carry 1

1 + 2 + 1 (carry) = 4 decimal = 4 octal -> Write 4, carry 0

Step 2: Combine digits:

\(442_8\)

Answer: \(157_8 + 263_8 = 442_8\)

Example 4: Multiplying Binary Numbers \(101_2 \times 11_2\) Medium
Multiply binary numbers \(101_2\) and \(11_2\).

Step 1: Write multiplication like decimal but use binary rules:

      101
x       11
-------

Step 2: Multiply 101 by rightmost digit 1:

101

Step 3: Multiply 101 by next digit 1 (shifted one place left):

1010

Step 4: Add the two results in binary:

101 + 1010 = 1111

Answer: \(101_2 \times 11_2 = 1111_2\)

Example 5: Hexadecimal to Decimal Conversion in Data Size Hard
A computer memory size is given as \(1A3F_{16}\) bytes. Convert this to decimal and express the size in kilobytes (KB), where \(1 \text{ KB} = 1024 \text{ bytes}\).

Step 1: Convert each hex digit to decimal:

1 = 1, A = 10, 3 = 3, F = 15

Step 2: Expand using powers of 16:

\(1 \times 16^3 + 10 \times 16^2 + 3 \times 16^1 + 15 \times 16^0\)

Calculate powers:

\(1 \times 4096 + 10 \times 256 + 3 \times 16 + 15 \times 1 = 4096 + 2560 + 48 + 15\)

Step 3: Sum all:

\(4096 + 2560 = 6656\), \(6656 + 48 = 6704\), \(6704 + 15 = 6719\)

Step 4: Convert bytes to kilobytes:

\(\frac{6719}{1024} \approx 6.56 \text{ KB}\)

Answer: \(1A3F_{16} = 6719_{10}\) bytes ≈ 6.56 KB

Tips & Tricks

Tip: Memorize powers of 2, 8, and 16 up to at least \(16^3\) to speed up conversions.

When to use: During base conversion and arithmetic in binary, octal, and hexadecimal.

Tip: Use grouping of binary digits into sets of 3 (for octal) or 4 (for hexadecimal) to convert quickly without intermediate decimal conversion.

When to use: Converting between binary and octal/hexadecimal.

Tip: For addition and multiplication in any base, always perform operations digit-wise with carry, similar to decimal arithmetic.

When to use: Solving arithmetic problems in non-decimal bases.

Tip: When stuck on base conversion, convert to decimal first as an intermediate step.

When to use: Converting between two non-decimal bases.

Tip: Remember that digits in bases above 10 include letters (A=10, B=11, ..., F=15 for hex).

When to use: Working with hexadecimal numbers.

Common Mistakes to Avoid

❌ Confusing place values and treating digits as decimal values in other bases.
✓ Always multiply each digit by the base raised to the correct power before summing.
Why: Students often apply decimal intuition directly, ignoring base positional values.
❌ Ignoring carry in addition or multiplication in bases other than 10.
✓ Carry must be calculated using integer division by the base and added to the next digit operation.
Why: Carry rules differ by base but are essential for correct arithmetic.
❌ Misinterpreting letters in hexadecimal as variables or decimal digits.
✓ Remember letters A-F represent decimal values 10-15 in hex.
Why: Lack of familiarity with hexadecimal notation causes confusion.
❌ Incorrectly grouping binary digits when converting to octal or hex.
✓ Group binary digits from right to left in sets of 3 for octal and 4 for hex, adding leading zeros if needed.
Why: Improper grouping leads to wrong conversion results.
❌ Forgetting to convert intermediate results back to the target base after calculations.
✓ Ensure final answers are expressed in the required base, converting if necessary.
Why: Students sometimes leave answers in decimal unintentionally.

Formula Bank

Decimal Value of a Number in Base \(n\)
\[ N = \sum_{i=0}^{k} d_i \times n^i \]
where: \(N\) = decimal number, \(d_i\) = digit at position \(i\), \(n\) = base, \(i\) = position index starting from 0 (rightmost digit)
Conversion from Decimal to Base \(n\)
Repeated division: Divide decimal number by \(n\), record remainder; repeat with quotient until 0; remainders form the base \(n\) number
where: \(n\) = target base
Addition in Base \(n\)
\[ \text{Sum digit} = (a + b + \text{carry}) \bmod n, \quad \text{carry} = \left\lfloor \frac{a + b + \text{carry}}{n} \right\rfloor \]
where: \(a, b\) = digits, \(\text{carry}\) = carry from previous addition, \(n\) = base
Multiplication in Base \(n\)
\[ \text{Product digit} = (a \times b + \text{carry}) \bmod n, \quad \text{carry} = \left\lfloor \frac{a \times b + \text{carry}}{n} \right\rfloor \]
where: \(a, b\) = digits, \(\text{carry}\) = carry from previous multiplication, \(n\) = base
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
Number Bases · 10 free messages
Ask me anything about this subtopic. You have 10 free messages this session — chat history isn't saved in preview.