GATE / CS ARCHIVE

SUBJECT COLLECTION

Computer Organization & Architecture · Data Representation & Arithmetic

38 questions, newest first

GATE CSE has asked 38 questions on Data Representation & Arithmetic (Computer Organization & Architecture) from 1994 to 2026, in 22 of the 46 papers; the most recent is in GATE CSE 2026 Set 2. In the last five years it carried 1.4 marks per 100-mark paper on average, against 0.8 since 2003. Since 2014 the questions have been 8 MCQ, 3 NAT and 2 MSQ. 8 groups of questions here are solved the same way; “One per method” keeps the newest of each.

Browse topics
2 marks · MCQ
Report issue

Adding two IEEE 754 binary32 values

Data Representation & Arithmetic

Question 36, GATE 2026: X and Y are IEEE 754 single-precision values with hexadecimal bit patterns 35C00000 and 34A00000. Find the bit pattern for Z=X+Y among A 35C80000, B 35CC0000, C 35E80000, D 35EC0000.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Step through it (9 steps)

Givens and goal

X and Y are IEEE 754 single-precision values with hexadecimal bit patterns 35C00000 and 34A00000. Find the bit pattern for Z=X+Y among A 35C80000, B 35CC0000, C 35E80000, D 35EC0000.

Approach

Decode sign, biased exponent and fraction; align exponents, add significands, and re-encode the exact sum.

Step-by-step solution

1. Both operands are positive normal IEEE 754 binary32 numbers. The exponent field of 35C00000 is 107, so its unbiased exponent is −20. Its fraction field is 400000, giving significand 1.5. Thus X = 1.5 × 2−20.
2. For 34A00000 the exponent field is 105, giving unbiased exponent −22; fraction 200000 gives significand 1.25. Thus Y = 1.25 × 2−22 = 0.3125 × 2−20.
3. Their sum is 1.8125 × 2−20. Since 1 ≤ 1.8125 < 2, no exponent renormalization is required. The fraction is 0.8125 = 13/16, which has an exact terminating binary expansion.
4. The exponent bits remain 107, contributing 35800000. The stored fraction is (13/16) × 223 = 680000 in hexadecimal. Combining the fields yields 35E80000. No rounding error occurs here.

Computational check: Python struct unpacked both binary32 operands and repacked their sum, obtaining 0x35e80000. This complements the exact field-level derivation; it is not the sole justification.

Binary significand check: X=1.1₂×2−20 and Y=1.01₂×2−22=0.0101₂×2−20. Their sum is 1.1101₂×2−20. Dropping the implicit leading 1 leaves fraction bits 1101 followed by nineteen zeros, exactly the hexadecimal fraction 680000. Since all significant bits fit within binary32 precision, the rounding mode does not alter the answer here.

Original paper, page 25 · Answer key

1 mark · NAT
Report issue

Decoding an IEEE-754 bit pattern

Data Representation & Arithmetic

Question 34, GATE 2026: Decode hexadecimal 0xC2710000 as IEEE-754 binary32 and give its decimal value to two decimal places.
Tap to enlarge
Answer & solution

Official answer: -60.25 to -60.25

Our answer: -60.25

Step through it (6 steps)

Givens and goal

Decode hexadecimal 0xC2710000 as IEEE-754 binary32 and give its decimal value to two decimal places.

Approach

Extract sign, biased exponent, and fraction separately.

Step-by-step solution

1. The 32 bits are 11000010011100010000000000000000. Their binary32 split is sign 1 | exponent 10000100 | fraction 11100010000000000000000.
2. The sign contributes −1. The exponent field is 132, so the unbiased exponent is e=132−127=5. Since the exponent is neither all zero nor all one, use the normalized significand 1.f.
3. The fraction bits contribute 1/2+1/4+1/8+1/128=113/128. Thus the significand is 1+113/128=241/128.
4. The value is −(241/128)×2⁵=−241/4=−60.25. This value is exact, so rounding to two decimal places leaves −60.25. Do not interpret the entire 32-bit word as a two’s-complement integer; IEEE-754 uses separate fields.

Original paper, page 23 · Answer key

1 mark · NAT
Report issue

Data Representation & Arithmetic

Question 32, GATE 2025: Ordinary radix-2 Booth multiplication is applied to signed 16-bit two's-complement operands M=1100 1101 1110 1101 and Q=1010 0100 1010 1010. How many additions and subtractions of the multiplicand occur in total? Count arithmetic operations, not shifts.
Tap to enlarge
Answer & solution

Official answer: 13

Step through it (18 steps)

In radix-2 Booth multiplication append q−1=0 to the multiplier and inspect (qi,qi−1) for i=0,…,15. A pair 01 causes addition of M, 10 causes subtraction of M, and 00 or 11 causes neither. Each iteration still performs its arithmetic right shift, but shifts are not included in the question's count. The count depends on the multiplier's bit transitions, not on the value of M.

Read Q from its least significant end. The positions producing subtraction (10) are i=1,3,5,7,10,13,15, seven positions. The positions producing addition (01) are i=2,4,6,8,11,14, six positions. The remaining positions i=0,9,12 have equal adjacent bits and require no arithmetic update.

Thus there are 7+6=13 additions/subtractions during the 16 iterations. Do not append an extra seventeenth correction for the leading one: the fixed-width signed Booth algorithm already handles that sign bit through its arithmetic shifts. Answer: 13.

Original paper, page 25 · Answer key

2 marks · MSQ
Report issue

Data Representation & Arithmetic

Question 49, GATE 2025: IEEE 754 binary32 registers hold RX=0xC1100000, RY=0x40C00000, RZ=0x41400000, representing numbers X,Y,Z. Select true equations.
A. 4(X+Y)+Z=0. B. 2Y−Z=0. C. 4X+3Z=0. D. X+Y+Z=0.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: A, B, C

Step through it (9 steps)

For a normal binary32 number, value=(−1)s·(1+f/223)·2e−127, where s is the sign bit, e the 8-bit biased exponent, and f the 23-bit fraction integer.

RX has s=1, e=130, and f=0x100000=220. Its fractional contribution is 220/223=1/8, so X=−(1+1/8)·23=−9. RY has s=0,e=129,f=0x400000=222, giving Y=(1+1/2)·22=6. RZ has s=0,e=130 and the same fraction, giving Z=(1+1/2)·23=12.

Now evaluate the choices directly: A gives 4(−9+6)+12=−12+12=0; B gives 2·6−12=0; C gives 4·(−9)+3·12=−36+36=0. D gives −9+6+12=9, not zero. These small integer values and intermediate results are exactly representable, so floating-point rounding does not change the conclusions. Select A,B,C.

Original paper, page 38 · Answer key

1 mark · MCQ
Report issue

Recognize the reserved IEEE exponent pattern

Data Representation & Arithmetic

Question 14, GATE 2024: Choose the largest numeric IEEE 754 binary32 value among these sign/exponent/fraction fields. All signs are 0. A exponent 01111111, 23 fraction bits all 1; B exponent 11111110, fraction all 1; C exponent 11111111, fraction all 1; D exponent 01111111, fraction all 0.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Step through it (6 steps)

