Open In App

GATE | GATE-IT-2004 | Question 41

Using a 4-bit 2’s complement arithmetic, which of the following additions will result in an overflow?

(i) 1100 + 1100



(ii) 0011 + 0111

(iii) 1111 + 0111
(A) (i) only
(B) (ii) only
(C) (iii) only
(D) (i) and (iii) only

Answer: (B)
Explanation: When two signed 2’s complement numbers are added, overflow is detected if:



When two unsigned numbers are added, overflow occurs if

With these conditions only (ii) will get an overflow

Therefore, B is the answer

 
Quiz of this Question

Article Tags :