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

Number System

Introduction to Number Systems

Numbers are a fundamental part of everyday life. We use numbers to count, measure, and calculate. But have you ever wondered how computers understand and work with numbers? The answer lies in number systems.

A number system is a way to represent numbers using a consistent set of symbols or digits. Different number systems use different bases or radices, which determine how many unique digits are used and how numbers are structured.

The most familiar number system is the decimal system, which uses base 10. This means it uses 10 digits (0 to 9) and each digit's position represents a power of 10. Computers, however, primarily use the binary system (base 2) because it aligns perfectly with their electronic on/off states.

Other important number systems include octal (base 8) and hexadecimal (base 16), which are often used as shorthand to represent binary numbers more compactly.

Understanding these number systems and how to convert between them is essential for anyone studying Information and Communication Technology (ICT), especially for competitive exams.

Base or Radix

The base or radix of a number system is the number of unique digits, including zero, that the system uses to represent numbers. For example:

  • Decimal (base 10) uses digits 0-9
  • Binary (base 2) uses digits 0 and 1
  • Octal (base 8) uses digits 0-7
  • Hexadecimal (base 16) uses digits 0-9 and letters A-F

Each digit's position in a number has a positional value, which is the base raised to the power of the digit's position index (starting from 0 at the rightmost digit).

Types of Number Systems

Let's explore the main number systems used in computing:

Comparison of Number Systems
Number System Base (Radix) Digits Used Example Number
Binary 2 0, 1 1011 (binary)
Octal 8 0 to 7 725 (octal)
Decimal 10 0 to 9 156 (decimal)
Hexadecimal 16 0 to 9, A to F 3F (hexadecimal)

Binary Number System (Base 2)

Binary uses only two digits: 0 and 1. Each digit is called a bit. Computers use binary because their circuits have two states: ON (1) and OFF (0). For example, the binary number 1011 represents the decimal number 11.

Octal Number System (Base 8)

Octal uses digits from 0 to 7. It is often used as a shorthand for binary because each octal digit corresponds exactly to three binary digits (bits). For example, octal 725 corresponds to a binary number.

Decimal Number System (Base 10)

This is the standard number system we use daily. It uses digits 0 through 9. Each position represents a power of 10. For example, the number 156 means \(1 \times 10^2 + 5 \times 10^1 + 6 \times 10^0\).

Hexadecimal Number System (Base 16)

Hexadecimal uses sixteen symbols: digits 0-9 and letters A-F, where A=10, B=11, ..., F=15. It is widely used in computing to represent binary data more compactly. For example, hexadecimal 3F equals decimal 63.

Conversion Methods Between Number Systems

Converting numbers between different bases is a key skill. There are two main methods:

  • Division-Remainder Method: Used to convert from decimal to another base.
  • Positional Multiplication Method: Used to convert from another base to decimal.
graph TD    A[Start with Decimal Number] --> B[Divide by Base (2,8,16)]    B --> C[Record Remainder]    C --> D{Is Quotient 0?}    D -- No --> B    D -- Yes --> E[Read Remainders Bottom to Top]    E --> F[Result: Number in New Base]    G[Start with Number in Base] --> H[Multiply Each Digit by Base^Position]    H --> I[Sum All Products]    I --> J[Result: Decimal Number]

Why read remainders from bottom to top? Because the first remainder corresponds to the least significant digit (rightmost), and the last remainder corresponds to the most significant digit (leftmost).

Arithmetic Operations in Binary

Binary arithmetic follows similar rules to decimal arithmetic but with only two digits (0 and 1). Let's look at the four basic operations:

Binary Addition

Rules for adding two binary digits:

  • 0 + 0 = 0
  • 0 + 1 = 1
  • 1 + 0 = 1
  • 1 + 1 = 10 (which is 0 with a carry of 1)
Add 1011 + 1101 1 0 1 1 + 1 1 0 1 1 1 0 0 0 = 24 (decimal)

Explanation: Adding bit by bit from right to left, carrying over when sum exceeds 1.

Binary Subtraction

Binary subtraction uses borrowing similar to decimal subtraction. When subtracting 1 from 0, borrow 1 from the next higher bit.

Binary Multiplication

Binary multiplication is like decimal multiplication but simpler:

  • 0 x 0 = 0
  • 0 x 1 = 0
  • 1 x 0 = 0
  • 1 x 1 = 1

Multiply and add partial products accordingly.

Binary Division

Binary division is similar to decimal long division but uses binary subtraction and comparison.

Worked Examples

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

Step 1: Divide 156 by 2 and record the remainder.

  • 156 / 2 = 78, remainder = 0
  • 78 / 2 = 39, remainder = 0
  • 39 / 2 = 19, remainder = 1
  • 19 / 2 = 9, remainder = 1
  • 9 / 2 = 4, remainder = 1
  • 4 / 2 = 2, remainder = 0
  • 2 / 2 = 1, remainder = 0
  • 1 / 2 = 0, remainder = 1

Step 2: Read the remainders from bottom to top:

10011100

Answer: Decimal 156 = Binary 10011100

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

Step 1: Write the binary digits with their positional powers (rightmost bit is position 0):

Positions: 5 4 3 2 1 0

Digits: 1 1 0 1 0 1

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

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

