Exam-style question
Try this first
Explain the difference between overflow and underflow. Describe the circumstances in which each occurs.
Model answer
What a good answer should say
- Overflow occurs when a calculation produces a result greater than the maximum value that can be represented using the available fixed number of bits.
- Underflow occurs when a calculation produces a result less than the minimum value that can be represented using those bits.
- Both conditions arise because the representation has a fixed size and the result lies outside its permitted range.
Explanation
Why this works
A complete answer identifies the direction of the out-of-range result and links it to the limits imposed by the fixed number of available bits. A result above the upper limit is overflow; a result below the lower limit is underflow.
Common mistake
No common mistake is linked to this question yet.
