Types of Complement
1's complement
The 1's complement of a number is found by changing all 1's to 0's and all 0's to 1's. This
is called as taking complement or 1's complement.
2's complement
The 2's complement of binary number is obtained by adding 1 to the Least Significant Bit
(LSB) of 1's complement of the number.
2's complement = 1's complement + 1
Types of Complement
1's complement
The 1's complement of a number is found by changing all 1's to 0's and all 0's to 1's. This
is called as taking complement or 1's complement.
2's complement
The 2's complement of binary number is obtained by adding 1 to the Least Significant Bit
(LSB) of 1's complement of the number.
2's complement = 1's complement + 1
1’s Complement
There are two different cases possible when we add two binary numbers using 1's
complement.
Case 1: Addition of the positive number with a negative number when the positive number
is greater.
Steps
1. Find the 1's complement of the given negative number.
2. Sum up with the given positive number.
3. If we get the end-around carry 1 then the number will be a positive number and the
carry bit will be add to the least significant bit (LSB) of the sum.
1’s Complement
Case 2: Addition of the positive number with a negative number when the negative
number is greater
Steps
1. We will first find the 1’s complement of the negative number.
2. Add the positive number with the 1’s complement of the negative number.
3. Now, in this case, there will be no end-around carry.
4. We will find the final result by taking the 1’s complement of the result after addition.
2’s Complement
There are two different cases possible when we add two binary numbers using 2's
complement.
Case 1: Addition of the positive number with a negative number when the positive number
is greater
Steps
1. Find the 2's complement of the given negative number.
2. Sum up with the given positive number.
3. If we get the end-around carry ‘1’ then the number will be a positive number and the
carry bit will be discarded and remaining bits are the final result.
2’s Complement
Case 2: Addition of the positive number with a negative number when the negative
number is greater.
Steps
1. Initially, add a positive value with the 2's complement value of the negative
number.
2. Here, no end-around carry is found.
3. So, we take the 2's complement of the result to get the final result.