4-bit magnitude comparator, SN74S85N, Texas Instruments
This four-bit magnitude comparator performs comparison of straight binary and straight BCD (8-4-2-1) codes. This device is fully expandable to any number of bits without external gates. A word of greater length may be compared by connecting comparators in cascade. The A > B, A < B, and A=B outputs of a stage handling less-significant bits are connected to the corresponding A> B, A < B, and A = B inputs of the next stage handling more-significant bits. The stage handling the least-significant bits must have a high-level voltage applied to the A = B input. The cascading path of the '85 is implemented with only a two-gate-level delay to reduce overall comparison time for long words. An alternate method of cascading, which further reduces the comparison time, is shown in the typical application data.