Comparators
The function of a comparator is to compare the magnitudes of two binary numbers to determine the relationship between them. In the simplest form, a comparator can test for equality using XNOR gates. Example: How could you test two 4-bit numbers for equality? Solution: AND the outputs of four XNOR gates.