Why is 2's complement called this way?

1.9k Views Asked by At

So, I'm preparing for a test and one of the preparation questions is as follows: The question at hand

I can tell easily that 'a' and 'e' are just wrong and therefore these answers are irrelevant, but taking a look at the other answers, they are all correct in their claim but I could not find which one is the actual reason for the naming.

'b' is true since negation can be done by a logical not followed with adding the constant 1. 'c' is correct as the negation is based on binary addition for example. 'd' is correct since if X had 1 in its LSB then it will have 0 after doing X+X and if it had a 0 in the LSB then it will still have 0 after doing X+X which means its an even number. Pleas correct me if I'm wrong anywhere and please let me know the origin of the name 2's complement.

1

There are 1 best solutions below

2
On BEST ANSWER

The "standard" answer is (a). Two's complement is created to preserve arithmetics in binary, so that you can add positive and negative numbers using the same ALU's. Adding the Two's complement representations of -x and x always gives the first power of 2 greater than the bit-width of the representation, thus truncating to zero.