GATE / CS ARCHIVE

GATE CSE 1997 / QUESTION 72(c)

Percentage error of the computed sum

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

GATE 1997, Q72(c) 1 mark · Descriptive
Report issue

Data Representation & Arithmetic

Question 72(c), 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. Find the percentage error in the addition, to one decimal place.
Question 72(c), 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. Find the percentage error in the addition, to one decimal place.
Question 72(c), 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. Find the percentage error in the addition, to one decimal place.
Tap to enlarge
Answer & solution

Answer: 3.9% relative to the exact sum under chopping (computed 62 versus exact 64.5); 0.8% under the separately stated nearest-rounding model. (no official key was published)

The exact mathematical sum of the original decimal inputs is A+B=54.75+9.75=64.5. With normalized five-bit fraction magnitudes and chopping as in the worked addition, the computed result is 62. The absolute error is |62−64.5|=2.5. Percentage relative error uses the exact value as denominator:

100×|computed−exact|/|exact|
=100×2.5/64.5
=100×5/129
≈3.87596899%.

Rounded to one decimal place, the error is 3.9%. If a signed percentage error were desired, it would be −3.9%, indicating underestimation; the usual unqualified percentage error is its nonnegative magnitude.

Do not divide by the computed 62, and do not use 63.5 as the reference merely because that is the exact sum of the already chopped input representations 54 and 9.5. The task concerns addition of the original A and B; input-representation error is part of the total discrepancy from 64.5. Relative to 63.5 alone the arithmetic-stage error would be a different quantity, 100×1.5/63.5≈2.4%.

The source's missing rounding policy persists into this part. Under round-to-nearest/ties-to-even the computed sum is 64, making the corresponding total percentage error 100×0.5/64.5≈0.77519%, or 0.8%. Accordingly 3.9% is a conditional derived answer under the declared chopping convention, not a uniquely verified official value.

Original paper, page 10