Digital Comparator Symbol
Definition: The Digital Comparator symbol represents a combinational logic functional block that compares two multi-bit binary numbers (A and B) and asserts one of three mutually exclusive outputs indicating whether A is greater than B (A>B), A equals B (A=B), or A is less than B (A<B), implemented by devices such as the 74HC85/7485 and defined as a functional block per IEEE Std 91-1984 / IEC 60617-12.
Also known as: magnitude comparator, binary comparator, digital magnitude comparator, 74HC85, 4-bit comparator, arithmetic comparator.
What the Digital Comparator symbol means
The Digital Comparator symbol denotes a logic circuit that evaluates two n-bit binary words and determines their relative magnitude. Unlike a simple XNOR equality checker, a magnitude comparator also determines the ordering (greater-than / less-than) relationship, making it suitable for range checking, sorting networks, and threshold detection in digital systems.
In circuit diagrams the digital comparator block appears in arithmetic logic units (ALUs), digital servo control systems comparing a setpoint to a measured value, priority encoders, and address range decoders. The three outputs (A>B, A=B, A<B) are always mutually exclusive: exactly one is asserted for any given input combination.
How to identify the Digital Comparator symbol
The Digital Comparator symbol is a labelled rectangle inscribed 'COMP' or 'Digital Comparator'. On the left side are the two groups of input bits: A0, A1 (representing the n-bit A operand) and B0, B1 (representing the n-bit B operand). On the right side are three outputs: gt (A>B), eq (A=B), and lt (A<B). For a 4-bit comparator (74HC85), four A and four B inputs are shown; the symbol here shows a simplified 2-bit representation. Cascade inputs (I_A>B, I_A=B, I_A<B) for chaining multiple comparators may be shown as additional left-side pins.
Function in a circuit
A digital magnitude comparator evaluates the binary values of inputs A (A0…An−1) and B (B0…Bn−1) using a tree of XNOR and AND gates. It first checks the most-significant bit pair; if they are equal, it proceeds to less-significant bits. The three mutually exclusive outputs A>B, A=B, and A<B indicate the magnitude relationship. Multiple 4-bit comparators (74HC85) can be cascaded using the cascade inputs to compare wider words (8-bit, 16-bit, etc.).
Standards: IEC vs ANSI
| IEC 60617 | IEC 60617-12 defines comparators as labelled functional blocks with 'COMP' notation. The standard uses a rectangle with input operands on the left and comparison result outputs on the right, following the general combinational logic block convention. |
|---|---|
| ANSI/IEEE 315 | IEEE Std 91-1984 / ANSI Y32.14 uses the same labelled rectangle for digital comparators. The 74HC85 datasheet follows IEEE 91 symbol conventions, showing operand inputs and the three comparison outputs. |
| Key difference | IEC 60617-12 and IEEE Std 91-1984 use essentially identical labelled rectangular blocks for the digital comparator. The notation convention may slightly differ (IEC: 'COMP'; IEEE: 'COMP' or 'MAG COMP') but the block structure and pin arrangement are the same. |
Terminals / pins
| Pin | Name |
|---|---|
| a0 | A0 |
| a1 | A1 |
| b0 | B0 |
| b1 | B1 |
| gt | A>B |
| eq | A=B |
| lt | A<B |
Typical values
Bit width: 1-bit to n-bit (4-bit for 74HC85/7485 family; wider by cascading). Supply voltage: 2–6 V (74HC family), 4.75–5.25 V (74LS family). Propagation delay: 10–20 ns at 5 V for 74HC85. Cascade connection allows building 8-bit comparator from two 4-bit units. Common ICs: 74HC85, 74LS85, 74HCT85.
Where the Digital Comparator symbol is used
- ALU (Arithmetic Logic Unit) magnitude comparison operations in microprocessors and FPGAs.
- Digital thermostat and setpoint controllers comparing a digital temperature reading to a programmed threshold.
- Position control servo systems comparing encoder count to a target position register.
- Priority encoder circuits determining which input has the highest binary value.
- Address range decoding verifying that a memory address falls within a defined range.
- Digital sorting networks comparing adjacent elements in hardware sorting algorithms.
- Packet protocol hardware checking sequence numbers against expected values.
Example
In a digital temperature controller, an 8-bit ADC produces a digital temperature value and an 8-bit register stores the user-programmed setpoint. Two 74HC85 4-bit comparators are cascaded (one comparing bits 7–4, the other comparing bits 3–0, with cascade outputs chained) to form an 8-bit digital comparator. The A>B output drives a relay (heat off), A<B drives a relay (heat on), and A=B indicates the target temperature has been reached.
Key facts
- A Digital Comparator compares two n-bit binary numbers and asserts one of three mutually exclusive outputs: A>B (gt), A=B (eq), or A<B (lt), making it the digital equivalent of a three-way comparison function.
- The symbol pins for this block are: A0, A1 (A operand inputs), B0, B1 (B operand inputs), gt (A>B output), eq (A=B output), and lt (A<B output).
- The 74HC85 / 7485 is the standard 4-bit magnitude comparator IC; it includes cascade inputs (I_A>B, I_A=B, I_A<B) to allow chaining multiple devices for wider comparisons.
- Two 74HC85 ICs can be cascaded to compare 8-bit words: the upper nibble comparator cascade inputs are tied to the outputs of the lower nibble comparator.
- IEC 60617-12 and IEEE Std 91-1984 / ANSI Y32.14 both represent the digital comparator as a labelled rectangular functional block with operand inputs and comparison outputs.
- The three outputs A>B, A=B, and A<B are always mutually exclusive: for any valid input combination exactly one output is HIGH and the other two are LOW.
- Unlike an equality comparator (simple XNOR chain), a magnitude comparator evaluates bit-by-bit from MSB to LSB, stopping at the first bit where A and B differ to determine which is larger.
Frequently asked questions
What does the digital comparator symbol look like?
The digital comparator symbol is a labelled rectangle inscribed 'COMP' or 'Digital Comparator'. On the left are two groups of input bits (A operand: A0, A1… and B operand: B0, B1…). On the right are three outputs: A>B (gt), A=B (eq), and A<B (lt). The three-output arrangement distinguishes it from a simple equality checker or a single-output comparator.
What does a digital comparator do?
A digital comparator takes two n-bit binary numbers as inputs and determines their magnitude relationship, asserting one of three outputs: A>B if A is numerically greater, A=B if they are equal, or A<B if A is numerically less. The outputs are mutually exclusive—exactly one is active at any time.
What is the difference between a digital comparator and an analogue comparator?
A digital comparator compares two multi-bit binary numbers and produces a three-state (greater, equal, lesser) logic result. An analogue comparator compares two continuous voltages and produces a single binary output indicating which voltage is higher. Digital comparators operate on binary words; analogue comparators operate directly on voltage levels.
What are the pins of the digital comparator?
The key pins are A0…An−1 (A operand input bits), B0…Bn−1 (B operand input bits), and three outputs: A>B (asserted when A is greater), A=B (asserted when equal), and A<B (asserted when A is less). The 74HC85 also has cascade inputs I_A>B, I_A=B, I_A<B for chaining multiple comparators.
How do I build a 8-bit comparator from two 74HC85 chips?
Connect the A0–A3 and B0–B3 inputs of the first chip to the lower 4 bits of each operand, and A0–A3/B0–B3 of the second chip to the upper 4 bits. Tie the cascade inputs of the first chip to I_A>B=0, I_A=B=1, I_A<B=0 (equality base case). Connect the A>B, A=B, A<B outputs of the first chip to the corresponding cascade inputs of the second chip. The second chip's outputs give the 8-bit comparison result.
Which standard defines the digital comparator symbol?
The digital comparator is defined as a functional logic block per IEEE Std 91-1984 / ANSI Y32.14 and IEC 60617-12. Both standards use a labelled rectangular block with operand inputs and three comparison outputs. The 74HC85 device standard follows the SN54/74 logic family specifications from TI and NXP.
Can a digital comparator detect if a value is within a range?
Yes. To check if a value X falls within the range [LOW, HIGH], use two comparators: the first checks if X > LOW (or X ≥ LOW) and the second checks if X < HIGH (or X ≤ HIGH). The AND of the two A>B (or A=B) outputs indicates that X is within the specified range. This technique is widely used in address range decoders and digital threshold monitors.
Place the Digital Comparator symbol on a wiring diagram or schematic in the free online circuit diagram maker — no download required.