GateAI
Number Representation and Arithmetic

GATE CSE 2024 Set 1 · Q13

MCQ1 markEasy

Time

Consider a system that uses 5 bits for representing signed integers in 2’s complement format. In this system, two integers AA and BB are represented as A=01010A=01010 and B=11010B=11010. Which one of the following operations will result in either an arithmetic overflow or an arithmetic underflow?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: B) A - B

Number Representation and Arithmetic

In a 5-bit 2's complement representation, the range of representable signed integers is:

[−25−1,25−1−1]=[−24,24−1]=[−16,+15][-2^{5-1}, 2^{5-1} - 1] = [-2^4, 2^4 - 1] = [-16, +15]

First, convert the binary representations of AA and BB to decimal:

  • A=010102=+(8+2)=+10A = 01010_2 = +(8 + 2) = +10

  • B=110102=−16+8+2=−6B = 11010_2 = -16 + 8 + 2 = -6

Now evaluate each option:

  • (A) A+BA + B: 10+(−6)=+410 + (-6) = +4. Since +4∈[−16,+15]+4 \in [-16, +15], no overflow/underflow occurs.

  • (B) A−BA - B: 10−(−6)=+1610 - (-6) = +16. Since +16>+15+16 > +15, this results in an arithmetic overflow.

  • (C) B−AB - A: −6−10=−16-6 - 10 = -16. Since −16∈[−16,+15]-16 \in [-16, +15], no overflow/underflow occurs.

  • **(D) 2∗B2 * B:** 2×(−6)=−122 \times (-6) = -12. Since −12∈[−16,+15]-12 \in [-16, +15], no overflow/underflow occurs.

Therefore, operation (B) results in an arithmetic overflow.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Number Representation and Arithmetic previous year question is Q13 of the GATE CSE 2024 Set 1 paper. Find more GATE CSE PYQs on Number Representation and Arithmetic in Digital Logic, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Number Representation and Arithmetic PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Number Representation and Arithmetic in GATE CSE

Number Representation and Arithmetic has 33 GATE CSE PYQs across 20 papers from 2012 to 2026. 13 of them are 1-mark MCQs like this one, and it is the only one in GATE CSE 2024 Set 1.

How GATE tests Number Representation and Arithmetic

More from GATE CSE 2024 Set 1

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2024 Set 1 · Q13 · MCQ

Consider a system that uses 5 bits for representing signed integers in 2’s complement format. In this system, two integers A and B are represented as A=01010 and B=11010. Which one of the following operations will result in either an arithmetic overflow or an arithmetic underflow?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.