Takes two voltage signals and compares them. Depending on which one is greater, the comparator output will be either the high, or low supply rail.