Correct Answer - Option 2 : 0xC0800000
Concept:
In IEEE- 754 single precision format, a floating-point number is represented in 32 bits.
Sign bit (MSB)
|
Biased Exponent (E’)
(8 bits)
|
Normalized Mantissa (M’) (23 bits)
|
Sign bit value 0 means positive number, and 1 means a negative number.
The floating-point number can be obtained by formula: ± 1. M × 2(E-127)
Data:
Content of R1: 0x 42200000 (0x means Hexadecimal notation)
Content of R2: 0x C1200000
Calculation:
Content of R1 in Hex (0x) is 42200000. After converting into binary, it can be represented in IEEE- 754 format as:
0
|
100 0010 0
|
010 0000 0000 0000 0000 0000
|
Sign bit is 0 i.e. the number is positive
Biased Exponent (E’) = 100 0010 0 = 132
Normalized Mantissa (M) = 010 0000 0000 0000 0000 0000 = .25
Therefore, the number in register R1 = + 1.25 * 2(132-127) = 1.25 × 32 = 40
Content of R2 in Hex (0x) is C1200000. After converting into binary, it can be represented in IEEE- 754 format as:
1
|
100 0001 0
|
010 0000 0000 0000 0000 0000
|
Sign bit is 1 i.e. the number is negative
Biased Exponent (E’) = 100 0001 0 = 130
Normalized Mantissa (M) = 010 0000 0000 0000 0000 0000 = .25
Therefore, the number in register R1 = - 1.25 * 2(130-127) = -1.25 * 8 = -10
R3 = R1/R2 = 40/-10 = -4
Since the number is negative, Sign bit (MSB) = 1
Converting 4 into binary of a floating point gives: (100.0)2
Representing it into normalized form gives: (1.000000….) × 22
Therefore, Mantissa is 23 bits of all 0s
Biased Exponent (E’) = E+ 127 = 2+127 = 129 = (10000001)2
It can be represented in IEEE- 754 format as:
1
|
100 0000 1
|
000 0000 0000 0000 0000 0000
|
Converting it into Hex format gives: 0x C0800000