Bit Depth
Sampling discretizes time. Quantization discretizes amplitude. Every digital number you’ve ever seen carries the mark of this second, irreducible rounding.
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.
A b-bit quantizer creates L = 2b equal intervals. Each additional bit doubles the resolution and halves the step size Δ.
8-bit → 256 levels | 16-bit → 65,536 | 24-bit → 16.7 million.
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
For a full-scale sinusoidal input, each bit of resolution adds ~6 dB of signal-to-quantization-noise ratio.
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
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.
- 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