Open In App

GATE | GATE-IT-2004 | Question 41

Like Article
Like
Save
Share
Report

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:

  • both operands are positive and the result is negative, or
  • both operands are negative and the result is positive

When two unsigned numbers are added, overflow occurs if

  • there is a carry out of the leftmost bit

With these conditions only (ii) will get an overflow

Therefore, B is the answer

 

Quiz of this Question


Last Updated : 19 Nov, 2018
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads