Sampling and PCM
Can a few dots bring the signal back?
The faint blue curve is the original signal, the bright dots are the samples, and the bold curve is the signal rebuilt from the samples alone. Raise the sampling frequency and the dots crowd together; until it passes twice the signal frequency, the bold curve is drawn as a slow false sine through the samples and shows red. From the moment it passes twice, the gold curve lands exactly on the original.
Samples are dots
Sampling means reading a continuous signal once at every fixed time interval and writing down only that value. The smooth curve shrinks to the few bright dots in the plot. A natural question follows: everything between the dots has been thrown away, so how could the original curve ever come back?
Nyquist — faster than twice
The sampling theorem answers it. When the highest frequency of a signal is fmax, sampling with fs > 2 fmax lets the samples alone restore the original perfectly, and the boundary value 2 fmax is called the Nyquist rate. If the sampling frequency falls short, components near fmax fold into the band below fs/2 and look like a slower sine passing through the same samples. This change of identity is aliasing, and once a signal has folded, the samples alone offer no way to recover its true frequency.
PCM — quantize and encode
Samples are still continuous values, so they cannot be written as bits as they are. PCM first quantizes each value, rounding it to the nearest of L levels, and then encodes each level with n = log₂ L bits. Sampling 1 second's worth of signal fs times gives a bit rate of R = n fs. The error introduced by rounding is quantization noise, and it shrinks as the number of levels L grows, that is, as more bits are spent. Chopping time finely by sampling and value finely by quantization, PCM turns a signal into numbers.
Back to the first screen
As you raised the sampling frequency, the dots crowded together, and the moment it passed twice the signal frequency the rebuilt curve settled onto the original and turned gold. Below that, a slower sine through the same samples appeared and masqueraded in red. The one thing to remember about sampling: throwing away everything between the dots loses nothing as long as fs > 2 fmax, and breaking that boundary folds high frequencies into false low ones that can never be undone.
In the next unit
The message has now become a stream of bits. The next question is how those bits shake a carrier. Switching the carrier amplitude on and off with the bits gives ASK, toggling the frequency between two values gives FSK, and flipping the phase gives PSK. The next unit sets these three branches of digital modulation side by side.