The message signal converted into the binary form will be usually in the number of levels which is always to a power of 2. The sampling rate or the number of samples per second is several times the maximum frequency.
To get a pulse code modulated waveform from an analog waveform at the transmitter end (source) of a communications circuit, the amplitude of the analog signal samples at regular time intervals. The basic block diagram of PCM is given below for better understanding.
In sampling, we are using a PAM sampler that is Pulse Amplitude Modulation Sampler which converts continuous amplitude signal into Discrete-time- continuous signal (PAM pulses). Here is a block diagram of the steps which are included in PCM.