Computer Fundamentals

Q1: The accuracy of the floating point numbers representable in two 16 bit words of a computer is approximately

A 16 digits

B 6 digits

C 4 digits

D All of the above

E None of the above

ANS:B - 6 digits

It's quite simple: a 32-bit IEEE-754 float has 23+1 bits for the mantissa (AKA significant, in IEEE-speak). The size of the mantissa more or less determines the number of representable digits.

To get the number of significant digits, simply calculate log10(224), which is approx. 7.22. (or, if you think that only 23 bits count, as the top bit is fixed anyway, you get log10(223), which is approx. 6.92). So in effect, you have about 6-7 significant digits, for normalised values.

The same can be done for 64-bit floating point values (doubles). They have 52 (or 53) bits to store the mantissa, so calculate log10(252), which is approx. 15.6 (or 15.9 for 53 bits), which gives you about 15 significant digits.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.