Integer arithmetic and overflow

Machine addition and multiplication are exact modulo two to the w, so they overflow silently, and shifts multiply and divide by powers of two, with a bias needed to round negative numbers toward zero.

From Computer systems, a programmer's view.