Explore 1’s and 2’s complement in digital logic, including definitions, calculation methods, applications in subtraction, signed numbers, and binary arithmetic. Learn how to use complements efficiently in digital systems and computing.
Introduction to 1’s and 2’s Complement
In digital systems and computer arithmetic, representing negative numbers and performing subtraction efficiently is essential. 1’s and 2’s complement methods are foundational techniques used in binary arithmetic to simplify calculations and design arithmetic units in computers.
Understanding these complements is crucial for students and engineers working with digital electronics, computer architecture, and embedded systems.
What is a Complement in Binary Systems?
A complement is a binary number that, when added to the original number, yields a predetermined result:
- 1’s Complement: The inversion of all bits (0 → 1, 1 → 0).
- 2’s Complement: The 1’s complement + 1, giving a number that represents the negative value in binary arithmetic.
Purpose: Complements allow subtraction to be performed as addition, reducing hardware complexity in digital circuits and enabling signed number representation.
Note: The 1`s complement and the 2`s complement of a binary number are important because they permit the representation of negative numbers.
∴ Finding the 1`s complement:-
The 1`s complement of a binary number is found by changing all 1s to 0s and all 0s to 1s.
→ How to find 1`s complement of binary number.

∴ 1`s complement using NOT gate.

| Q). Find the 1`s complement of (10110)2 solution:- 1`s complements = 01001 |
Finding the 2`s complement
The 2`s complement of a binary number is found by adding 1 to the LSB of the 1`s complement.
∴ 2`s complement = (1`s complement) + 1
→ How find 2`s complement of binary number?

∴ Alternative way to find direct 2`s complement
- Start at the right with the LSB and write the bits as they are up to and including the first 1.
- Yake the 1`s complement of the remaining bits

In the above solution, we should write the same binary digits from right to left until we found 1, after that change the remaining bits into 1`s complement as shown above.

→ Subtraction using 1`s complement
• Step 1:- Take 1`s complement of subtrahend
• Step 2:- Add 1`s complement of subtrahend with minuend
• Step 3:- If got a carry, add the carry to its LSB. Else take 1’s complement of the result and put negative sign

Subtracting using 2`s complement
Step 1. Take 2`s complement of subtrahend
Step 2. Add 2`s complement of subtrahend with minuend
Step 3. If there is no carry , the result is negative and take the 2`s complement of above result and place negative sign in the final result.


Advantages of Using 1’s and 2’s Complement
- Simplifies binary subtraction.
- Eliminates manual borrowing in subtraction.
- Enables representation of signed numbers in binary.
- Reduces hardware complexity in digital circuits.
- 2’s complement avoids issues like two zeros problem present in 1’s complement.
Applications of 1’s and 2’s Complement
- Signed Binary Arithmetic:
- 2’s complement is standard for negative number representation.
- ALU Operations:
- Simplifies subtraction by addition in arithmetic units.
- Digital Computers and Processors:
- Used in CPU registers and binary arithmetic circuits.
- Embedded Systems:
- Reduces computation time and hardware complexity for signed arithmetic.
- Teaching & Learning:
- Essential for understanding binary arithmetic and digital logic design.
Summary Table: 1’s vs 2’s Complement
| Feature | 1’s Complement | 2’s Complement |
|---|---|---|
| Definition | Invert all bits | 1’s complement + 1 |
| Representation of Negative Numbers | Signed magnitude with end-around carry | Standard signed binary |
| Subtraction Method | End-around carry required | Direct subtraction via addition |
| Example | 1010 → 0101 | 1010 → 0101 + 1 = 0110 |
| Advantage | Easy to compute | Eliminates double zero and simplifies subtraction |
Conclusion
1’s and 2’s complement are essential techniques in binary arithmetic and digital logic design. While 1’s complement is useful for learning and basic systems, 2’s complement is the preferred method in modern computing for signed number representation and subtraction. Understanding these concepts ensures a solid foundation in computer arithmetic, digital electronics, and processor design.
Call to Action:
Practice computing 1’s and 2’s complement for multi-bit binary numbers and implement binary subtraction problems to strengthen your digital logic and arithmetic skills.
Frequently Asked Questions (FAQ)
1. What is the difference between 1’s and 2’s complement?
1’s complement inverts all bits; 2’s complement adds 1 to the 1’s complement to represent negative numbers efficiently.
2. Why is 2’s complement preferred over 1’s complement?
Because it eliminates the double zero problem and allows subtraction as addition without end-around carry.
3. How do you perform binary subtraction using 2’s complement?
Take the 2’s complement of the subtrahend and add it to the minuend. Ignore overflow beyond the word length.
4. Are complements used in decimal arithmetic?
Yes, the 9’s and 10’s complements are used in decimal arithmetic, similar to 1’s and 2’s complement in binary.
5. Where are 1’s and 2’s complement applied?
They are used in digital computers, arithmetic logic units (ALUs), microprocessors, embedded systems, and teaching arithmetic operations.
