Digital circuit - adder and subtractor
In 2's-complement (signed) arithmetic, the MSB of each number is its sign (1 indicates negative values).

Therefore, you have four possibilities for the result of an addition (or subtraction) operation:


Cout = 0, MSB = 0 &mdash; normal positive result (no overflow)
Cout = 0, MSB = 1 &mdash; positive overflow
Cout = 1, MSB = 1 &mdash; normal negative result (no overflow)
Cout = 1, MSB = 0 &mdash; negative overflow


In other words, as long as Cout and the MSB match, you have a good result, no overflow. Whenever they don't match, you experienced an overflow.