Consider a computer system that stores floating-point numbers with 16-bit…
2007
Consider a computer system that stores floating-point numbers with 16-bit mantissa and an 8-bit exponent, each in two’s complement. The smallest and largest positive values which can be stored are
- A.
1 x 10^-128 and 2^15 x 10^128
- B.
1 x 10^-256 and 2^15 x 10^255
- C.
1 x 10^-128 and 2^15 x 10^127
- D.
1 x 10^-128 and (2^15 - 1) x 10^127
Attempted by 47 students.
Show answer & explanation
Correct answer: D
With an 8-bit two's-complement exponent, the exponent range is -128 to +127. With a 16-bit two's-complement mantissa, the largest positive mantissa is 2^15 - 1 and the smallest positive stored mantissa unit is 1. Therefore the smallest and largest positive values are 1 x 10^-128 and (2^15 - 1) x 10^127.