GateAI
Number Representation and Arithmetic

GATE CSE 2019 · Q8

MCQ1 markEasy

Time

Consider Z=X−YZ = X - Y, where XX, YY and ZZ are all in sign-magnitude form. XX and YY are each represented in nn bits. To avoid overflow, the representation of ZZ would require a minimum of:

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: C) n + 1 bits

Number Representation and Arithmetic

In an nn-bit sign-magnitude representation:

  • 11 bit is used for the sign.

  • (n−1)(n-1) bits are used for the magnitude.

  • The range of values represented by nn bits is [−(2n−1−1),+(2n−1−1)][-(2^{n-1} - 1), +(2^{n-1} - 1)].

For Z=X−YZ = X - Y:

  • The maximum possible value is:

    Zmax⁡=Xmax⁡−Ymin⁡=(2n−1−1)−(−(2n−1−1))=2(2n−1−1)=2n−2Z_{\max} = X_{\max} - Y_{\min} = (2^{n-1} - 1) - (-(2^{n-1} - 1)) = 2(2^{n-1} - 1) = 2^n - 2
  • The minimum possible value is:

    Zmin⁡=Xmin⁡−Ymax⁡=−(2n−1−1)−(2n−1−1)=−(2n−2)Z_{\min} = X_{\min} - Y_{\max} = -(2^{n-1} - 1) - (2^{n-1} - 1) = -(2^n - 2)

To represent values up to magnitude 2n−22^n - 2 in sign-magnitude form:

  • We need kk magnitude bits such that 2k−1≥2n−22^k - 1 \ge 2^n - 2, which gives k=nk = n magnitude bits.

  • Adding 11 bit for the sign gives a total of n+1n + 1 bits.

Thus, the representation of ZZ requires a minimum of n+1n + 1 bits.

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 Q8 of the GATE CSE 2019 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 GATE CSE 2019 has 2.

How GATE tests Number Representation and Arithmetic

More from GATE CSE 2019

Share this solution

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

GateAI solution cardGATE CSE 2019 · Q8 · MCQ

Consider Z = X - Y, where X, Y and Z are all in sign-magnitude form. X and Y are each represented in n bits. To avoid overflow, the representation of Z would require a minimum of:

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.