One (slightly humorous) way of thinking about signed mathematicians is to admit that the most significant bit does represent an infinite number of bits above it. Thus, in a 16-bit signed number, the most significant bit is 32768 + 65536 + 131072 + 262144 + ... etc. which is 32768 * (1 + 2 + 4 + 8 + ...) Using the standard formula for the power series, (1 + X + X ^ 2 + X ^ 3 + ...) = 1 / (1-X), it turns out that (1 + 2 + 4 + 8 + ...) is -1, so the sum of all these bits is -32768.
source share