Approach: Classify special encodings before comparing the ordinary positive values.

1. Derivation. For a normal binary32 value the magnitude is(1+fraction)×2E−127. B has the largest finite exponent 254 and an all-one fraction, giving(2−2⁻²³)×2¹²⁷, the largest finite positive binary32 value. A is just below 2; D is 1. C has exponent 255 and a nonzero fraction, so it is NaN, not a larger number. Answer B.

2. Explanation and checks. An all-ones exponent is reserved: a zero fraction would encode positive infinity, but the nonzero fraction in C encodes NaN. NaN is unordered and is not a numeric maximum. For B the biased exponent 254 becomes 127, and the fraction sum is 1−2−23, giving significand 2−2−23. A instead has actual exponent zero, and D has both exponent zero and fraction zero, so both are much smaller.

Original paper, page 11 · Answer key

2 marks · MCQ
Report issue

Data Representation & Arithmetic

Question 45, GATE 2023: Multiply binary32 values P=0xC1800000 and Q=0x3F5C2EF4. Which binary32 encoding results? A 0x404C2EF4; B 0x405C2EF4; C 0xC15C2EF4; D 0xC14C2EF4.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

P=0xC1800000 is−16=−2⁴. Q is a positive normal binary32 number with exponent 126 and fraction 0x5C2EF4. Multiplying by−2⁴ flips the sign and raises the biased exponent from 126 to 130, leaving the fraction unchanged. The result is 0xC15C2EF4, option C. Scaling remains within the normal range and is exact.

Teaching detail. A normal binary32 value is (−1)s·(1+fraction/2²³)·2e−127. For P the sign is 1, biased exponent 131, and fraction zero, yielding −16. For Q the sign is 0 and biased exponent 126. Exact scaling by 16 adds four to that exponent, while the negative multiplier changes the sign bit to 1. Packing sign 1, exponent 130, and unchanged fraction 0x5C2EF4 yields the stated hexadecimal word. No significand multiplication or rounding is needed for this power-of-two scaling.

Original paper, page 48 · Answer key

2 marks · MCQ
Report issue

Data Representation & Arithmetic

Question 41, GATE 2022: IEEE-754 binary32 register patterns for A,B,C are C1400000,42100000,41400000 (hex). Which is false? A A+C=0; B C=A+B; C B=3C; D B−C>0.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Step through it (9 steps)

Decode the binary32 values: 0xC1400000 has sign 1, exponent 130 and significand 1.5, giving −12. 0x42100000 has exponent 132 and significand 1.125, giving 36. 0x41400000 gives 12. Therefore C=A+B is false, since 12≠−12+36=24. The other offered relations hold, so B.

For normalized binary32, value=(−1)^sign ×(1+fraction/223)×2exponent−127. A has unbiased exponent 3 and fraction 0.5: −1.5×8=−12. B has exponent 5 and fraction 0.125: 1.125×32=36. C is +12. Thus A+C=0, B=3C, and B−C=24>0.

Original paper, page 27 · Answer key

1 mark · NAT
Report issue

Data Representation & Arithmetic

Question 24, GATE 2021: In IEEE 754 single precision (bias 127), S=1, E=10000001, F=11110000000000000000000. Find the represented decimal value, rounded to two decimal places.
Tap to enlarge
Answer & solution

Official answer: -7.75 to -7.75

Our answer: -7.75

Step through it (5 steps)

The sign is negative. The exponent field 10000001₂=129 gives exponent 2 after subtracting bias 127. The significand is 1.1111₂=31/16. Hence value=−(31/16)·2²=−31/4=−7.75.

For a normalized single-precision number the formula is (−1)S(1.F)_2×2E−127. The stored fraction is .1111₂=1/2+1/4+1/8+1/16=15/16; the hidden leading 1 gives 31/16. E=129 is neither zero nor all ones, so neither subnormal nor infinity/NaN rules apply. Multiplication by 4 yields 7.75, and the sign bit makes it negative.

Original paper, page 22 · Answer key

1 mark · MCQ
Report issue

Data Representation & Arithmetic

Question 4, GATE 2021: For IEEE 754 binary32, identify the smallest positive normalized number's exponent and fraction fields. A exponent 00000000/fraction all zero; B exponent 00000000/fraction integer 1; C exponent 00000001/fraction all zero; D exponent 00000001/fraction integer 1. Fraction width is 23 bits.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

A normalized binary32 number has a nonzero exponent field. The smallest positive one uses biased exponent 1 and fraction 0: exponent 00000001, fraction all zeros. Its value is 1.0·21−127=2−126, C. Exponent0 encodes zero or subnormals instead.

Binary32 uses sign 0 for positive, bias 127, and an implicit leading 1 for normal numbers. The least positive normal has the smallest allowed normal exponent and smallest significand. Option B is instead the smallest positive subnormal, 2−149; it is positive but fails the word normalized.

Original paper, page 56 · Answer key

2 marks · MSQ
Report issue

Data Representation & Arithmetic

Question 44, GATE 2021: The same two bytes represent an unsigned value 255 greater under little endian than big endian. Which little-endian hexadecimal values qualify? A 0x6665; B 0x0001; C 0x4243; D 0x0100.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: A; D

For bytes a, b in increasing address order, little-endian value is 256b+a and big-endian value is 256a+b. Their difference 255(b-a) equals 255 exactly when b=a+1. A little-endian numeral must therefore have its high-order byte one larger than its low-order byte. 0x6665 and 0x0100 satisfy this; 0x0001 and 0x4243 have the opposite sign of difference. Answer A, D.

Evaluate options numerically without decimal conversion: byte swap of 0x6665 is 0x6566, difference 0x00FF; swap of 0x0100 is 0x0001, also 0x00FF. The other two have differences −255. Unsigned means the ordinary nonnegative two-byte values, not a signed interpretation of either byte.

Original paper, page 81 · Answer key

2 marks · MCQ
Report issue

Data Representation & Arithmetic

Question 29, GATE 2020: R1=0x42200000 and R2=0xC1200000 are IEEE-754 single-precision bit patterns. Find the pattern for R3=R1/R2. A 0x40800000; B 0xC0800000; C 0x83400000; D 0xC8500000.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Step through it (10 steps)

Worked explanation

For a normal single-precision value, decode (−1)s×(1+fraction/223)×2E−127. R1 has s=0,E=132,fraction=0x200000, so its significand is 1+1/4=1.25 and its value is 40. R2 has s=1,E=130,the same fraction, so it is −10. Divide the represented values, not the hexadecimal integers: 40/(−10)=−4. Normalize −4 as −1.0×2², yielding sign 1, exponent 129=10000001₂ and all-zero fraction. Packing those fields gives 0x80000000+0x40800000=0xC0800000. No rounding is needed because all values are exact powers-of-two fractions.

Derivation and answer

0x42200000 represents+1.25·2⁵=40. 0xC1200000 represents−1.25·2³=−10. Their quotient is−4=−1.0·2². Its sign bit is 1, biased exponent 129, fraction 0, yielding 0xC0800000, B.

