Outputs 0 when both voltages are equal . Bottom battery is the voltage reference and the top one is the input. When the reference and input are equal, the circuit output 0. If input is over reference voltage than output will produce any value over 0, and if input is lower than reference that output will produce something less than 0.