Discussion
The format of a single-precision floating-point number as per the IEEE 754 standard is:
| Sign (1bit) | Exponent (8 bits) | Mantissa (23 bits) |
Choose the largest floating-point number among the following options.
Answer: B
The largest number is 0 1111 1110 1111 1111 1111 1111 1111 111.
All four have sign bit 0, so they are positive, and a larger exponent field gives a larger number. The exponent 1111 1111 is reserved: with a non-zero mantissa it encodes NaN (not a number), so the third pattern is not a number at all and cannot be the largest.
The largest usable exponent is 1111 1110 (254, an actual exponent of 127), and with an all-ones mantissa this pattern is the largest finite single-precision value, about \(3.4 \times 10^{38}\).
The first and fourth patterns have exponent 0111 1111 (127, an actual exponent of 0), giving values just under 2 and exactly 1.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development