0000. But how can I find this using just these logical operators?
问题描述投票:1回答:2
I'm trying to get 1000 when overflow happens, and 0000 when it doesn't. This is easy enough since I can just use XOR with a mask to clear the last 3 bits.
Does anyone have suggestions for figuring this out?
I'm trying to use only AND OR XOR and NOT to determine whether adding 2 binary number made of 4 bits will overflow. I know, for example, that something like 1100 + 0100 will wind up as 1