GATE Computer Science · Digital Logic, Computer Organization, and Discrete Mathematics · easy

What is the decimal value of the IEEE-754 single-precision (32-bit) floating-point number represented in hexadecimal as 0xC1200000?

Published · Last updated · checked before publication — how we verify questions

Options

  • A-5.0 obtained by using an exponent bias of 128 instead of the IEEE-754 bias of 127
  • B+10.0 obtained by ignoring the most-significant sign bit S = 1 in 0xC1
  • C-10.0 from sign = 1, biased exponent = 130 (e = 3), and significand = 1.25Correct answer
  • D-2.0 obtained by omitting the implicit leading 1 before the fractional mantissa

Answer: C. -10.0 from sign = 1, biased exponent = 130 (e = 3), and significand = 1.25

0xC1200000 expands to 1100 0001 0010 0000 ... in binary. Regroup it as sign, exponent and fraction fields: 1 | 10000010 | 01000000000000000000000. The sign bit is 1, so the number is negative. The biased exponent 10000010 equals 130, and single precision uses a bias of 127, so the true exponent is 3. The fraction .01 in binary is 0.25. A normalized number has an implicit leading 1, so the significand is 1.25. The value is (-1)^1 x 1.25 x 2^3 = -10.0. The most common trap is mis-regrouping the hex bits. The exponent field starts after the first bit, so the hex digit boundaries do not line up with the field boundaries. Candidates also forget the hidden 1 or use the wrong bias. A quick check is that 10.0 is 1.25 x 2^3, and the leading hex digit C means the sign is negative.

Why the other options are wrong

  • A. -5.0 obtained by using an exponent bias of 128 instead of the IEEE-754 bias of 127 — A bias of 128 would give an exponent of 2 and a value of -1.25 x 4 = -5.0. Single precision defines the bias as 2^7 - 1 = 127, so this option rests on a wrong constant. The value -5.0 would need a different bit pattern, 0xC0A00000.
  • B. +10.0 obtained by ignoring the most-significant sign bit S = 1 in 0xC1 — Hex digit C is 1100 in binary, so the top bit, which is the sign bit, is 1 and the number is negative. Dropping the sign gives +10.0, which is the magnitude only. It is not the value of this encoding, which is 0xC1200000.
  • D. -2.0 obtained by omitting the implicit leading 1 before the fractional mantissa — Treating the significand as 0.25 with no hidden 1 would give 0.25 x 8 = 2.0, or -2.0 with the sign. Normalized single-precision numbers always have an implicit leading 1, so the significand is 1.25. Omitting the leading 1 is only valid for denormals, where the exponent field is 0, and this number is not one.

All Digital Logic, Computer Organization, and Discrete Mathematics questions and the topic overview →

GATE is a mark of the Indian Institute of Science and the Indian Institutes of Technology. PrepIQ Hub is not affiliated with, endorsed by, or sponsored by the GATE Committee.