GATE / CS ARCHIVE

GATE CSE 2020 / QUESTION 29

GATE CSE 2020 Q29

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

GATE 2020, Q29 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