Digital Comparators consist of standard AND, NOR, and NOT gates that compare digital signals in input terminals and produce an output depending on the status of these inputs.
For example, in addition to the ability to add and subtract binary numbers, we need to be able to compare them and determine whether the value of entry A is greater, smaller, or equal to the value in entry B. The digital comparator performs this process using several logic gates that work on the principles of boolean algebra. There are two main types of digital comparators available, and these.
- Identity Comparator – Identity Comparator is a digital comparator with only one output terminal when A = B, A = B = 1 (High) or A = B = 0 (low).
- Size Comparator – A magnitude Comparator is a digital comparator with three output terminals, one for equality, A = B larger, A > B and A < B'den küçük
The purpose of a digital comparator is to compare a series of variables or unknown numbers, for example A (A1, A2, A3,…. B (B1, B2, B3, …. Ms., etc.) and produces an output condition depending on the result of the comparison. For example, a magnitude comparator consisting of two 1-bit (A and B) inputs will produce the following three output conditions when compared to each other.
1-Bit Digital Comparator Circuit
You can see two different features about the comparator from the accuracy table above. First, the circuit does not distinguish between two "0" or two "1", since output A = B is produced when both are equal. The output condition for A = B is similar to an Ex-NOR function (equivalence) in each of the n-bits to a commonly found logic gate: Q = A ≤ B
Digital comparators actually use Ex-NOR gates in their designs to compare their own pairs of bits. When we compare two binary or BCD values or variables with each other, we compare the logic of "0" against the logic "1", which summarizes in the shortest way where the term magnitude comparator comes from.
4-Bit Size Comparator
Some digital comparators available on the market, such as the TTL 74LS85 or CMOS 4063 4-bit size comparator, have additional input terminals that allow more individual comparators to "cascade" together to compare words larger than 4-bit with "n"-bit size comparators. These cascading entries are directly linked to the corresponding outputs of the previous comparator, as shown to compare 8, 16, or even 32-bit words.
8-Bit Word Comparator
When comparing large binary or BCD numbers, as in the example above, the comparator begins by comparing the highest order bit (MSB) first to save time. If equality exists, A = B compares the next lowest bit and continues until it reaches the lowest order bit (LSB). If equality still exists, two numbers are defined as equals.
If inequality is found, A > B or A < B iki sayı arasındaki ilişki belirlenir ve ek alt sıra bitleri arasındaki karşılaştırma durur. The digital comparator is widely used in analog-digital converters (ADC) and arithmetic logic units (ALU) to perform various arithmetic operations.