|
This is a four bit comparator. The top bit of each of the sets of four bits is the highest value bit. If the top LED is on, then the top set of four bits is greater than the bottom set of four bits. If the bottom LED is on, then the bottom set of bits is greater. If the middle LED is on, then they are both equal. The way it works is that if the highest value bits are different, then it says that the one that is on is greater, but if they are equal then it says which is greater by the next highest value pair of bits. If those are equal, it looks for which of the next set of bits is greater, and if those are equal, then the process continues until it finds which set of bits is greater, or it finds that all bits are equal. In this design, if which one is greater is dependent on the lowest value pair of bits then the information has to carry through all of the stages stage by stage in a way resembling that of a ripple carry adder. Because of that, it has to be treated with that delay at all times just like a ripple carry adder has to be treated with that delay all of the time even if it doesn’t always take that long.
|