HomeArticlesSignal Processing

ADC/DAC Sampling: The Nyquist Limit, Aliasing and Quantization Noise

Sample below twice the signal frequency and it doesn't disappear — it comes back as a different, false signal.

mysimulator teamUpdated June 2026≈ 7 min read▶ Open the simulation

Sampling turns a continuous signal into numbers

An analog-to-digital converter does two independent things to a continuous voltage signal: it samples it at discrete instants in time, and it quantizes the value at each instant to the nearest of a finite set of levels. Both steps lose information, and both losses have exact, well-understood mathematical descriptions rather than being vague approximations.

live demo · continuous wave, sampled stems, reconstructed staircase● LIVE

The Nyquist–Shannon sampling theorem

Harry Nyquist and Claude Shannon showed that a continuous signal containing no frequency components above some bandwidth B can be perfectly reconstructed from samples taken at any rate strictly greater than 2B — the Nyquist rate. Sample at exactly the right rate and, remarkably, no information is lost by discarding everything between the sample points; the original continuous waveform is mathematically recoverable in full.

f_s > 2 · f_max          (Nyquist criterion, f_s = sample rate)
f_Nyquist = f_s / 2       (the folding frequency)

Sample below that rate and a real, physical failure occurs: aliasing. A frequency component above f_s/2 does not simply disappear — it reappears, indistinguishable from a genuine lower-frequency signal, folded back across f_s/2. A tone at frequency f > f_s/2 aliases to |f − k·f_s| for the integer k that lands the result inside [0, f_s/2]. This is why old films show wagon wheels appearing to spin backwards (the frame rate under-samples the wheel's rotation) and why every ADC needs an anti-aliasing filter — an analog low-pass filter ahead of the sampler — to physically remove energy above f_s/2 before it can fold back and corrupt the band you actually wanted.

Quantization: rounding to the nearest level

After timing is fixed, each sample's amplitude is rounded to the nearest of 2^N levels for an N-bit converter. That rounding introduces quantization error, bounded to ±half a least-significant bit (LSB) and, for a reasonably busy signal, well modelled as uniformly distributed noise with a standard deviation of LSB/√12. The resulting signal-to-quantization-noise ratio has a famous closed form:

SNR ≈ 6.02 · N + 1.76   dB   (full-scale sine wave, N-bit uniform quantizer)

Every additional bit buys roughly 6 dB of dynamic range — a rule of thumb audio and instrumentation engineers use constantly: a 16-bit converter (CD audio) tops out near 98 dB of theoretical SNR, a 24-bit converter near 146 dB.

Reconstruction: from stems to a staircase to a smooth curve

A DAC runs the process in reverse but not identically: it does not somehow un-round the quantization (that information is genuinely gone), it converts each discrete sample back into a voltage held constant until the next sample — a zero-order hold, which is exactly the staircase this simulation draws. That staircase is not the reconstructed original signal; it is rich in high-frequency energy from the sharp steps, all of it a byproduct of the hold. A reconstruction (anti-imaging) low-pass filter after the DAC, with the same cutoff logic as the anti-aliasing filter on the way in, smooths the staircase back into the continuous waveform the Nyquist theorem guarantees is recoverable, by removing everything above f_s/2.

Putting it together

The simulation lets you push the sample rate below twice the signal frequency and watch aliasing appear as a slower, false tone; push quantization down to a handful of bits and watch the staircase get visibly coarse and noisy. Both effects are independent, cascade through the full analog-to-digital-to-analog chain, and both have hard, calculable limits — there is no clever algorithm that recovers information genuinely discarded by under-sampling or coarse quantization; the only fix is a higher sample rate or more bits, respectively.

Frequently asked questions

What is aliasing, exactly?

It is what happens when a signal is sampled below twice its highest frequency component (the Nyquist rate): that high-frequency content doesn't vanish, it folds back and masquerades as a lower, false frequency in the sampled data. It's an unavoidable consequence of the sampling theorem's assumptions being violated, not a rounding error.

Why do ADCs need an anti-aliasing filter?

Because aliasing happens the instant a signal is sampled, and it cannot be undone afterward in software — once a high frequency has folded down into your signal's band, it is indistinguishable from real data at that frequency. The anti-aliasing filter removes energy above the Nyquist frequency in the analog domain, before sampling, which is the only point it can be cleanly removed.

How many bits do I need for a given signal-to-noise ratio?

Roughly SNR ≈ 6.02N + 1.76 dB for an N-bit quantizer on a full-scale sine wave, so each extra bit is worth about 6 dB. For 90 dB of dynamic range you'd want N ≥ (90 - 1.76)/6.02 ≈ 14.7, so 15-16 bits with margin — which is why 16-bit converters became the audio CD standard.

Try it live

Everything above runs in your browser — open ADC/DAC Sampling and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open ADC/DAC Sampling simulation

What did you find?

Add reproduction steps (optional)