Original paper, page 10 · Answer key

1 mark · MCQ
Report issue

Data Representation & Arithmetic

Question 12, GATE 2017: A 32-bit IEEE-754 single-precision number has bits 00111110011011010000000000000000 (sign/exponent/fraction: 0 | 01111100 | 11011010000000000000000). Which listed decimal value is closest? A:1.45×10¹. B:1.45×10^-1. C:2.27×10^-1. D:2.27×10¹.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Step through it (6 steps)

1. For a normal single-precision number, value=(-1)^sign × (1.fraction)₂ × 2stored exponent-127. Here sign=0, exponent 01111100₂=124, and the exponent is therefore -3.

2. The significand is 1+2-1+2-2+2-4+2-5+2-7=1.8515625. Multiplication by 2-3 gives 0.2314453125.

3. Compare the offered approximations rather than requiring an exact match. Its distance from 0.227 is 0.0044453125, much less than its distance from 0.145; 14.5 and 22.7 are far away. Hence C. The hidden leading 1 and exponent bias are both essential.

Original paper, page 5 · Answer key

2 marks · MCQ
Report issue

Data Representation & Arithmetic

Question 33, GATE 2016: An n-bit carry-lookahead adder uses gates with fan-in at most 2. What is its asymptotic addition time? A: Θ(1). B: Θ(log n). C: Θ(√n). D: Θ(n).
Tap to enlarge
Your answer
Answer & solution

Official answer: B

With bounded fan-in 2, carry generate/propagate combines through a balanced prefix tree of depthΘ(log n). The high-order result depends on Θ(n) inputs, and depth d gates can depend on at most 2d inputs, giving a matching Ω(log n) lower bound. Thus Θ(log n), B.

A carry can be summarized by generate and propagate signals, and adjacent summaries combine associatively. A balanced tree merges pairs, then groups of 4,8 and so on; after logarithmically many levels the needed carry information spans all bits. With fan-in bounded by 2, a constant number of levels cannot combine information from arbitrarily many positions. This restriction is why the unbounded-fan-in intuition of a single huge AND/OR gate cannot justify constant-time addition here.

Original paper, page 13 · Answer key

1 mark · MCQ
Report issue

IEEE single-precision representation of one half

Data Representation & Arithmetic

Question 7, GATE 2012: The decimal value 0.5 in IEEE single precision floating point representation has
        (A) fraction bits of 000…000 and exponent value of 0
        (B) fraction bits of 000…000 and exponent value of −1
        (C) fraction bits of 100…000 and exponent value of 0
        (D) no exact representation
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Step through it (6 steps)

Normalize 0.5 as 1.0₂×2−1. The fractional field after the implicit leading 1 is all zeros; the actual unbiased exponent is −1. Thus B uses the mathematical exponent convention. For clarity, the stored biased exponent is −1+127=126, binary 01111110, and the full 32-bit encoding is 0x3F000000. The exponent field itself is not a signed −1.

Check: The single-precision format has one sign bit, eight exponent bits, and 23 stored fraction bits. Here the sign is 0, the exponent field is 01111110, and every fraction bit is 0; binary fractions with denominator a power of two can be exact.

Original paper, page 3 · Answer key

2 marks · MCQ
Report issue

Unnormalized custom floating-point encoding

Data Representation & Arithmetic

Question 85a, GATE 2005: A 16-bit format has sign bit 15, seven-bit excess 64 exponent in 14…8, eight-bit pure fractional mantissa in 7…0; sign-magnitude. Printed 85(a): encode positive 0.239×2^13 without normalization or rounding. Hex choices A 0D24; B 0D4D; C 4D0D; D 4D3D.
Question 85a, GATE 2005: A 16-bit format has sign bit 15, seven-bit excess 64 exponent in 14…8, eight-bit pure fractional mantissa in 7…0; sign-magnitude. Printed 85(a): encode positive 0.239×2^13 without normalization or rounding. Hex choices A 0D24; B 0D4D; C 4D0D; D 4D3D.
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

The sign is 0. The seven-bit biased exponent is 13+64=77=0x4D. The eight-bit pure-fraction field is obtained by truncation: floor(0.239×256)=61=0x3D, binary 00111101. Concatenating sign, exponent, and mantissa gives 0x4D3D, option D. No normalization or rounding is applied.

Bias affects the exponent field, not the mantissa:13+64=77, or binary 1001101. Truncating eight fraction bits gives floor(.239×256)=61, binary 00111101. The sign 0 followed by exponent 1001101 produces the high byte 01001101=4D; the low byte is 3D. Round-to-nearest would be a different instruction, explicitly excluded here.

Original paper, page 12

2 marks · MCQ
Report issue

Normalizing the stored fraction with zero fill

Data Representation & Arithmetic

Question 85b, GATE 2005: A 16-bit format has sign bit 15, seven-bit excess 64 exponent in 14…8, eight-bit pure fractional mantissa in 7…0; sign-magnitude. Printed 85(b): normalize the representation from(a), now storing an implicit leading 1 before the binary point, padding only zeros during shifts. Hex choices A 0A20; B 1134; C 49D0; D 4AE8. Preserve the linked truncated value, not a fresh conversion of the exact decimal.
Question 85b, GATE 2005: A 16-bit format has sign bit 15, seven-bit excess 64 exponent in 14…8, eight-bit pure fractional mantissa in 7…0; sign-magnitude. Printed 85(b): normalize the representation from(a), now storing an implicit leading 1 before the binary point, padding only zeros during shifts. Hex choices A 0A20; B 1134; C 49D0; D 4AE8. Preserve the linked truncated value, not a fresh conversion of the exact decimal.
Question 85b, GATE 2005: A 16-bit format has sign bit 15, seven-bit excess 64 exponent in 14…8, eight-bit pure fractional mantissa in 7…0; sign-magnitude. Printed 85(b): normalize the representation from(a), now storing an implicit leading 1 before the binary point, padding only zeros during shifts. Hex choices A 0A20; B 1134; C 49D0; D 4AE8. Preserve the linked truncated value, not a fresh conversion of the exact decimal.
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

Part(a) stores the fraction .00111101₂ times 213. Moving the radix point three places right gives 1.11101₂×210. With the leading 1 implicit and only zeros padded, the eight stored fraction bits are 11101000=0xE8. The biased exponent is 10+64=74=0x4A, so the word is 0x4AE8, option D. This normalizes the truncated stored mantissa from part(a). Directly converting the original exact decimal to normalized form would produce different low bits; the explicit zero-fill rule is essential.

Begin with the already truncated .00111101×213. Shift three places to make its leading 1 sit before the point:1.11101×210. Drop only that implicit leading 1 and pad the remaining fraction to 11101000. The new biased exponent 10+64=74 gives high byte 4A; the fraction givesE 8. This transformation preserves the stored number exactly. Re-expanding the original decimal instead would introduce nonzero lower bits disallowed by the zero-padding premise.

Original paper, page 12

2 marks · MCQ
Report issue

Largest spacing in a custom floating-point format

Data Representation & Arithmetic

