Home▸Electronics & Circuits▸ADC / DAC Sampling & Quantization

ADC / DAC Sampling & Quantization (2D)

2D signal-chain view of an analog-to-digital / digital-to-analog converter: a continuous sine wave is sampled at an adjustable rate, quantized to a chosen bit depth, and reconstructed by a zero-order-hold DAC, with a live Nyquist aliasing demo.

Electronics & Circuits2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-3d-adc-dac ↗ Open standalone

The 3D model shows an oscilloscope-style view of the same converter chain. This 2D companion draws the actual signal-processing math on a flat timeline: a continuous sine wave, the discrete instants the ADC samples it, the finite set of voltage levels it rounds those samples to, and the zero-order-hold staircase a DAC produces on the way back to analog. Drag the sample-rate slider below twice the signal frequency — the Nyquist rate — and a dashed red curve appears: the genuine, lowest-frequency sinusoid that fits the very same samples, which is exactly what a real reconstruction filter would be forced to output. That is aliasing, not a rendering bug: from the samples alone the true signal and the alias are indistinguishable.

⚙ Under the hood

2D companion to the 3D ADC/DAC model: a continuous sine wave is sampled at fs, quantized to 2^N levels (mid-rise quantizer, step = full_scale/2^N), and held by a zero-order-hold DAC. A live per-sample quantization-error chart and an analytic Nyquist-fold calculation (apparent frequency = |f − round(f/fs)·fs|) drive the aliasing readout and dashed reconstruction curve.

Canvas 2DADCDACNyquist TheoremAliasingQuantizationSignal Processing

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)