GateAI
Number Representation and Arithmetic

GATE CSE 2016 Set 2 · Q9

NAT1 markEasy

Time

Let XX be the number of distinct 16-bit integers in 2’s complement representation. Let YY be the number of distinct 16-bit integers in sign magnitude representation. Then X−YX - Y is __________.

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 1

Number Representation and Arithmetic

For an nn-bit representation (n=16n = 16):

  1. 2's Complement Representation:

    • Range: −2n−1-2^{n-1} to 2n−1−12^{n-1}-1, which is −32768-32768 to +32767+32767.

    • Zero has a unique representation (0000 0000 0000 000020000\,0000\,0000\,0000_2).

    • Total distinct integers: X=216=65536X = 2^{16} = 65536.

  2. Sign-Magnitude Representation:

    • Range: −(2n−1−1)-(2^{n-1}-1) to +(2n−1−1)+(2^{n-1}-1), which is −32767-32767 to +32767+32767.

    • Zero has two representations (+0+0 and −0-0).

    • Total distinct integers: Y=216−1=65535Y = 2^{16} - 1 = 65535.

Therefore:

X−Y=65536−65535=1X - Y = 65536 - 65535 = 1

Thus, the value of X−YX - Y is 1.

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 Q9 of the GATE CSE 2016 Set 2 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. 11 of them are 1-mark NAT questions like this one, and GATE CSE 2016 Set 2 has 2.

How GATE tests Number Representation and Arithmetic

More from GATE CSE 2016 Set 2

Share this solution

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

GateAI solution cardGATE CSE 2016 Set 2 · Q9 · NAT

Let X be the number of distinct 16-bit integers in 2’s complement representation. Let Y be the number of distinct 16-bit integers in sign magnitude representation. Then X - Y is …

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.