GATE CS 2024 Set 2 — Question 14

MCQ+1 / -0.33MediumIEEE 754 Floating PointNumber Systems & ArithmeticDigital Logic

Digital Logic → Number Systems & Arithmetic → IEEE 754 Floating Point

Last updated

Question

The format of a single-precision floating-point number as per the IEEE 754 standard is:
IEEE 754 single precision format table
Choose the largest floating-point number among the following options.
A.
Sign 0, Exponent 0111 1111, Mantissa 1111 1111 1111 1111 1111 111
B.
Sign 0, Exponent 1111 1110, Mantissa 1111 1111 1111 1111 1111 111
C.
Sign 0, Exponent 1111 1111, Mantissa 1111 1111 1111 1111 1111 111
D.
Sign 0, Exponent 0111 1111, Mantissa 0000 0000 0000 0000 0000 000

Correct answer

(B) [figure]

Solution

In the IEEE 754 single-precision floating-point standard, the value of a normalized number is represented as:V=(1)S×2E127×(1.M)V = (-1)^S \times 2^{E - 127} \times (1.M)where SS is the sign bit, EE is the biased exponent, and MM is the fractional part of the mantissa.
Let's evaluate the options:
  • Option (A): S=0S = 0, E=(01111111)2=127E = (01111111)_2 = 127, M=(111...1)2=1223M = (111...1)_2 = 1 - 2^{-23}.

Value 2127127×(1+1)=20×2=2\approx 2^{127-127} \times (1 + 1) = 2^0 \times 2 = 2.
  • Option (B): S=0S = 0, E=(11111110)2=254E = (11111110)_2 = 254, M=(111...1)2=1223M = (111...1)_2 = 1 - 2^{-23}.

Value 2254127×(1+1)=2127×2=2128\approx 2^{254-127} \times (1 + 1) = 2^{127} \times 2 = 2^{128}. This is the largest finite representable number in single precision.
  • Option (C): S=0S = 0, E=(11111111)2=255E = (11111111)_2 = 255, M0M \neq 0.

According to the standard, an exponent of all 1s with a non-zero mantissa represents NaN (Not a Number). If the mantissa were zero, it would represent ++\infty.
  • Option (D): S=0S = 0, E=(01111111)2=127E = (01111111)_2 = 127, M=0M = 0.

Value =2127127×(1.0)=20×1=1= 2^{127-127} \times (1.0) = 2^0 \times 1 = 1.
Comparing the finite values, 21282^{128} (Option B) is significantly larger than 22 (Option A) or 11 (Option D). NaN is not a comparable value. Therefore, Option (B) is the correct answer.

More questions on Number Systems & Arithmetic

Practice GATE CS PYQs with adaptive difficulty

Timed practice, skill tracking, and AI explanations — free to start.

Start practicing free