Question 43, GATE 2003: A 16-bit floating-point scheme has sign s at bit 15, six-bit exponent e at bits 14–9, and nine-bit mantissa integer m at bits 8–0. Its value is (−1)^s(1+m·2^(−9))2^(e−31) if e≠111111₂, and zero otherwise. What is the maximum difference between successive representable real numbers? A. 2^(−40); B. 2^(−9); C. 2^22; D. 2^31.
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

1. Within an exponent binade, incrementing the nine-bit mantissa integer by one increments the value by 2e−40. Maximizing this requires the largest nonreserved exponent, 62. The positive/negative sign duplicates gaps by symmetry; crossing zero and crossing adjacent exponent ranges cannot exceed the largest within-binade gap.

2. There are six exponent bits and nine fractional mantissa bits. Exponent 63 is reserved for zero, so the largest usable exponent is e=62. For fixed e, adjacent significands differ by 2⁻⁹, giving spacing 2e−31−9. This is largest at e=62, namely 2²², option C. Crossing a binade boundary has the smaller binade’s spacing, and the gaps adjacent to zero are only 2⁻³¹, so neither produces a larger gap.

Original paper, page 6

2 marks · MCQ
Report issue

Controlled XOR inputs of an adder-subtractor

Data Representation & Arithmetic

Question 46, GATE 2003: An n-bit ripple-carry ALU has a full adder at each bit. At bit i its inputs are Ai, Bi XOR K, and carry Ci; the output is Si and the next carry. K is shared by all XOR gates and C0 is the least-significant carry input. For two's-complement operands, which operations can be performed by choosing only K and C0?
A. A+B and A−B, but not A+1
B. A+B and A+1, but not A−B
C. A+B, but neither A−B nor A+1
D. A+B, A−B and A+1
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

1. A full-adder chain adds its two input words and the initial carry, so S=A+(B XOR K...K)+C0 modulo 2n.
2. Enumerate the controls: (0,0) produces A+B; (0,1) produces A+B+1; (1,0) produces A+complement(B)=A−B−1; (1,1) produces A−B.
3. For arbitrary B none of these cancels B entirely. In particular the extra carry in (0,1) gives A+B+1, not A+1. Thus only addition and subtraction are generally available: A.

Solution: The gates feeding the B inputs are XOR gates. For an n-bit word the circuit computes A+(B XOR K…K)+C₀ modulo 2ⁿ. Setting (K,C₀)=(0,0) gives A+B; setting (1,1) gives A+¬B+1=A−B. Neither setting can remove arbitrary B to give A+1 solely by changing those two control lines. Therefore A+B and A−B, but not general A+1, is option A.

Original paper, page 6

2 marks · MCQ
Report issue

Auxiliary carry and carry in an 8085 sum

Data Representation & Arithmetic

Question 2.4, GATE 2002: Determine the auxiliary carry AC and carry CY flags after this 8085 instruction sequence:
MVI H, 5DH
MVI L, 6BH
MOV A, H
ADD L
(A) AC=0, CY=0; (B) AC=1, CY=1; (C) AC=1, CY=0.
(D) Source variant: GFG prints AC=0, CY=0 (duplicating A), whereas GateForum prints AC=0, CY=1. Original official wording is not verified.
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

Step 1: Perform both the nibble sum and the full sum.

Step 2: At the low nibble, hexadecimal D+B=13+11=24=16+8, so a carry crosses the bit3 boundary. At the high nibble,5+6+1=12=C, without a carry beyond the byte. Hence the result is C8, auxiliary carry 1, full carry 0. Source option D differs between reproductions, but neither version competes with the computed option C.

Conclusion: A receives 5D₁₆ and ADD L adds 6B₁₆, yielding C8₁₆. The low nibbles D+B=18₁₆ generate a carry out of bit3, so AC=1. The full sum is below 100₁₆, so CY=0. Thus C.

Original paper, page 4

Descriptive
Report issue

Identify the pipelined arithmetic circuit

Data Representation & Arithmetic

Question 8(b), GATE 2002: The circuit takes three-bit inputs A=a₂a₁a₀ and B=b₂b₁b₀ and produces Z=z₃z₂z₁z₀. All registers load simultaneously on falling CLOCK edges; the clock period exceeds every circuit’s settling time. The diagram has R0 (6 bits) holding b₂,a₂,b₁,a₁,b₀,a₀. A full adder takes R0’s b₀,a₀ with carry-in 0. R1 (6 bits) holds the forwarded b₂,a₂,b₁,a₁ and this adder’s carry and sum. A second full adder takes R1’s b₁,a₁ and that stored carry. R2 (5 bits) holds the forwarded b₂,a₂, the second adder’s carry and sum, and the forwarded least-significant sum. A third, unregistered full adder takes R2’s b₂,a₂ and stored carry; its carry and sum are z₃,z₂, while R2’s stored sums directly provide z₁,z₀. What operation does this circuit implement?
Question 8(b), GATE 2002: The circuit takes three-bit inputs A=a₂a₁a₀ and B=b₂b₁b₀ and produces Z=z₃z₂z₁z₀. All registers load simultaneously on falling CLOCK edges; the clock period exceeds every circuit’s settling time. The diagram has R0 (6 bits) holding b₂,a₂,b₁,a₁,b₀,a₀. A full adder takes R0’s b₀,a₀ with carry-in 0. R1 (6 bits) holds the forwarded b₂,a₂,b₁,a₁ and this adder’s carry and sum. A second full adder takes R1’s b₁,a₁ and that stored carry. R2 (5 bits) holds the forwarded b₂,a₂, the second adder’s carry and sum, and the forwarded least-significant sum. A third, unregistered full adder takes R2’s b₂,a₂ and stored carry; its carry and sum are z₃,z₂, while R2’s stored sums directly provide z₁,z₀. What operation does this circuit implement?
Question 8(b), GATE 2002: The circuit takes three-bit inputs A=a₂a₁a₀ and B=b₂b₁b₀ and produces Z=z₃z₂z₁z₀. All registers load simultaneously on falling CLOCK edges; the clock period exceeds every circuit’s settling time. The diagram has R0 (6 bits) holding b₂,a₂,b₁,a₁,b₀,a₀. A full adder takes R0’s b₀,a₀ with carry-in 0. R1 (6 bits) holds the forwarded b₂,a₂,b₁,a₁ and this adder’s carry and sum. A second full adder takes R1’s b₁,a₁ and that stored carry. R2 (5 bits) holds the forwarded b₂,a₂, the second adder’s carry and sum, and the forwarded least-significant sum. A third, unregistered full adder takes R2’s b₂,a₂ and stored carry; its carry and sum are z₃,z₂, while R2’s stored sums directly provide z₁,z₀. What operation does this circuit implement?
Question 8(b), GATE 2002: The circuit takes three-bit inputs A=a₂a₁a₀ and B=b₂b₁b₀ and produces Z=z₃z₂z₁z₀. All registers load simultaneously on falling CLOCK edges; the clock period exceeds every circuit’s settling time. The diagram has R0 (6 bits) holding b₂,a₂,b₁,a₁,b₀,a₀. A full adder takes R0’s b₀,a₀ with carry-in 0. R1 (6 bits) holds the forwarded b₂,a₂,b₁,a₁ and this adder’s carry and sum. A second full adder takes R1’s b₁,a₁ and that stored carry. R2 (5 bits) holds the forwarded b₂,a₂, the second adder’s carry and sum, and the forwarded least-significant sum. A third, unregistered full adder takes R2’s b₂,a₂ and stored carry; its carry and sum are z₃,z₂, while R2’s stored sums directly provide z₁,z₀. What operation does this circuit implement?
Tap to enlarge
Shared context

