👁 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

Binary

Introduction to the Binary Number System

Have you ever wondered how computers understand numbers? Unlike humans who use the familiar decimal system (base 10), computers use the binary number system, which is based on only two digits: 0 and 1. This system is called base-2 because it uses two symbols to represent all numbers.

The binary system is fundamental in digital electronics and computing because electronic circuits have two states: ON and OFF, which naturally correspond to 1 and 0. Understanding binary is essential not only for computer science but also for competitive exams, especially those testing quantitative aptitude and number systems.

In this chapter, we will explore how binary numbers work, how to convert between binary and decimal systems, perform arithmetic operations in binary, and understand their applications. By the end, you will be confident in handling binary numbers and related problems.

Binary Representation and Place Value

Just like the decimal system uses digits 0 to 9 and place values based on powers of 10, the binary system uses only two digits, called bits (short for binary digits): 0 and 1.

Each bit in a binary number has a place value that is a power of 2, starting from the rightmost bit (called the least significant bit). The place values increase as you move left.

Place Values of Binary Digits
Bit Position (from right) Place Value (2n) Example Binary Digit Decimal Equivalent
0 20 = 1 1 1 x 1 = 1
1 21 = 2 0 0 x 2 = 0
2 22 = 4 1 1 x 4 = 4
3 23 = 8 1 1 x 8 = 8

For example, the binary number 1101 can be read as:

  • 1 x 23 = 8
  • 1 x 22 = 4
  • 0 x 21 = 0
  • 1 x 20 = 1

Adding these gives 8 + 4 + 0 + 1 = 13 in decimal.

Why is place value important? Because it tells us how much each digit contributes to the overall number, depending on its position.

Conversion Between Binary and Decimal

To work comfortably with binary numbers, you need to know how to convert between binary and decimal systems.

graph TD    A[Start] --> B[To convert Binary to Decimal]    B --> C[Write down the binary number]    C --> D[Multiply each bit by 2^position]    D --> E[Sum all the results]    E --> F[Decimal equivalent obtained]    A --> G[To convert Decimal to Binary]    G --> H[Divide decimal number by 2]    H --> I[Write down remainder (0 or 1)]    I --> J[Divide quotient by 2 again]    J --> K[Repeat until quotient is 0]    K --> L[Read remainders in reverse order]    L --> M[Binary equivalent obtained]

Binary to Decimal Conversion Steps

  1. Write the binary number.
  2. Starting from the right, multiply each bit by \( 2^n \), where \( n \) is the bit position starting at 0.
  3. Add all these values to get the decimal number.

Decimal to Binary Conversion Steps

  1. Divide the decimal number by 2.
  2. Write down the remainder (0 or 1).
  3. Use the quotient for the next division by 2.
  4. Repeat until the quotient becomes 0.
  5. Read the remainders in reverse order to get the binary number.
Example 1: Converting Binary 101101 to Decimal Easy
Convert the binary number 101101 into its decimal equivalent.

Step 1: Write down the place values for each bit (from right to left):

Positions: 5 4 3 2 1 0

Bits: 1 0 1 1 0 1

Place values: \( 2^5 = 32, 2^4 = 16, 2^3 = 8, 2^2 = 4, 2^1 = 2, 2^0 = 1 \)

Step 2: Multiply each bit by its place value:

  • 1 x 32 = 32
  • 0 x 16 = 0
  • 1 x 8 = 8
  • 1 x 4 = 4
  • 0 x 2 = 0
  • 1 x 1 = 1

Step 3: Add all the results:

32 + 0 + 8 + 4 + 0 + 1 = 45

Answer: The decimal equivalent of binary 101101 is 45.

Example 2: Converting Decimal 45 to Binary Easy
Convert the decimal number 45 into its binary equivalent.

Step 1: Divide 45 by 2:

45 / 2 = 22 remainder 1

Step 2: Divide 22 by 2:

22 / 2 = 11 remainder 0

Step 3: Divide 11 by 2:

11 / 2 = 5 remainder 1

Step 4: Divide 5 by 2:

5 / 2 = 2 remainder 1

Step 5: Divide 2 by 2:

2 / 2 = 1 remainder 0

Step 6: Divide 1 by 2:

1 / 2 = 0 remainder 1

Step 7: Write the remainders from bottom to top:

1 0 1 1 0 1

Answer: The binary equivalent of decimal 45 is 101101.

Binary Arithmetic Operations

Just like decimal numbers, binary numbers can be added, subtracted, multiplied, and divided. However, the rules differ slightly because binary digits are only 0 or 1.

Binary Addition Rules
A B Sum Carry
0000
0110
1010
1101
Binary Subtraction Rules
Minuend Subtrahend Difference Borrow
0000
1010
1100
0111 (borrow)

Note: Borrowing in binary means borrowing a value of 2 (since base is 2), unlike decimal where you borrow 10.

Example 3: Binary Addition of 1101 and 1011 Medium
Add the binary numbers 1101 and 1011.

