ISRO | ISRO CS 2013 | Question 8
Which logic gate is used to detect overflow in 2’s complement arithmetic?
(A) OR gate
(B) AND gate
(C) NAND gate
(D) XOR gate
Explanation: In 2’s complement numbers, we can check whether there’s an overflow or not by taking the XOR of carry in and carry out of the most significant bit.
If XOR value = 0, then no overflow.
If XOR value = 1, then overflow.
Quiz of this Question