DSP 101
M2 · L3
Module 2 — Sampling & Quantization
Quantization &
Bit Depth

Sampling discretizes time. Quantization discretizes amplitude. Every digital number you’ve ever seen carries the mark of this second, irreducible rounding.

1 / 9
DSP 101
M2 · L3
The Core Idea
What Is Quantization?

A digital system can only store a finite set of numbers. Quantization maps each continuous sample value to the nearest allowed level. The gap between truth and approximation is called quantization error.

Key property
Unlike aliasing, quantization error cannot be eliminated — only reduced by increasing bit depth.
2 / 9
DSP 101
M2 · L3
The Math
Levels & Step Size

A b-bit quantizer creates L = 2b equal intervals. Each additional bit doubles the resolution and halves the step size Δ.

Number of Levels & Step Size
L = 2^{b}, \quad \Delta = \dfrac{x_{\max} - x_{\min}}{2^{b}}

8-bit → 256 levels  |  16-bit → 65,536  |  24-bit → 16.7 million.

3 / 9
DSP 101
M2 · L3
The Error
Quantization Noise

Every sample is rounded to within ±Δ/2. With enough bits, this error behaves like white noise uniformly distributed on [−Δ/2, Δ/2] — the quantization noise model.

  • Error power = Δ² / 12 (uniform distribution variance)
  • Model holds when signal traverses many quantization steps
  • Breaks down at very low signal levels — error becomes correlated
4 / 9
DSP 101
M2 · L3
The 6 dB Rule
SQNR & Bit Depth

For a full-scale sinusoidal input, each bit of resolution adds ~6 dB of signal-to-quantization-noise ratio.

SQNR Formula
\text{SQNR} \approx 6.02\,b + 1.76 \text{ dB}
~98 dB
16-bit (CD)
~146 dB
24-bit (Studio)
5 / 9
DSP 101
M2 · L3
The Danger Zone
Clipping & Overload

When a signal exceeds the quantizer range, it clips — peaks flatten, creating severe harmonic distortion far worse than quantization noise.

  • Quantization noise: spectrally flat, low-level hiss
  • Clipping: discrete harmonics at multiples of fundamental — harsh, audible
  • Even one clipped sample is perceptibly damaging in audio
  • Solution: design headroom — keep signal below full scale
6 / 9
DSP 101
M2 · L3
The Fix
Dithering & Noise Shaping

At low signal levels, quantization error becomes tonal and correlated. Add tiny random noise before quantization to break the correlation — converting a buzzing artifact into a benign noise floor.

Noise Shaping
Push quantization noise into less-sensitive frequency bands. A shaped 16-bit file can rival a 20-bit system perceptually.
7 / 9
DSP 101
Knowledge Check

Check what stuck

Four questions from this lesson. Answer to see why — the explanation appears whether you were right or wrong. Nothing is scored or saved.

Question 1 of 0
Score 0/0

8 / 9
DSP 101
M2 · L3
Key Takeaways
What You Learned
  • Quantization maps amplitude to L = 2b discrete levels; error is bounded by ±Δ/2
  • Each extra bit doubles levels, halves step size, adds ~6 dB of SQNR
  • SQNR ≈ 6.02b + 1.76 dB for full-scale sinusoidal inputs
  • Clipping distortion is far more damaging than quantization noise
  • Dithering randomizes the error, replacing tonal artifacts with flat noise
  • Non-uniform quantization (companding) optimizes SQNR for speech-like signals
Read full article →
9 / 9
1 / 8 muted