Write the numbers aligned by place value:

      1 1 0 1    + 1 0 1 1    ---------    

Step 1: Add rightmost bits: 1 + 1 = 0 carry 1

Step 2: Next bits: 0 + 1 + carry 1 = 0 carry 1

Step 3: Next bits: 1 + 0 + carry 1 = 0 carry 1

Step 4: Leftmost bits: 1 + 1 + carry 1 = 1 carry 1

Step 5: Write down the carry 1 at the leftmost position.

      Carry: 1 1 1 1             1 1 0 1           + 1 0 1 1           -----------      Result:1 1 0 0 0    

Answer: The sum is 11000.

Example 4: Binary Subtraction of 10110 - 1001 Medium
Subtract binary number 1001 from 10110.

Align the numbers by place value (pad with leading zeros if needed):

      1 0 1 1 0    - 0 1 0 0 1    -----------    

Step 1: Subtract rightmost bits: 0 - 1. Cannot subtract, borrow 1 from next bit.

Borrowing means next bit reduces by 1, and current bit adds 2.

Now, 2 - 1 = 1.

Step 2: Next bit: originally 1, after borrowing becomes 0.

Subtract 0 - 0 = 0.

Step 3: Next bit: 1 - 0 = 1.

Step 4: Next bit: 0 - 1. Cannot subtract, borrow from leftmost bit.

Leftmost bit reduces from 1 to 0, current bit becomes 2.

2 - 1 = 1.

Step 5: Leftmost bit: 0 - 0 = 0.

      Result: 0 1 1 0 1    

Answer: The result of 10110 - 1001 is 1101.

Two's Complement and Signed Numbers

So far, we have dealt with positive binary numbers. But how do computers represent negative numbers? The answer lies in the two's complement system.

Two's complement allows us to represent negative numbers in binary and perform arithmetic operations seamlessly.

How to find the two's complement of a binary number?

  1. Invert all bits (change 0 to 1 and 1 to 0).
  2. Add 1 to the inverted number.
Original Binary: 01011 Invert bits: 10100 Add 1: 10101
Example 5: Finding Two's Complement of 01011 Medium
Find the two's complement of the binary number 01011.

Step 1: Invert all bits:

Original: 0 1 0 1 1

Inverted: 1 0 1 0 0

Step 2: Add 1 to the inverted number:

10100 + 1 = 10101

Answer: The two's complement of 01011 is 10101.

Key Concept

Binary Number System - Key Points

Binary uses only 0 and 1 with place values as powers of 2. Conversion between binary and decimal is essential. Binary arithmetic follows simple carry and borrow rules. Two's complement represents negative numbers.

Formula Bank

Decimal to Binary Conversion
\[ \text{Divide decimal number by 2 repeatedly and record remainders. Binary} = \text{Remainders read in reverse order} \]
where: Decimal number = N
Binary to Decimal Conversion
\[ \text{Decimal} = \sum_{i=0}^{n-1} b_i \times 2^i \]
where: \( b_i \) = binary digit at position \( i \) (0 or 1), \( n \) = number of bits
Two's Complement
\[ \text{Two's Complement} = \text{Invert all bits} + 1 \]
Binary number to be negated

Tips & Tricks

Tip: Remember that each binary digit represents an increasing power of 2 starting from the right (20, 21, 22, ...).

When to use: When converting binary to decimal.

Tip: Use repeated division by 2 and note down remainders to convert decimal to binary quickly.

When to use: When converting decimal to binary.

Tip: For binary addition, remember the carry rules: 1+1=0 carry 1, 1+1+1=1 carry 1.

When to use: When performing binary addition.

Tip: To find two's complement, invert bits and add 1 instead of subtracting directly.

When to use: When representing negative numbers in binary.

Tip: Group binary digits in sets of 3 or 4 to convert easily to octal or hexadecimal respectively.

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

Common Mistakes to Avoid

❌ Confusing the place values in binary and treating them like decimal place values.
✓ Always remember binary place values are powers of 2, not 10.
Why: Students often apply decimal system intuition to binary, leading to incorrect conversions.
❌ Forgetting to reverse the order of remainders when converting decimal to binary.
✓ Write the binary number by reading remainders from last to first.
Why: Remainders are obtained from least significant bit upwards, so reversing is necessary.
❌ Ignoring carry in binary addition leading to incorrect sums.
✓ Apply carry rules carefully for each bit addition.
Why: Carry affects the next higher bit and is crucial for accuracy.
❌ Incorrectly finding two's complement by only inverting bits without adding 1.
✓ Always add 1 after bit inversion to get two's complement.
Why: Two's complement requires both steps for correct negative representation.
❌ Mixing up binary subtraction borrowing rules with decimal subtraction.
✓ Borrowing in binary means borrowing a '2' (21), not a '10'.
Why: Binary is base 2, so borrowing logic differs from decimal.
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
Binary · 10 free messages
Ask me anything about this subtopic. You have 10 free messages this session — chat history isn't saved in preview.