What is Comparator?

A circuit that compares two input voltages and outputs the result as a binary high or low. It is also a basic building block of ADCs.

Field: Analog and electronic circuits

Japanese name: コンパレータ

Comparator vs. op-amp

Both have a differential input and very high gain, but they are optimized for opposite jobs. An op-amp is designed for stable linear operation with negative feedback and recovers slowly once its output saturates. A comparator runs open loop, spends almost all its time saturated at one rail or the other, and is built to switch quickly and recover cleanly, often with an open-drain or logic-level output that drives digital inputs directly. Using an op-amp as a comparator works for slow signals but usually gives long and unpredictable propagation delay.

Hysteresis and the Schmitt trigger

When a noisy or slowly varying input hovers near the threshold, a plain comparator can toggle many times as noise crosses back and forth, a problem called chattering. Adding positive feedback creates two thresholds: a higher one for a rising input and a lower one for a falling input. The gap between them, the hysteresis, must exceed the noise amplitude. This arrangement is a Schmitt trigger, also available as logic gates such as the 74HC14, and is used for switch inputs, zero-crossing detection and RC relaxation oscillators.

Specs that matter

Input offset voltage sets how far apart the inputs must be before the decision is reliable, and in an ADC it appears as offset error or linearity error. Propagation delay, often specified for a given input overdrive, sets maximum speed; small overdrive gives longer delay. Input common-mode range, supply current and output type complete the picture. Inside ADCs, comparators are usually clocked: a preamplifier followed by a regenerative latch of cross-coupled inverters that amplifies a tiny difference to full logic levels. If the input difference is extremely small, the latch can take too long to resolve, which is metastability.

Comparators inside ADCs

Every analog-to-digital converter ends in comparator decisions, and the architectures differ in how many they use. A flash ADC needs 2N−12^N − 1 comparators, seven for 3 bits and 255 for 8 bits, which makes it fast but power-hungry. A successive-approximation (SAR) ADC reuses one comparator N times, comparing the input with an internal DAC from the most significant bit down. Pipelined ADCs use a few comparators per stage with redundancy for digital correction, and column-parallel image-sensor ADCs pair a comparator with a counter against a shared ramp.

Try it: questions about Comparator

What does a comparator do?

  1. AIntegrates the input voltage over time
  2. BCompares two input voltages and outputs the result as a binary value (high or low)
  3. COutputs a voltage proportional to the input voltage
Show answer and explanation

Answer: B. Compares two input voltages and outputs the result as a binary value (high or low)

A comparator decides which of two input voltages is larger and outputs a binary high or low. Unlike an op-amp, it is designed to run without negative feedback and recover quickly from saturation, often with open-drain outputs that connect directly to logic. It is used in ADC decisions, over/undervoltage monitoring and zero-crossing detection. Hysteresis is often added to prevent output chatter from noise.

FAQ

Can I use an op-amp as a comparator?

For slow, non-critical signals it often works, but op-amps recover slowly from saturation and may not produce clean logic levels, so a dedicated comparator is better when speed or clean edges matter.

Why add hysteresis to a comparator?

Hysteresis gives separate rising and falling thresholds so noise near the switching point cannot make the output toggle repeatedly.

How many comparators does an N-bit flash ADC need?

2N−12^N − 1, so a 3-bit flash ADC needs 7 and an 8-bit one needs 255.

Questions that mention Comparator (6)

Comparator appears in 7 practice questions across 3 topics, including A/D and D/A conversion, Analog and electronic circuits, Image sensors and optical devices.

  1. Which circuit has different thresholds for rising and falling inputs and prevents the output from chattering due to noise?
  2. Which correctly describes the operation of a successive-approximation (SAR) ADC?
  3. Which ADC splits conversion into several stages processed like an assembly line, combining high speed with medium to high resolution?
  4. In the transfer characteristic of an ADC, what is the error called when the output deviates from 0 at zero input?
  5. How many comparators does a 3-bit flash ADC need?
  6. What is the main advantage of the scheme used in many CMOS image sensors in which each pixel column has its own ADC for parallel conversion?

Books on Analog and electronic circuits Ad

Learn hands-on: parts and kits

Building real circuits is a good way to check what you learned in the questions.

As an Amazon Associate I earn from qualifying purchases.

Comparisons that include this term

This page was drafted with AI and fact-checked by a separate AI review before publication. Our Editorial policy explains how we write and check content. If you spot an error, please tell us on our Contact page.

Back to the glossary