A comparator is an integrated circuit, similar to an operational amplifier, with two voltage sensing inputs (plus & minus) and a logic level output. Over a wide range of input voltage, if one input is a few mV higher than the other, then it sets the output to that logic level. For your...