A and B are unsigned three-bit operands. All three registers R0, R1, R2 load on the same falling clock edge. The source circuit stages three full adders and delays higher input bits and lower result bits to keep each operand pair aligned. All registers initially contain zero.

Answer & solution

Answer: Pipelined unsigned three-bit binary adder, producing a four-bit sum (no official key was published)

1. Identify each arithmetic stage from the source diagram. The first full adder takes a0, b0, and carry-in 0. It produces the least significant sum bit s0 and carry c1. R1 stores those values together with the delayed higher operand bits.

2. Follow the carry to the next stage. The second full adder takes a1, b1, and that same operand pair’s carry c1. It produces s1 and c2. R2 stores these along with the delayed a2,b2 and s0.

3. Finish the sum. The last full adder takes a2,b2,c2 and outputs s2 plus the carry c3. The circuit combines these with the delayed low bits as Z = c3s2s1s0. Consequently the four-bit unsigned result is exactly A+B; the leading carry is retained rather than discarded.

4. Explain why the registers matter. They delay the remaining operand bits and previously computed low sum bits along with the carry. This keeps all four output bits associated with one input pair while different pairs occupy different stages. Without those matching delays, bits from different pairs could be mixed.

5. Identify the implementation and performance. It is a pipelined unsigned three-bit binary adder, accepting a new pair each clock and producing one four-bit sum per clock after filling. A pair captured by R0 at edge t appears at Z after edge t+2 and combinational settling. It passes through three register loads, R0, R1, R2; there are two full clock intervals between its first capture and final output. This explicit convention avoids an ambiguous bare latency number.

Original paper, page 7

Descriptive
Report issue

Encode a value in a custom hexadecimal float

Data Representation & Arithmetic

Question 9(a), GATE 2002: A 32-bit floating-point format has fields, from most to least significant: sign (1 bit), fraction (24 bits), exponent (7 bits). Sign 0 means positive and 1 negative. The binary point precedes the fraction bits. The exponent is stored in excess-64 representation, and the exponentiation base is 16. Represent decimal −7.5 as a normalized number in this format. Derive each field and give the complete representation in hexadecimal.
Question 9(a), GATE 2002: A 32-bit floating-point format has fields, from most to least significant: sign (1 bit), fraction (24 bits), exponent (7 bits). Sign 0 means positive and 1 negative. The binary point precedes the fraction bits. The exponent is stored in excess-64 representation, and the exponentiation base is 16. Represent decimal −7.5 as a normalized number in this format. Derive each field and give the complete representation in hexadecimal.
Tap to enlarge
Shared context

The custom 32-bit format stores sign, 24-bit fraction, then 7-bit excess-64 exponent, in that order. Its numeric value is (−1)^s(F/2^24)16^(E−64); no reserved exponent encodings are specified.

Answer & solution

Answer: Sign 1; fraction 0x780000; biased exponent 65; word 0xBC000041 (no official key was published)

1. Write the numeric interpretation of this particular format. For sign bit s, unsigned 24-bit fraction integer F, and unsigned stored exponent E, the value is (−1)s × (F/224) × 16E−64. The storage order is sign, fraction, exponent, unlike IEEE 754.

2. Normalize the magnitude in radix 16. Since 7.5/16 = 0.46875 and 0.46875 = 7/16 + 8/256, we have 7.5 = 0.78₁₆ × 16¹. The leading hexadecimal fraction digit 7 is nonzero, so this is normalized. Leading zeros within that hexadecimal digit’s four binary bits are allowed in radix-16 normalization.

3. Fill each field. The value is negative, so s=1. The six-hex-digit fraction is 780000, giving F=0x780000 and fraction bits 0111 1000 0000 0000 0000 0000. The actual exponent is 1; applying excess-64 gives E=65, whose seven-bit form is 1000001.

4. Concatenate the fields without moving the exponent to the front:

1 | 011110000000000000000000 | 1000001
= 1011 1100 0000 0000 0000 0000 0100 0001
= 0xBC000041

Equivalently, the word is (1 << 31) | (0x780000 << 7) | 65. The fraction is shifted by seven because the exponent occupies the low seven bits.

5. Decode the candidate to verify it: −(0x780000/224) × 1665−64 = −0.46875 × 16 = −7.5 exactly. No rounding is needed because the fraction has a finite binary and hexadecimal representation.

Original paper, page 7

Descriptive
Report issue

Find the custom hexadecimal float maximum

Data Representation & Arithmetic

Question 9(b), GATE 2002: A 32-bit floating-point format has fields, from most to least significant: sign (1 bit), fraction (24 bits), exponent (7 bits). Sign 0 means positive and 1 negative. The binary point precedes the fraction bits. The exponent is stored in excess-64 representation, and the exponentiation base is 16. Find the largest representable value and express it as the nearest power of 10.
Question 9(b), GATE 2002: A 32-bit floating-point format has fields, from most to least significant: sign (1 bit), fraction (24 bits), exponent (7 bits). Sign 0 means positive and 1 negative. The binary point precedes the fraction bits. The exponent is stored in excess-64 representation, and the exponentiation base is 16. Find the largest representable value and express it as the nearest power of 10.
Tap to enlarge
Shared context

The custom 32-bit format stores sign, 24-bit fraction, then 7-bit excess-64 exponent, in that order. Its numeric value is (−1)^s(F/2^24)16^(E−64); no reserved exponent encodings are specified.

Answer & solution

Answer: (1 − 2^−24)16^63 ≈ 7.23700515 × 10^75; nearest power 10^76 (no official key was published)

1. Choose the sign for the largest value. The largest representable number is positive, so the sign bit must be 0. A negative sign would reduce the value rather than maximize it.

2. Maximize the fraction. A 24-bit fraction with its binary point to the left has value F/224. All fraction bits equal to 1 give F=224−1 and fraction (224−1)/224 = 1−2−24. This is normalized and is strictly less than 1; replacing it by 1 would invent an unrepresentable fraction.

3. Maximize the exponent. The seven-bit stored field ranges from 0 to 127. Because the bias is 64, its largest actual exponent is 127−64=63. The problem specifies no reserved encodings, so none are excluded as infinity or NaN.

4. Combine the fields using radix 16, not radix 2: V_max = (1−2−24)1663 = (1−2−24)2252 ≈ 7.23700515 × 1075.

5. Convert to the requested nearest power of ten. log10(V_max) = log10(1−2−24) + 63log10(16) ≈ 75.85956. Rounding the exponent to the nearest integer gives 76, hence the nearest power is 1076. The exact maximum above distinguishes the representable value from this order-of-magnitude answer.

