Consider three registers \(R1, R2\), and \(R3\) that store numbers in IEEE−754…

2020

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 = \frac {R1} {R2}\), what is the value stored in \(R3\) ?

  1. A.

    0x40800000

  2. B.

    0xC0800000

  3. C.

    0x83400000

  4. D.

    0xC8500000

Attempted by 114 students.

Show answer & explanation

Correct answer: B

Key idea: convert each hex word to its IEEE-754 value, divide, and convert the result back to hex.

  • Step 1: R1 = 0x42200000 → sign = +, exponent = 132 → 2^(132-127)=2^5, mantissa = 1.25 ⇒ value = +1.25×32 = +40.

  • Step 2: R2 = 0xC1200000 → sign = -, exponent = 130 → 2^(130-127)=2^3, mantissa = 1.25 ⇒ value = -1.25×8 = -10.

  • Step 3: Divide: R3 = R1/R2 = 40/(-10) = -4.0. The IEEE-754 single-precision encoding for -4.0 (sign = 1, exponent = 127+2 = 129, mantissa = 0) is 0xC0800000.

Answer: 0xC0800000

Explore the full course: Gate Guidance By Sanchit Sir