Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Why should negative integers be stored by complement?
Why should negative integers be stored by complement?
Ok, correct it, positive integers are generally not stored in the form of complement, although it can also be said that …

Then, I know that the advantage is that the addition of negative integers and the addition of positive integers can be realized by the same principle.

If you don't understand, please add or hi me.

It's a bit troublesome to explain, so let's put it this way: (We assume that all numbers are 4 digits long)

If-1 is not stored as the completion of 2, but 100 1 (only the first digit is changed to 1), add-1+ 1 (binary 000 1) as usual.

According to the completion of 2,-1 becomes 111,plus1,because "overflow" becomes 0000, which is 0, which is reasonable.

If we insist on the completeness of 2, we must design another circuit for the addition (or subtraction) of negative numbers, which wastes resources and is unrealistic.

I don't get it yet. Please continue to add.