What is a comparator?
A comparator is a device that compares the voltage of the input signal (analog) with the reference voltage (Vref) and outputs either a high or low signal according to whether the input signal voltage is higher or lower. A comparator can also be interpreted as a 1-bit A/D converter. As with an operational amplifier, a comparator has five pins and is represented by a triangle symbol in circuit diagrams. A typical example of usage is shown below.