Why are the bits inverted in one's complement? [closed]
When storing a negative number with one's complement before you add the 1 for two's complement, why are all the bits other than the sign inverted? I suppose It would just be simpler if the only thing different was the sign. The only reason I can think of is it somehow make it easier for the computer.
Because that what one's complement is defined to do. See http://en.wikipedia.org/wiki/Signed_number_representations
See, for example, http://en.wikipedia.org/wiki/One%27s_complement, or other sources a quick google can give you. Basically, yes, it makes addition and subtraction easier to implement compared to sign magnitude numbers (though 2's complement makes maths even easier).
精彩评论