What is the function of hysteresis in a comparator?
Explanation
Without hysteresis a comparator reacts to every wiggle of an input sitting near the threshold, so noise produces a burst of output transitions; feeding a little of the output back shifts the threshold after each transition, so the input must move by a definite amount before the output can switch back. Hysteresis does not AC-couple the input, does not force continuous switching, and in fact trades away a little sensitivity.