Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
428 views
in General by (95.2k points)
closed by

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. 0x40800000
2. 0xC0800000
3. 0x83400000
4. 0xC85800000

1 Answer

0 votes
by (95.4k points)
selected by
 
Best answer
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

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...