Quantization

Rounding a continuous-amplitude signal to a finite set of discrete levels — the source of quantization error, and the tradeoff behind every bit-depth choice.

Quantization rounds amplitudes to allowed levels
continuous signalquantized levels
Levels
More bits create more allowed amplitudes.
Step size
The gap between neighboring levels is Δ.
Error
Quantization error is the vertical distance from the true value to the rounded level.
Definition

Sampling captures a signal's value at discrete times, but each value is still a real number with infinite precision. Quantization is the second step: rounding each sample's amplitude to the nearest of a finite set of allowed levels, so it can be stored as a finite number of bits.

The difference between the true value and its rounded level is the quantization error. With more levels (more bits), the error shrinks; with fewer levels, it grows — a direct tradeoff between storage/bandwidth and fidelity.

Bit depth and levels

An 8-bit quantizer has 28=2562^8 = 256 levels. A 16-bit quantizer (standard for CD audio) has 216=65,5362^{16} = 65{,}536 levels — vastly finer resolution, at the cost of twice the storage per sample.

Try it

If a signal ranges from 0 to 10 volts and is quantized with 4 bits, how many distinct levels are available, and what's the gap between adjacent levels?

Solution

4 bits gives 24=162^4 = 16 levels. Spread evenly across the 10-volt range, adjacent levels are 10/150.6710/15 \approx 0.67 volts apart (15 gaps between 16 levels).

Related concepts