An analog comparator is an electronic device used to compare a measured voltage quantity with a reference value URef. The comparator inputs are analog and the output is digital (bi state).