Two's Complement: Addition Overflow?
问题 I am trying to add 24 to 10 in 2's complement. I found 24 in 2's complement to be: 011000 and 10 in 2's complement to be 001010. When I add the two together I get: 100010. The result is a negative number. Is this an example of overflow? Is it not possible to add 24 to 10 in 2's complement? 回答1: If you only have 6 bits, then yes, it is an overflow. The reason is that 6-bit 2's complement can only store numbers -32..31 and your desired result, 34 , is outside that range. If you had, say, 8 bits