Digital Logic
Underflow
The condition when a result is smaller than the minimum representable value, often occurring in subtraction or counters.
Detailed Explanation
Unsigned underflow occurs when subtracting from a smaller number (5 - 7 wraps to a large positive). Counter underflow is counting below zero. Floating-point underflow produces values too small to represent, resulting in zero or denormalized numbers.
Handling underflow depends on context—wrapping (modular arithmetic), saturation (clamp to minimum), or exception signaling. Saturating arithmetic is common in DSP applications.
