The condition for overflow in the addition of two 2's complement numbers in terms of the carry generated by the two most significant bits is when carry on MSB but not From MSB, or Carry from MSB but not on MSB. i.e.,
$$C_{out} \oplus C_{n-1} = 1.$$
i.e. For overflow to happen during addition of two numbers in 2's complement form
They must have same sign and result is of opposite sign
Overflow occurs if
1. (+A) + (+B) = −C
2.(−A) + (−B) = +C
PS: Overflow is useful for signed numbers and useless for unsigned numbers