Original paper, page 7

2 marks · MCQ
Report issue

Floating-point loss of a small addend

Data Representation & Arithmetic

Question 2.14, GATE 2000: With 32-bit floating-point A=2·10^30,B=−2·10^30,C=1, perform X=A+B;Y=A+C;X=X+C;Y=Y+B. Choose(X,Y) from(1,1),(1,0),(0,1),(0,0).
Tap to enlarge
Your answer
Answer & solution

Answer: B under conventional single-precision rounding (no official key was published)

Step 1: Stored A and B are exact sign opposites, so A+B cancels to zero; subsequently X=0+1=1.

Step 2: Near magnitude 2·1030, single precision has a spacing vastly greater than 1. Thus A+1 rounds back to A, losing the small addend. Adding B afterward cancels to zero, giving Y=0.

Therefore B. This demonstrates nonassociativity of finite-precision addition. It assumes the stated 32-bit operations/rounding rather than an optimizer reassociating expressions or a wider intermediate format.

Original paper, page 5

Report issue

BCD accumulator at the carry branch

Data Representation & Arithmetic

Question 11(a)(i), GATE 2000: B and C contain packed-BCD values 00…99. Program: S1: MVI A,99H; MVI D,00H; SUB C; ADD B; DAA; S2: JC S3; MOV E,A; MVI A,99H; SUB E; MOV E,A; JZ S4; MVI D,FFH; JMP S4; S3: INR A; DAA; MOV E,A; S4: … . GFG prints INR A; GateForum prints INC A, which is not an 8085 mnemonic. Interpret the latter as INR for the architectural analysis.

Task: For (B,C)=(44,25) and (33,46), find A at S2.
Question 11(a)(i), GATE 2000: B and C contain packed-BCD values 00…99. Program: S1: MVI A,99H; MVI D,00H; SUB C; ADD B; DAA; S2: JC S3; MOV E,A; MVI A,99H; SUB E; MOV E,A; JZ S4; MVI D,FFH; JMP S4; S3: INR A; DAA; MOV E,A; S4: … . GFG prints INR A; GateForum prints INC A, which is not an 8085 mnemonic. Interpret the latter as INR for the architectural analysis.

Task: For (B,C)=(44,25) and (33,46), find A at S2.
Question 11(a)(i), GATE 2000: B and C contain packed-BCD values 00…99. Program: S1: MVI A,99H; MVI D,00H; SUB C; ADD B; DAA; S2: JC S3; MOV E,A; MVI A,99H; SUB E; MOV E,A; JZ S4; MVI D,FFH; JMP S4; S3: INR A; DAA; MOV E,A; S4: … . GFG prints INR A; GateForum prints INC A, which is not an 8085 mnemonic. Interpret the latter as INR for the architectural analysis.

Task: For (B,C)=(44,25) and (33,46), find A at S2.
Tap to enlarge
Shared context

B and C contain packed-BCD values 00…99. Program: S1: MVI A,99H; MVI D,00H; SUB C; ADD B; DAA; S2: JC S3; MOV E,A; MVI A,99H; SUB E; MOV E,A; JZ S4; MVI D,FFH; JMP S4; S3: INR A; DAA; MOV E,A; S4: … . Interpret the latter as INR for the architectural analysis.

Answer & solution

Answer: A=18H (CY=1) and A=86H (CY=0), respectively. (no official key was published)

1. All shown register inputs are packed BCD, so decimal 44 means byte 44H, not byte 2CH. MVI D does not change the accumulator or arithmetic flags.

2. First pair: 99H−25H=74H. ADD 44H gives B8H, with no low-nibble auxiliary carry (4+4=8). DAA corrects the invalid high decimal digit by adding 60H, producing 118H: A=18H and CY=1 at S2.

3. Second pair: 99H−46H=53H. ADD 33H gives 86H, already valid BCD, with no carry or auxiliary carry. DAA makes no correction: A=86H and CY=0.

4. The decimal interpretation is 99−25+44=118, whose lower two digits are 18 with a carry, and 99−46+33=86 without a carry. This part ends before INR and the second DAA, so the later program defect does not change these answers.

Original paper, page 8

Report issue

Tracing BCD output registers

Data Representation & Arithmetic

Question 11(a)(ii), GATE 2000: B and C contain packed-BCD values 00…99. Program: S1: MVI A,99H; MVI D,00H; SUB C; ADD B; DAA; S2: JC S3; MOV E,A; MVI A,99H; SUB E; MOV E,A; JZ S4; MVI D,FFH; JMP S4; S3: INR A; DAA; MOV E,A; S4: … . GFG prints INR A; GateForum prints INC A, which is not an 8085 mnemonic. Interpret the latter as INR for the architectural analysis.

Task: For (B,C)=(44,25) and (33,46), find D,E at S4.
Question 11(a)(ii), GATE 2000: B and C contain packed-BCD values 00…99. Program: S1: MVI A,99H; MVI D,00H; SUB C; ADD B; DAA; S2: JC S3; MOV E,A; MVI A,99H; SUB E; MOV E,A; JZ S4; MVI D,FFH; JMP S4; S3: INR A; DAA; MOV E,A; S4: … . GFG prints INR A; GateForum prints INC A, which is not an 8085 mnemonic. Interpret the latter as INR for the architectural analysis.

Task: For (B,C)=(44,25) and (33,46), find D,E at S4.
Question 11(a)(ii), GATE 2000: B and C contain packed-BCD values 00…99. Program: S1: MVI A,99H; MVI D,00H; SUB C; ADD B; DAA; S2: JC S3; MOV E,A; MVI A,99H; SUB E; MOV E,A; JZ S4; MVI D,FFH; JMP S4; S3: INR A; DAA; MOV E,A; S4: … . GFG prints INR A; GateForum prints INC A, which is not an 8085 mnemonic. Interpret the latter as INR for the architectural analysis.

Task: For (B,C)=(44,25) and (33,46), find D,E at S4.
Tap to enlarge
Shared context

B and C contain packed-BCD values 00…99. Program: S1: MVI A,99H; MVI D,00H; SUB C; ADD B; DAA; S2: JC S3; MOV E,A; MVI A,99H; SUB E; MOV E,A; JZ S4; MVI D,FFH; JMP S4; S3: INR A; DAA; MOV E,A; S4: … . Interpret the latter as INR for the architectural analysis.

Answer & solution

Answer: Literal 8085: (D,E)=(00H,79H) and (FFH,13H). Intended subtraction output for first pair is (00H,19H), requiring a carry-clearing correction. (no official key was published)

1. For the first pair S2 has A=18H,CY=1. JC goes to S3 and D remains 00H. INR A makes A=19H but, on 8085, does not change carry. Therefore CY is still 1.

2. The following DAA uses that retained carry and adds 60H, producing 79H. MOV E,A therefore stores E=79H. It is incorrect to report literal E=19H while silently treating INR as a carry-clearing operation.

3. For the second pair S2 has A=86H,CY=0, so JC is not taken. MOV E,A stores 86H; then A=99H−86H=13H and MOV E,A stores 13H. The result is nonzero, so JZ is not taken and D becomes FFH. Final pair is (FFH,13H).

