Hysteresis

also known as: Schmitt trigger

Deliberately giving a threshold two values: one for crossing upward, a lower one for crossing back down. The gap means a signal that just crossed can't immediately un-cross, so noise near the threshold can't make the output chatter.

In practice

Any comparator watching a slow or noisy signal needs it. A feedback resistor from output to the + input shifts the threshold away from the signal the instant it trips — the circuit version of 'make up your mind'. Width is set by a resistor ratio; 1% of VCC is a typical start.

See it for real