Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
1’s and 2’s Complements<br />
Subtraction of a number from another can be accomplished by adding the complement of the subtrahend to the minuend.<br />I...
1’s Complement Subtraction<br />Subtraction of binary numbers using the 1’s complement method allows subtraction only by a...
The 1’s complement of a binary number can be obtained by changing all 1s to 0s and all 0s and 1s.<br />Cont.,<br />
To subtract a smaller number from a larger number, the 1’s complement method is as follows<br />1’s complement method<br /...
Subtract (1010)2 from (1111)2<br />Example of 1’s complement<br />1’s complement method<br />Direct Subtraction<br />1   1...
Subtraction of a large number a smaller one by the 1’s complement method involves the following steps<br />Subtraction Ste...
2’s Complement Subtraction<br />The 2’s complement of a binary number can be obtained by adding 1 to its 1’s complement.<b...
Subtraction of a smaller number from a larger one by the 2’s complement method involves the following steps<br />Steps<br ...
Example of 2’s complement<br />Subtract (1010)2 from (1111)2<br />2’s complement method<br />Direct Subtraction<br />1   1...
The carry is discarded. Thus answer is (0101)2<br />The 2’s complement  method for subtraction of a large number from a sm...
Comparison between 1’s and 2’s complements<br />
….. Thank You ……<br />The End<br />
Upcoming SlideShare
Loading in …5
×

1s and 2s complement

77,273 views

Published on

This presentation has the details about 1's and 2's complement.

1s and 2s complement

  1. 1. 1’s and 2’s Complements<br />
  2. 2. Subtraction of a number from another can be accomplished by adding the complement of the subtrahend to the minuend.<br />Introduction<br />
  3. 3. 1’s Complement Subtraction<br />Subtraction of binary numbers using the 1’s complement method allows subtraction only by addition.<br />
  4. 4. The 1’s complement of a binary number can be obtained by changing all 1s to 0s and all 0s and 1s.<br />Cont.,<br />
  5. 5. To subtract a smaller number from a larger number, the 1’s complement method is as follows<br />1’s complement method<br />Determine the 1’s complement of the smaller number. <br /> Add this to the larger number<br /> Remove the carry and add it to the result. This carry is called end-around-carry<br />
  6. 6. Subtract (1010)2 from (1111)2<br />Example of 1’s complement<br />1’s complement method<br />Direct Subtraction<br />1 1 1 1<br />1’s complement<br />0 1 0 1<br />1 1 1 1<br />1 0 1 0<br />Carry<br />0<br />0<br />1<br />1 0<br />1<br />0<br />1<br />0<br />1<br />Add Carry<br />1<br />0<br />1<br />0<br />
  7. 7. Subtraction of a large number a smaller one by the 1’s complement method involves the following steps<br />Subtraction Steps<br />Determine the 1’s complement of a large number<br />Add this to the smaller number<br />The answer is the 1’s complement of the result and is opposite in sign. There is no carry.<br />
  8. 8. 2’s Complement Subtraction<br />The 2’s complement of a binary number can be obtained by adding 1 to its 1’s complement.<br />
  9. 9. Subtraction of a smaller number from a larger one by the 2’s complement method involves the following steps<br />Steps<br /> Determine the 2’s complement of the smaller number<br /> Add this to the larger number<br /> Omit the carry ( there is always a carry in this case )<br />
  10. 10. Example of 2’s complement<br />Subtract (1010)2 from (1111)2<br />2’s complement method<br />Direct Subtraction<br />1 1 1 1<br />1 1 1 1<br />0 1 1 0<br />2’s complement<br />1 0 1 0<br />1<br />1 0<br />0<br />1<br />0<br />Carry<br />1<br />0<br />1<br />
  11. 11. The carry is discarded. Thus answer is (0101)2<br />The 2’s complement method for subtraction of a large number from a smaller one is as follows.<br />Subtraction Steps<br />Determine the 2’s complement of the larger number<br />Add the 2’s complement to the smaller number<br />There is no carry . The result is in 2’s complement form is negative<br />To get an answer in true form, take the 2’s complement and change the sign.<br />
  12. 12. Comparison between 1’s and 2’s complements<br />
  13. 13. ….. Thank You ……<br />The End<br />

×