Pulse Code Modulation, or PCM, is the standard method for converting analog signals into digital form. The process involves three essential steps: sampling the analog signal at regular intervals, quantizing the amplitude values to discrete levels, and encoding these levels as binary numbers.
The first step in PCM is sampling. We take measurements of the analog signal at regular time intervals. The Nyquist-Shannon theorem tells us that the sampling frequency must be at least twice the highest frequency component in the original signal to avoid aliasing distortion.
The second step is quantization, where we map the continuous amplitude values from sampling to a finite set of discrete levels. The number of levels is determined by the bit depth - for example, 8 bits gives us 256 levels. This process introduces quantization error, which appears as noise in the digital signal.