It compares two input voltage levels and gives digital output to indicate the larger one. The two input pins are termed as inverting (V-) and non-inverting (V+). The output pin goes high when voltage at V+ is greater than that at V-, and vice versa. In common applications, one of the pins is provided with a reference voltage and the other one receives analog input from a sensor or any external device. If inverting pin (V-) is set as reference, then V+ must exceed this reference to result in high output. For inverted logic, the reference is set at V+ pin.