Notice that overflow occurs only when
CARRYin ≠ CARRYout
or simply
V = Cin XOR Cout
where V is the overflow signal.