have curcuits that respond to high and low input voltages use them to switch a R-S flip-flop use the flip-flop to turn off the high detector when a high has been seen most recently and to turn off the low detector when a low has been seen most recently.
design the high detector to pass no current when presented with a less than high input voltage and the low detector to pass no current when presented with a more than low input voltage,
block diagram ................ : : : high enaS flip ~Q--+ in---+ : flop : | .---->R Q--+--- out \\|/ | : : | ..in.......out.. :........: | : : | : low ena