Skip to content
Official PYQ · 2026

GATE CS 2026 Set 1 Q12 — Number Representations (Fixed and Floating Point)

Explain with AI

Consider the 88 -bit signed integers X,YX, Y and ZZ represented using the sign-magnitude form. The binary representations of XX and YY are as follows:
X:10110100Y:01001100X: 10110100 \quad Y: 01001100
Which of the following operations to compute ZZ result(s) in an arithmetic overflow?

Select all correct options
View worked solution

Answer: B;C

In an 88-bit signed sign-magnitude representation:

  • The most significant bit (MSB) represents the sign (00 for positive, 11 for negative).
  • The remaining 77 bits represent the magnitude.
  • The range of representable integers is from −(27−1)-(2^7 - 1) to +(27−1)+(2^7 - 1), which is [−127,+127][-127, +127].

Let us determine the decimal values of XX and YY:

  • For X=101101002X = 10110100_2:
    • Sign bit is 11 (negative).
    • Magnitude bits: 01101002=32+16+4=520110100_2 = 32 + 16 + 4 = 52.
    • Thus, X=−52X = -52.
  • For Y=010011002Y = 01001100_2:
    • Sign bit is 00 (positive).
    • Magnitude bits: 10011002=64+8+4=761001100_2 = 64 + 8 + 4 = 76.
    • Thus, Y=+76Y = +76.

Now, we evaluate each operation to check if the result falls outside the representable range [−127,+127][-127, +127]:

  1. Z=X+YZ = X + Y:
    Z=−52+76=+24Z = -52 + 76 = +24
    Since +24∈[−127,+127]+24 \in [-127, +127], there is no overflow.
  2. Z=X−YZ = X - Y:
    Z=−52−76=−128Z = -52 - 76 = -128
    Since −128∉[−127,+127]-128 \notin [-127, +127], this results in an arithmetic overflow.
  3. Z=−X+YZ = -X + Y:
    Z=−(−52)+76=52+76=+128Z = -(-52) + 76 = 52 + 76 = +128
    Since +128∉[−127,+127]+128 \notin [-127, +127], this results in an arithmetic overflow.
  4. Z=−X−YZ = -X - Y:
    Z=−(−52)−76=52−76=−24Z = -(-52) - 76 = 52 - 76 = -24
    Since −24∈[−127,+127]-24 \in [-127, +127], there is no overflow.

Thus, operations B and C result in an arithmetic overflow.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Number Representations (Fixed and Floating Point) questions