3 ms·
A couple of things that are special about 2s compliment - There are no redundant numbers like -0 - Adding two integers together in this format works with nega
by gridspy 3y ago
A couple of things that are special about 2s compliment
- There are no redundant numbers like -0
- Adding two integers together in this format works with negative and positive numbers with no special case.
-1 is actually 0xFF or 0xFFFF etc. So 0xFF + 0x01 (-1 + 1) "overflows" to 0.