With the help of subtraction by 2’s complement method we can easily subtract two binary numbers.
The operation is carried out by means of the following steps:
(i) At first, 2’s complement of the subtrahend is found.
(ii) Then it is added to the minuend.
(iii) If the final carry over of the sum is 1, it is dropped and the result is positive.
(iv) If there is no carry over, the two’s complement of the sum will be the result and it is negative.
The following examples on subtraction by 2’s complement will make the procedure clear:
(i) 110110 - 10110
The numbers of bits in the subtrahend is 5 while that of minuend is 6. We make the number of bits in the subtrahend equal to that of minuend by taking a `0’ in the sixth place of the subtrahend.Now, 2’s complement of 010110 is (101101 + 1) i.e.101010. Adding this with the minuend.
After dropping the carry over we get the result of subtraction to be 100000.
(ii) 10110 – 11010
2’s complement of 11010 is (00101 + 1) i.e. 00110. HenceMinued - 1 0 1 1 0
As there is no carry over, the result of subtraction is negative and is obtained by writing the 2’s complement of 11100 i.e.(00011 + 1) or 00100.
Hence the difference is – 100.
(iii) 1010.11 – 1001.01
2’s complement of 1001.01 is 0110.11. HenceMinued - 1 0 1 0 . 1 1
After dropping the carry over we get the result of subtraction as 1.10.
(iv) 10100.01 – 11011.10
2’s complement of 11011.10 is 00100.10. HenceMinued - 1 0 1 0 0 . 0 1
As there is no carry over the result of subtraction is negative and is obtained by writing the 2’s complement of 11000.11.
Hence the required result is – 00111.01.
From Subtraction by 2s Complement to HOME PAGE
Didn't find what you were looking for? Or want to know more information about Math Only Math. Use this Google Search to find what you need.
New! CommentsHave your say about what you just read! Leave me a comment in the box below. Ask a Question or Answer a Question.