GATE / CS ARCHIVE

GATE CSE 2022 / QUESTION 18

GATE CSE 2022 Q18

Digital Logic · Number Systems & Computer Arithmetic · Full GATE CSE 2022 paper

GATE 2022, Q18 1 mark · MCQ
Report issue

Number Systems & Computer Arithmetic

Question 18, GATE 2022: Four-bit registers use two's complement. Which sum overflows? A 1011+1110; B 1100+1010; C 0011+0100; D 1001+1111.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Step through it (4 options)

Four-bit two’s-complement integers range from −8 through 7. The sums in A, C, D are −7, 7,−8 and are representable. B computes −4+(−6)=−10, outside the range, so it overflows. Thus B.

Decode a bit pattern with leading 1 by subtracting 16 from its unsigned value. Thus A is −5−2=−7; B is −4−6=−10; C is 3+4=7; D is −7−1=−8. B wraps to 0110 (+6), revealing the sign reversal for a negative-plus-negative sum.

Original paper, page 14 · Answer key