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
GATE CSE 2019 · Q8
Time
Select one answerSingle correct
Solution
Official answer: C) n + 1 bits
Number Representation and ArithmeticIn an -bit sign-magnitude representation:
bit is used for the sign.
bits are used for the magnitude.
The range of values represented by bits is .
For :
The maximum possible value is:
The minimum possible value is:
To represent values up to magnitude in sign-magnitude form:
We need magnitude bits such that , which gives magnitude bits.
Adding bit for the sign gives a total of bits.
Thus, the representation of requires a minimum of bits.
Try the question first, then check your work.
Examiner trap
Find the maximum and minimum values of given the range of -bit sign-magnitude numbers.
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
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.
An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.
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 ArithmeticIndependent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.