integer Overflow Algorithm

some CPUs like graphics processing units (GPUs) and digital signal CPUs (DSPs) which support saturation arithmetical, overflowed outcomes would be" clamped", i.e. put to the minimum or the maximal value in the representable range, rather than wrapped around. The C11 standard states that for unsigned integers modulo wrapping is the specify behavior and the term overflow never apply:" a calculation involve unsigned operands can never overflow.

integer Overflow source code, pseudocode and analysis