Concept

Overflow and Underflow in Computer Science

Overflow and underflow are both errors resulting from a shortage of space.

  • Overflow: Overflow indicates that we have done a calculation that resulted in a number larger than the largest number we can represent.

  • Underflow: Underflow is a bit trickier to understand because it has to do with precision in floating points. Again, due to the discrete nature of storage in computers, we cannot store an arbitrarily small number either. The floating-point convention comes up with techniques to represent fractional numbers. When we use these in calculations that result in a smaller number than our least value, we again exceed our designated space.

1

1

Updated 2021-03-19

Tags

Data Science

Learn After