Step 3: Sum all values:

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

Answer: Binary 110101 = Decimal 53

Example 3: Add Binary Numbers 1011 and 1101 Medium
Add the binary numbers 1011 and 1101 step-by-step.

Step 1: Write the numbers aligned:

1 0 1 1

+ 1 1 0 1

Step 2: Add bit by bit from right to left, carrying over when sum ≥ 2:

  • Rightmost bit: 1 + 1 = 10 (0 carry 1)
  • Next bit: 1 + 0 + 1 (carry) = 10 (0 carry 1)
  • Next bit: 0 + 1 + 1 (carry) = 10 (0 carry 1)
  • Leftmost bit: 1 + 1 + 1 (carry) = 11 (1 carry 1)
  • Carry 1 is placed to the leftmost position.

Step 3: Write the result:

11000

Answer: 1011 + 1101 = 11000 (binary), which is 24 in decimal.

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

Step 1: Identify the digits and their decimal equivalents:

  • 3 = 3
  • F = 15 (since A=10, B=11, ..., F=15)

Step 2: Assign positional powers (rightmost digit position 0):

  • 3 x \(16^1\) = 3 x 16 = 48
  • 15 x \(16^0\) = 15 x 1 = 15

Step 3: Sum the values:

48 + 15 = 63

Answer: Hexadecimal 3F = Decimal 63

Example 5: Convert Octal 725 to Binary Medium
Convert the octal number 725 to binary by converting each digit to 3-bit binary.

Step 1: Convert each octal digit to its 3-bit binary equivalent:

  • 7 (octal) = 111 (binary)
  • 2 (octal) = 010 (binary)
  • 5 (octal) = 101 (binary)

Step 2: Combine the binary groups:

111 010 101

Answer: Octal 725 = Binary 111010101

Example 6: Subtract Binary Numbers 10110 - 1101 Hard
Perform binary subtraction of 10110 minus 1101 with borrow explanation.

Step 1: Align the numbers:

10110

-01101

Step 2: Subtract bit by bit from right to left:

  • 0 - 1: Cannot subtract 1 from 0, borrow 1 from next bit.
  • Borrow reduces the next bit by 1 and adds 2 to current bit: 2 - 1 = 1
  • Continue subtraction with borrow adjustments.

Step 3: Final result after borrowing and subtraction:

01001

Answer: 10110 - 1101 = 1001 (binary), which is 9 in decimal.

Example 7: Multiply Binary Numbers 101 x 11 Hard
Multiply binary numbers 101 and 11 stepwise.

Step 1: Write the multiplicand and multiplier:

Multiplicand: 101

Multiplier: 11

Step 2: Multiply each bit of multiplier by multiplicand, shifting left accordingly:

  • Rightmost bit (1): 101 x 1 = 101
  • Next bit (1): 101 x 1 = 101, shifted left by 1 -> 1010

Step 3: Add partial products:

101

+1010

= 1111

Answer: 101 x 11 = 1111 (binary), which is 15 in decimal.

Decimal to Other Base Conversion

\[\text{Divide decimal number by base repeatedly and record remainders; read remainders bottom to top}\]

Used to convert decimal numbers to binary, octal, or hexadecimal.

N = Decimal number

Base to Decimal Conversion

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

Sum of each digit multiplied by base raised to the digit's position.

\(d_i\) = Digit at position i
b = Base of number system
n = Number of digits

Tips & Tricks

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

When to use: To quickly convert between binary and octal/hexadecimal without full decimal conversion.

Tip: Memorize powers of 2 up to \(2^8\) (256) to speed up binary to decimal conversions.

When to use: During quick decimal conversions in exams.

Tip: Use 2's complement method for binary subtraction to avoid complex borrowing.

When to use: For faster and error-free binary subtraction.

Tip: Remember hexadecimal digits A-F correspond to decimal 10-15.

When to use: While converting hexadecimal to decimal or binary.

Tip: Practice mental conversion of small decimal numbers (0-15) to binary and hexadecimal.

When to use: For quick verification and calculations during exams.

Common Mistakes to Avoid

❌ Confusing the base of the number system during conversion (e.g., treating octal as decimal).
✓ Always identify and confirm the base before performing conversions.
Why: Overlooking the base leads to incorrect calculations and answers.
❌ Reading remainders in the wrong order during decimal to binary conversion.
✓ Remember to read remainders from bottom to top (last remainder is the most significant bit).
Why: Misunderstanding remainder order causes wrong binary representations.
❌ Incorrectly adding binary digits without carrying over.
✓ Apply binary addition rules carefully and carry over when sum exceeds 1.
Why: Using decimal addition rules in binary leads to errors.
❌ Forgetting to convert hexadecimal letters (A-F) to decimal equivalents during conversion.
✓ Map letters A-F to 10-15 before calculation.
Why: Lack of familiarity with hex digit values causes mistakes.
❌ Mixing positional values when converting numbers (e.g., using wrong powers of base).
✓ Use correct positional powers starting from 0 at the rightmost digit.
Why: Misalignment of digit positions leads to incorrect decimal values.
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 System · 10 free messages
Ask me anything about this subtopic. You have 10 free messages this session — chat history isn't saved in preview.