The set/reset latch provides hysteresis for the comparator. The circuit provides a noninverting characteristic on the Q output and an inverting characteristic on the /Q output (a and b). Exchange the comparator outputs with the latch inputs for both circu