Exam-style question
Try this first
Explain why both fixed-point and floating-point representations of decimal numbers may be inaccurate. Your answer should refer to binary fractions and the number of available bits.
Model answer
What a good answer should say
- Both representations store a decimal value using binary information.
- A real number is exact only when it can be represented as a binary fraction using the available number of bits.
- If the value requires more bits than are available, or if it cannot be represented exactly as a finite binary fraction, the representation must be rounded.
- Fixed-point and floating-point representations can therefore both contain an approximation rather than the original decimal value.
Explanation
Why this works
A full answer identifies the binary-fraction requirement, links inaccuracy to limited bit capacity, and explains that rounding produces an approximation. It should not claim that floating point is always exact.
Common mistake
No common mistake is linked to this question yet.
