It's just a random thought. The two's complement of 100...(31 zeros) is also 100... So, the value must be 0. But we know that the binary representation of 0 is 000...
I know it can't be a -0 and a +0 b开发者_JAVA百科ecause every binary representation should map to a unique value.
It's −231. Two's complement has only a single zero and the negative range extends one number further than the positive. And yes, that means that there is a single negative number that has no positive equivalent – this is sometimes called the »weird number« since it is an exception of how two's complement numbers are built.
It's the smallest possible value: −231. It's not zero, because 100... is not zero. It's 231.
精彩评论