Successfully reported this slideshow.
Upcoming SlideShare
×

# 1s and 2s complement

77,273 views

Published on

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

• Full Name
Comment goes here.

Are you sure you want to Yes No
• The #1 Woodworking Resource With Over 16,000 Plans, Download 50 FREE Plans...  http://ishbv.com/tedsplans/pdf

Are you sure you want to  Yes  No

Are you sure you want to  Yes  No
• in the comparison part,how come 1's complement require 2 operations and 2's complement require ly 1 operation?

Are you sure you want to  Yes  No
• it will help me more...

Are you sure you want to  Yes  No
• thankyou.....

Are you sure you want to  Yes  No

### 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 />