4. The apparent intent is a signed magnitude: D=00H for nonnegative B−C, FFH for negative, and E the BCD magnitude. That intended first result would be 19H. Replacing INR A by ADI 01H clears the inherited carry for these reachable values and gives the intended result after DAA; this is a proposed repair, not text present in the source.

5. The paper’s clear INR resolves the mnemonic but not the retained-carry defect. Both literal and intended interpretations must remain visible until an authoritative erratum is available.

Original paper, page 8

Descriptive
Report issue

General behavior of the BCD difference program

Data Representation & Arithmetic

Question 11(b), GATE 2000: B and C contain packed-BCD values 00…99. Program: S1: MVI A,99H; MVI D,00H; SUB C; ADD B; DAA; S2: JC S3; MOV E,A; MVI A,99H; SUB E; MOV E,A; JZ S4; MVI D,FFH; JMP S4; S3: INR A; DAA; MOV E,A; S4: … . GFG prints INR A; GateForum prints INC A, which is not an 8085 mnemonic. Interpret the latter as INR for the architectural analysis.

Task: Express D and E at S4 as functions of the decimal values b,c represented by B,C.
Question 11(b), GATE 2000: B and C contain packed-BCD values 00…99. Program: S1: MVI A,99H; MVI D,00H; SUB C; ADD B; DAA; S2: JC S3; MOV E,A; MVI A,99H; SUB E; MOV E,A; JZ S4; MVI D,FFH; JMP S4; S3: INR A; DAA; MOV E,A; S4: … . GFG prints INR A; GateForum prints INC A, which is not an 8085 mnemonic. Interpret the latter as INR for the architectural analysis.

Task: Express D and E at S4 as functions of the decimal values b,c represented by B,C.
Tap to enlarge
Shared context

B and C contain packed-BCD values 00…99. Program: S1: MVI A,99H; MVI D,00H; SUB C; ADD B; DAA; S2: JC S3; MOV E,A; MVI A,99H; SUB E; MOV E,A; JZ S4; MVI D,FFH; JMP S4; S3: INR A; DAA; MOV E,A; S4: … . Interpret the latter as INR for the architectural analysis.

Answer & solution

Answer: If b≤c: E=BCD(c−b), D=FFH for b<c and 00H for equality. If b>c: D=00H, literal E=BCD(b−c)+60H (byte arithmetic), not the intended BCD(b−c). (no official key was published)

1. Define enc(t)=16⌊t/10⌋+(t mod 10) for 0≤t≤99. Since each digit of 99 exceeds or equals the corresponding digit of C, 99H−C is the packed-BCD nine’s complement enc(99−c).

2. ADD B followed by DAA computes 99−c+b. If b>c its decimal value is 100…198, so CY=1 and A=enc(b−c−1). If b≤c, CY=0 and A=enc(99−(c−b)).

3. When b≤c, the no-carry path subtracts this BCD nine’s complement from 99H, giving E=enc(c−b). Zero leaves D=00H; otherwise D becomes FFH. This branch correctly implements zero or a negative signed magnitude.

4. When b>c let d=b−c∈[1,99]. INR changes enc(d−1) by one and leaves CY=1. DAA performs the required low-digit correction, but also adds 60H because carry was preserved. Therefore the literal E is enc(d)+60H (mod 256), with D=00H. For example d=19 gives 79H and d=40 gives A0H, even an invalid BCD digit.

5. The intended function is D=00H if b≥c else FFH, E=enc(|b−c|). It becomes correct if S3 uses ADI 01H instead of INR A: the ordinary addition resets carry appropriately before the final DAA. Do not label the intended function as the unmodified program’s actual behavior.

Original paper, page 8

1 mark · MCQ
Report issue

Booth recoding of a negative integer

Data Representation & Arithmetic

Question 1.20, GATE 1999: Find the eight Booth signed digits for decimal −57, most significant first; option B is 0,−1,0,0,+1,0,0,−1.
Question 1.20, GATE 1999: Find the eight Booth signed digits for decimal −57, most significant first; option B is 0,−1,0,0,+1,0,0,−1.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

The eight-bit two’s-complement representation of −57 is 11000111, obtained from 57=00111001 by inversion and adding one. Append b[−1]=0 and use signed digit d[i]=b[i−1]−b[i]. From low to high the digits are −1,0,0,+1,0,0,−1,0. Reversing them gives 0,−1,0,0,+1,0,0,−1, option B. The weighted check is −26+23−20=−64+8−1=−57. The negative sign in the question is essential.

Original paper, page 2

1 mark · MCQ
Report issue

Array-multiplier critical path

Data Representation & Arithmetic

Question 1.21, GATE 1999: For multiplying two n-bit numbers using an array multiplier, is maximum output delay O(n²),O(n),O(log n),or O(1)?
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

The array contains quadratically many partial-product cells, but delay measures the longest dependent path rather than the total number of cells. In a regular array multiplier, carry/sum information traverses only a linear number of cell stages along a path to the final output. With bounded gate delay per stage, the critical delay is O(n), B. A logarithmic tree multiplier is a different organization; counting all n² cells as if they operated serially incorrectly gives A.

Original paper, page 3

1 mark · MCQ
Report issue

Interpreting an eight-bit octal pattern

Data Representation & Arithmetic

Question 1.17, GATE 1998: Octal 342 is treated as an eight-bit integer on an 8085. What decimal value does it represent? Forum options include 226 and−30.
Question 1.17, GATE 1998: Octal 342 is treated as an eight-bit integer on an 8085. What decimal value does it represent? Forum options include 226 and−30.
Tap to enlarge
Your answer
Answer & solution

Answer: 226 unsigned; −30 signed twos complement (no official key was published)

Convert 342₈=3·64+4·8+2=226, whose eight bits are 11100010. The 8085 architecture does not automatically attach one language-level signedness to every stored byte; the use determines interpretation. The source does not explicitly say signed. The paper’s faint/missing minus on its D further complicates the option mapping, so both interpretations are retained rather than asserting a unique official answer.

Original paper, page 2

1 mark · MCQ
Report issue

Hierarchical carry-lookahead delay

Data Representation & Arithmetic

Question 2.5, GATE 1997: An N-bit adder uses 4-bit 74181 ALUs and 4-bit 74182 carry generators, with N divisible by 4. What is best asymptotic addition delay?
Tap to enlarge
Your answer
Answer & solution

Answer: B: proportional to log N (no official key was published)

A four-way carry generator combines propagate/generate information for four lower-level groups. Cascading these in a balanced hierarchy reduces the number of groups by a factor of four per level. Therefore carry information traverses O(log₄ N)=O(log N) levels, followed by constant local sum-generation work. B is the best bounded-fan-in architecture among the choices. A serial chain would take linear time, but is not the best organization; constant delay would require unbounded fan-in or a different physical model.

Original paper, page 2

2 marks · MCQ
Report issue

8085 decimal adjustment

Data Representation & Arithmetic

