This circuit compates 2 input signals. Sensitivity is 50mV. Upper side of the circuit is a simple latch. It stores the output. Downside contains a differential amplifier and a biasing circuit for P type mosfets of differential amp. Change 1V and observe comparator operation. Enjoy!