Pulse-code modulation (source code)

= Pulse-code modulation

<Pulse-code modulation> represents a waveform by sampling its amplitude at specified times, assigning each sample to one of finitely many reconstruction levels, and coding the chosen level as a sequence of symbols. Sampling discretizes time; <quantization (signal processing)> discretizes amplitude; coding represents the selected level. These operations answer different questions about preserving a <signal>.

For an original example, divide the input range $[-1,1]$ volts into eight equal cells, each $\Delta=0.25$ volts wide, and reconstruct each cell by its midpoint. Label the cells in increasing order with three-<bit> binary words from `000` to `111`. An input <electric potential difference> of $0.31$ volts lies in $[0.25,0.50)$, so its word is `101` and its reconstructed value is $0.375$ volts. The error is $0.065$ volts. Inside the specified range, the error magnitude is at most $\Delta/2=0.125$ volts; an out-of-range input instead introduces clipping.

At $8000$ samples per second, three <bits> per sample give a raw rate of $24000$ <bits> per second for one channel, before framing or other overhead. Increasing the sampling rate and increasing the number of <quantization (signal processing)> levels address different errors: more time samples alone do not remove amplitude rounding.

<W. M. Goodall>'s 1947 paper described an experimental speech encoder and decoder, with binary words identifying sampled amplitude levels. Its listening comparisons examined the effect of code length on speech quality. The reported quality thresholds concerned that apparatus and signal conditions, rather than a universal bit depth for every recording.<Telephony by Pulse Code Modulation by W. M. Goodall>[Page395 abstract and introduction; pages408–409 experimental discussion]{ref}

Encoding standard symbols also makes regeneration useful: a receiver can restore a perturbed pulse to a standard symbol if it still identifies the symbol correctly. This does not recover amplitude information discarded during <quantization (signal processing)>, and sufficiently large channel disturbances can still cause decoding errors.