Exam-style question
Try this first
Which situation can cause overflow?.
- A.Adding two values produces a result above the maximum representable value
- B.Adding two values produces a result between the minimum and maximum representable values
- C.Storing a value that is exactly zero
- D.Removing leading zeroes from a binary representation
Model answer
What a good answer should say
- Adding two values produces a result above the maximum representable value
Explanation
Why this works
Overflow is caused when the result of a calculation is greater than the maximum value allowed by the fixed-size representation.
Common mistake
No common mistake is linked to this question yet.