Question 5.2, GATE 1997: Execute MVI A, 55H; MVI C, 25H; ADD C; DAA. Find final A among 7AH, 80H, 50H, 22H.
Tap to enlarge
Your answer
Answer & solution

Answer: B: 80H (no official key was published)

Binary addition first gives 55H+25H=7AH. The low nibble A hexadecimal represents 10, which is invalid as one BCD digit. DAA adds 06H to correct that nibble, producing 80H. The resulting high nibble 8 is valid, so no further 60H correction is required. Thus B. Interpreting the initial bytes as packed decimal 55 and 25 confirms the decimal sum 80; stopping before DAA would incorrectly choose 7AH.

Original paper, page 5

2 marks · Descriptive
Report issue

Finite-mantissa encodings of two numbers

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

2 marks · Descriptive
Report issue

Floating-point addition with explicit rounding

Data Representation & Arithmetic

Question 72(b), 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. Show the floating-point addition of A and B.
Question 72(b), 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. Show the floating-point addition of A and B.
Tap to enlarge
Answer & solution

Answer: With five-bit mantissa chopping: result (0 11111,0 110)=62. Under round-to-nearest/ties-to-even throughout, result=64 instead. (no official key was published)

Use the chopping encodings A≈.11011₂×26=54 and B≈.10011₂×24=9.5. To add, align both to the larger exponent +6. Shifting B's fraction right by two places gives .0010011₂×26. With only five fraction positions and chopping on alignment, this becomes .00100₂×26=8.

The stored-width addition is
  .11011 × 2^6
+ .00100 × 2^6
= .11111 × 2^6.

The mantissa is already normalized, lying between 1/2 and 1, and has five fraction bits. There is no carry that requires an exponent increment. Store mantissa 0|11111 and exponent 0|110, representing (31/32)×64=62. Both fields are within range.

Keeping guard bits changes the intermediate arithmetic but not this particular chopped final answer. With full aligned precision, the represented inputs sum to .1111111₂×26=63.5. Chopping that result to five fraction bits again yields .11111₂×26=62. Thus a final value of 62 does not establish whether guard bits were used; both stated chopping paths happen to agree here.

Under a different policy, round-to-nearest with ties-to-even encodes the inputs as 54 and 10. Their exact sum is 64=.10000₂×27, already representable, so the stored result is mantissa 0|10000, exponent 0|111. The true decimal-input sum is 64.5, which also rounds to 64 at this precision. The source does not choose between these policies. This solution therefore reports 62 only under chopping, with 64 as a clearly separate rounded alternative; it does not present an unspecified hardware behavior as an official answer.

Original paper, page 10

1 mark · Descriptive
Report issue

Percentage error of the computed sum

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

1 mark · MCQ
Report issue

Worst multiplier pattern for Booth recoding

Data Representation & Arithmetic

Question 1.23, GATE 1996: Which multiplier pattern gives frequent operations in Booth multiplication, including an alternating 1010… pattern?
Tap to enlarge
Your answer
Answer & solution

Answer: A: alternating bits (no official key was published)

Booth recoding examines adjacent multiplier bits, with an appended low-order zero. Equal pairs 00 and 11 require no add/subtract; transitions 01 and 10 trigger addition or subtraction. An alternating pattern therefore triggers operations at almost every position. A long run of ones is cheaper because only its boundaries trigger work. Thus the alternating candidate A is worst among the listed patterns under the ordinary radix-2 Booth operation count, even though the number of shift steps remains fixed by word width.

Original paper, page 3

1 mark · MCQ
Report issue

Normalized mantissa versus full floating value

Data Representation & Arithmetic

Question 1.25, GATE 1996: An 8-bit two’s-complement exponent and 24-bit sign-magnitude mantissa are shown. Choices for magnitude include 0.5 through 1−2^−23. What range is justified?
Tap to enlarge
Your answer
Answer & solution

Answer: D for the normalized fractional mantissa; not the full floating value (no official key was published)

With one sign bit and 23 fraction bits, conventional fractional normalization puts a 1 in the first fraction position. The smallest magnitude of the mantissa is therefore 0.100…₂=1/2; the largest is 0.111…₂=1−2−23. This gives choice D for the mantissa. The literal wording asks about normalized numbers, however. Including the signed exponent e∈[−128,127] gives magnitudes from 2−129 to (1−2−23)2127, assuming all exponent patterns are available. No listed short interval describes that full range. The binary-point and reserved-exponent conventions are also not stated explicitly.

Original paper, page 3

Descriptive
Report issue

Evaluate unsigned byte arithmetic

Data Representation & Arithmetic

Question 3, GATE 1995: A and B are unsigned bytes with A=5CH and B=92H; W,X,Y are unsigned bytes and Z is a two-byte unsigned integer. Execute X:=A+B; Y:=abs(A−B); W:=A−B; Z:=A*B. Give the stored values and error conditions. GFG supplies this Y statement; GateForum prints malformed abs(bA-b).
Question 3, GATE 1995: A and B are unsigned bytes with A=5CH and B=92H; W,X,Y are unsigned bytes and Z is a two-byte unsigned integer. Execute X:=A+B; Y:=abs(A−B); W:=A−B; Z:=A*B. Give the stored values and error conditions. GFG supplies this Y statement; GateForum prints malformed abs(bA-b).
Tap to enlarge
Answer & solution

Answer: With widened intermediates: X=EEH, Y=36H, Z=3478H; W underflows (CAH if wrapping). (no official key was published)

Convert the hexadecimal operands first: A=92 and B=146. Their sum is 238=EEH, within the unsigned-byte range 0 through 255. Their mathematical difference is −54, so its absolute value is 54=36H. The product is 13432=3478H, within the unsigned 16-bit range. Thus X and Z fit their declared destinations and Y fits if abs receives the mathematical signed difference.

W cannot represent −54. A checked implementation reports a range/underflow error; an explicitly wrapping 8-bit implementation stores −54 modulo 256=202=CAH. These are distinct execution models, not two simultaneous outcomes. If execution traps at W, the subsequent assignment to Z is not reached.

There is also an intermediate-arithmetic ambiguity: if A−B is evaluated as an unsigned 8-bit operation before abs, it becomes CAH=202 and abs leaves it unchanged, giving Y=CAH instead of 36H. Similarly Z requires multiplication in a sufficiently wide type, not truncation to a byte before assignment. The pseudocode does not specify these rules or byte order. Report Z as the word 3478H, with bytes 34H and 78H in unspecified order.

Original paper, page 5

Report issue

Two’s-complement range

Data Representation & Arithmetic

Question 2.7, GATE 1994: Give the representable integer range of an n-bit two’s-complement word, including the sign bit.
Tap to enlarge
Answer & solution

Answer: −2^(n−1) ≤ N ≤ 2^(n−1)−1 (no official key was published)

The most significant bit has weight −2n−1; the remaining bits have positive weights 1,2,…,2n−2. The smallest value sets only the sign bit, giving −2n−1. The largest clears it and sets all remaining bits, whose sum is 2n−1−1. Thus the range has one more negative value than positive value. Zero uses one of the 2n codes, and there is no separate negative-zero representation.

Original paper, page 3