Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. A digital
comparator or magnitude comparator is a hardware electronic device that
takes two numbers as input in binary form and determines whether one
number is greater than, less than or equal to the other number.
Comparators are used in a central processing units (CPU) and
microcontrollers. Examples of digital comparator include the CMOS 4063
and 4585 and the TTL 7485 and 74682-'89. The analog equivalent of
digital comparator is the voltage comparator. Many microcontrollers have
analog comparators on some of their inputs that can be read or trigger
an interrupt.