Integer overflow in a twos-complement system
If you add one to a long variable containing the value 2147483647, it overflows and becomes the erroneous value -2147483648.
This is a characteristic of the twos-complement binary number system.
Integer overflow in the positive direction wraps around to the negative side.
Similarly integer overflow (or should I say underflow) in the negative direction wraps around to the positive side.