Why is it that when the binary integer becomes negative, you need to add +1 on the inverse for example, if the negative of 1 is -1, -1 +1, the result is 0, so let’s do it in binary, the binary of 1 is 0001, the binary of 0 is 0000,
Now if I take the binary of 1 and invert it, 1110(what happens if I take this as the binary of -1),
If 1110 is -1, then after +1, the result should be 0000, which is 0 in base 10,
1110 plus 1 is 1111
When the inverse code is directly used for calculation, it is found that this is not the case, but becomes 1111. When 1111 is added by 1 again, due to the binary carry, all 1’s meet the requirements of 2 and become 0, and those over 4 bits are discarded. At this time, the binary becomes 0000, and the negative number is added by one more step.
And when 0001 becomes inverse code 1110, directly +1, becomes 1111,
And then when we use 1111 plus 1, it naturally goes to 0,
That’s why the inverse code needs to be +1 when a binary integer becomes negative,
To convert a natural binary negative to a positive number, you need to do the +1 process backwards,
1111 minus 1 is 1110
Then 1110 goes the other way and becomes 0001, which is a positive number.