When two’s complement numbers are added, which condition reliably indicates signed overflow?
Correct answer C. The carry into the sign bit differs from the carry out of the sign bit
Overflow is flagged as V = C(in to MSB) XOR C(out of MSB); equivalently, two operands of the same sign give a result of the opposite sign. A carry out of the MSB alone is normal in two's complement: -1 + -1 produces a carry out yet the answer -2 is correct. The carry flag signals unsigned overflow, while the V flag signals signed overflow.
Answer checked How we write and check questions
Discussion