- , .
2147483647 * 4 = 8589934588
8589934588 1 1111 1111 1111 1111 1111 1111 1111 1100
- , , , , .
The next part can be explained by two additions.
Two additions is a way of representing negative values, which are calculated by inverting all bits, and then adding one. This will result in 0011 (inverse of the last 4 bytes), and then adding one of them will cause it to be 0100, which is a binary representation of 4.
Since the sign bit is negative, this results in -4
source
share