GateAI
Number Representation and Arithmetic

GATE CSE 2020 · Q29

MCQ2 marksMedium

Time

Consider three registers R1, R2, and R3 that store numbers in IEEE-754 single precision floating point format. Assume that R1 and R2 contain the values (in hexadecimal notation) 0x42200000 and 0xC1200000, respectively. If R3=R1R2R3 = \frac{R1}{R2}, what is the value stored in R3?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: B) 0xC0800000

Number Representation and Arithmetic

To find the value stored in R3=R1R2R3 = \frac{R1}{R2}, let us decode the IEEE-754 single-precision (32-bit) representations of R1R1 and R2R2.

In IEEE-754 single precision:

  • Bit 31: Sign bit (SS)

  • Bits 30–23 (8 bits): Biased exponent (EE)

  • Bits 22–0 (23 bits): Fractional mantissa (MM)

  • Value =(−1)S×1.M×2E−127= (-1)^S \times 1.M \times 2^{E - 127}

### 1. Decoding R1=0x42200000R1 = \text{0x42200000}:

0x42200000=0⏟S 10000100⏟E 01000000000000000000000⏟M\text{0x42200000} = \underbrace{0}_{S} \ \underbrace{10000100}_{E} \ \underbrace{01000000000000000000000}_{M}
  • S=0S = 0 (Positive)

  • E=100001002=13210  ⟹  Actual Exponent=132−127=5E = 10000100_2 = 132_{10} \implies \text{Actual Exponent} = 132 - 127 = 5

  • M=0.0102=0.25M = 0.010_2 = 0.25

  • R1=+1.25×25=1.25×32=+40.0R1 = +1.25 \times 2^5 = 1.25 \times 32 = +40.0

### 2. Decoding R2=0xC1200000R2 = \text{0xC1200000}:

0xC1200000=1⏟S 10000010⏟E 01000000000000000000000⏟M\text{0xC1200000} = \underbrace{1}_{S} \ \underbrace{10000010}_{E} \ \underbrace{01000000000000000000000}_{M}
  • S=1S = 1 (Negative)

  • E=100000102=13010  ⟹  Actual Exponent=130−127=3E = 10000010_2 = 130_{10} \implies \text{Actual Exponent} = 130 - 127 = 3

  • M=0.0102=0.25M = 0.010_2 = 0.25

  • R2=−1.25×23=−1.25×8=−10.0R2 = -1.25 \times 2^3 = -1.25 \times 8 = -10.0

### 3. Computing R3R3:

R3=R1R2=+40.0−10.0=−4.0R3 = \frac{R1}{R2} = \frac{+40.0}{-10.0} = -4.0

### 4. Encoding −4.0-4.0 into IEEE-754 Single Precision:

  • S=1S = 1

  • −4.0=−1.0×22-4.0 = -1.0 \times 2^2

  • Actual Exponent =2  ⟹  Biased Exponent E=2+127=12910=100000012= 2 \implies \text{Biased Exponent } E = 2 + 127 = 129_{10} = 10000001_2

  • Mantissa fraction M=0.000…M = 0.000\dots

Binary representation:

1 10000001 000000000000000000000001 \ 10000001 \ 00000000000000000000000

Grouped into 4-bit nibbles:

1100 0000 1000 0000 0000 0000 0000 00002=0xC08000001100 \ 0000 \ 1000 \ 0000 \ 0000 \ 0000 \ 0000 \ 0000_2 = \text{0xC0800000}

Thus, the correct option is B.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Number Representation and Arithmetic previous year question is Q29 of the GATE CSE 2020 paper. Find more GATE CSE PYQs on Number Representation and Arithmetic in Computer Organization and Architecture, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 1 related Number Representation and Arithmetic PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Number Representation and Arithmetic in GATE CSE

GATE CSE 2020 Q29 is the only Number Representation and Arithmetic question in the GATE CSE papers so far.

How GATE tests Number Representation and Arithmetic

More from GATE CSE 2020

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2020 · Q29 · MCQ

Consider three registers R1, R2, and R3 that store numbers in IEEE-754 single precision floating point format. Assume that R1 and R2 contain the values (in hexadecimal notation) 0x42200000 and 0xC1200000, respectively. If R3 = (R1)/(R2), what is the value stored in R3?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.