GATE / CS ARCHIVE

GATE CSE 1997 / QUESTION 72(a)

Finite-mantissa encodings of two numbers

Computer Organization & Architecture · Data Representation & Arithmetic · Full GATE CSE 1997 paper

GATE 1997, Q72(a) 2 marks · Descriptive
Report issue

Data Representation & Arithmetic

Question 72(a), GATE 1997: A floating-point value is n=(f,e)=f·2^e. The fractional mantissa f has 6 bits including its sign bit, in sign-magnitude form. The exponent e has 4 bits including its sign bit, also sign-magnitude. A=54.75 and B=9.75 in decimal. No rounding mode, guard-bit convention, or normalization rule is explicitly supplied; use the conventional normalized fraction 1/2≤|f|<1 and state the rounding assumption. Represent A and B in this format.
Question 72(a), GATE 1997: A floating-point value is n=(f,e)=f·2^e. The fractional mantissa f has 6 bits including its sign bit, in sign-magnitude form. The exponent e has 4 bits including its sign bit, also sign-magnitude. A=54.75 and B=9.75 in decimal. No rounding mode, guard-bit convention, or normalization rule is explicitly supplied; use the conventional normalized fraction 1/2≤|f|<1 and state the rounding assumption. Represent A and B in this format.
Tap to enlarge
Answer & solution

Answer: With normalized mantissas and chopping: A→(0 11011,0 110)=54; B→(0 10011,0 100)=9.5. Neither original value is exactly representable. (no official key was published)

The six mantissa bits include the sign, leaving only five fraction-magnitude bits. The four exponent bits similarly leave three bits for its magnitude, so exponents range from −7 to +7, not the biased range of IEEE formats. Use a sign bit of 0 for each positive field.

Convert the values exactly first:
54.75=110110.11₂=.11011011₂×26,
9.75=1001.11₂=.100111₂×24.
Both normalized binary fractions need more than five magnitude bits. Therefore there is no exact six-bit-mantissa representation of either input under this normalization. A finite encoding requires a rounding rule; merely truncating without saying so would hide a loss of information.

Under chopping toward zero, retain the first five fraction bits:
A: mantissa 0|11011, exponent 0|110; value .11011₂×64=54.
B: mantissa 0|10011, exponent 0|100; value .10011₂×16=9.5.
The vertical bar separates the sign from magnitude. No hidden leading bit is added; all five fraction bits are explicitly stored. The exponent fields are the sign-magnitude representations of +6 and +4.

For comparison, round-to-nearest with ties-to-even gives A=54 again but B=10, encoded as mantissa 0|10100 with exponent 0|100. B=9.75 lies exactly halfway between 9.5 and 10; the retained significand integer for 10 is even. Other tie rules may choose differently. This alternative is not an official correction: it demonstrates why the source's missing rounding policy matters. The subsequent worked addition and 3.9% error use the explicitly stated chopping model throughout.

Original paper, page 10