Interview questions

PCM Interview Questions

PCM (Pulse Code Modulation) questions appear in technical interviews at IT companies like TCS and Infosys for telecom and embedded system roles, as well as at hardware companies like Texas Instruments and Bosch for audio and signal processing positions. They typically come up in the first or second technical round alongside digital modulation and signal processing questions.

ECE, EI

Interview questions & answers

Q1. What is PCM and what are its main steps?

Pulse Code Modulation converts an analog signal to a digital bit stream in three steps: sampling (taking amplitude values at regular intervals), quantization (rounding each sample to the nearest discrete level), and encoding (representing each quantized level as a binary codeword. A telephone voice channel (0–4 kHz bandwidth) in the ITU-T G.711 standard is sampled at 8 kHz, quantized to 256 levels (8 bits), producing a 64 kbps bit stream. PCM is the foundation of all digital audio, telephony, and CD recordings, and understanding it is the starting point for all digital communication system design.

Follow-up: Why is the telephone voice band sampled at 8 kHz and not some other rate?

Q2. What is the Nyquist sampling theorem and how does it determine the minimum sampling rate?

The Nyquist theorem states that a band-limited signal with maximum frequency W must be sampled at a rate fs ≥ 2W to allow perfect reconstruction, and 2W is called the Nyquist rate. Audio CD quality requires sampling at 44.1 kHz because the human audible range extends to about 20 kHz, and 44.1 kHz > 2×20 kHz with some margin. Sampling below the Nyquist rate causes aliasing, where high-frequency components fold back into the baseband and appear as false low-frequency components that cannot be separated from the original signal.

Follow-up: What is aliasing and how is it prevented in a practical ADC?

Q3. What is aliasing and how is it prevented?

Aliasing occurs when a signal is sampled below its Nyquist rate, causing frequency components above fs/2 to fold back into the 0–fs/2 band and create spurious low-frequency artifacts that are indistinguishable from the original signal. In an audio ADC chip like the Cirrus CS4272, an anti-aliasing low-pass filter with cutoff at 20 kHz is applied before the 44.1 kHz sampler to prevent any audio energy above 22.05 kHz from entering the sampler and aliasing down. Once aliasing occurs in the sampled data, it cannot be corrected — it must be prevented at the input before sampling.

Follow-up: What is oversampling and how does it relax the requirements on the anti-aliasing filter?

Q4. What is quantization noise and how does the number of bits affect it?

Quantization noise is the error introduced when a continuous amplitude is rounded to the nearest discrete quantization level, and its power is approximately Δ²/12 for uniform quantization with step size Δ, producing a uniform distribution of error between -Δ/2 and +Δ/2. An 8-bit ADC has 256 levels and a step size of Vfs/256, while a 16-bit ADC has 65536 levels and a step size of Vfs/65536 — the 16-bit ADC produces quantization noise power (Vfs/65536)²/12, which is 96 dB lower than for 8-bit. Doubling the number of bits (one extra bit) increases the signal-to-quantization-noise ratio by approximately 6 dB.

Follow-up: What is the relationship between the number of bits n and the SQNR (signal-to-quantization-noise ratio)?

Q5. What is the SQNR formula for PCM and what does each term represent?

For a full-scale sinusoidal input, the signal-to-quantization-noise ratio is SQNR ≈ 1.76 + 6.02n dB, where n is the number of quantization bits — each additional bit adds approximately 6 dB to the dynamic range. An audio CD with 16-bit PCM has SQNR = 1.76 + 6.02×16 = 98.1 dB, which is why CD audio sounds substantially cleaner than cassette tape (about 55 dB SNR). The 6.02n term comes from the fact that doubling the number of levels (one bit) halves the step size Δ, reducing noise power by a factor of 4 (6 dB), while signal power remains constant.

Follow-up: How does the SQNR change for a low-level signal compared to a full-scale signal in uniform PCM?

Q6. What is companding and why is it used in telephony?

Companding (compressing + expanding) applies nonlinear quantization where small signal amplitudes get finer quantization resolution than large amplitudes, maintaining approximately constant SQNR across a wide range of input levels rather than letting it degrade for quiet signals. The G.711 µ-law standard (North America, Japan) and A-law (Europe, ITU) both apply logarithmic compression before uniform 8-bit quantization, giving a dynamic range of about 40 dB for voice signals that might vary from whisper to shout. Without companding, 8-bit uniform PCM would have a SQNR of only 6.02×8 + 1.76 = 49.9 dB at full scale but just a few dB for weak signals, making quiet speech unintelligible.

Follow-up: What is the difference between µ-law and A-law companding, and which is used where?

Q7. What is the bit rate of a PCM system and how is it calculated?

PCM bit rate = sampling rate × bits per sample: a single telephone voice channel sampled at 8 kHz with 8-bit quantization produces 8000 × 8 = 64,000 bits/s (64 kbps). A stereo audio CD with 44.1 kHz sampling rate and 16 bits per sample has a raw bit rate of 2 × 44100 × 16 = 1,411,200 bps ≈ 1.41 Mbps, which is why an uncompressed audio CD holds about 74 minutes of audio on a 650 MB disc. This bit rate calculation is the fundamental formula connecting analog signal parameters to digital system capacity requirements.

Follow-up: How much storage does 1 minute of uncompressed CD-quality stereo audio require?

Q8. What is the purpose of the sample-and-hold circuit in a PCM system?

The sample-and-hold (S/H) circuit captures the instantaneous analog value at the sampling instant and holds it constant long enough for the ADC to perform its conversion, preventing errors caused by the signal changing during the conversion time. A 12-bit successive approximation ADC converting at 1 Msps takes about 1 µs for conversion — if the input signal changes during this time, different bits of the conversion correspond to different input values, causing 'aperture error'. For a 1 kHz audio signal sampled at 100 ksps, the S/H aperture window must be much less than 1/(2π × 1000) / 2^12 ≈ 39 ns to limit aperture error to half a least significant bit.

Follow-up: What is aperture jitter and how does it affect the SNR of a high-speed ADC?

Q9. What is differential PCM (DPCM) and how does it reduce bit rate?

DPCM encodes only the difference between each sample and a prediction of that sample, rather than the absolute sample value — since the prediction is usually close to the true value, the difference signal has a smaller range and requires fewer bits. A video codec using DPCM for temporal prediction finds that adjacent frames in a talking-head video are 95% identical, so encoding only the pixel differences rather than full frames reduces the bit rate by 10–20×. The simplest predictor uses the previous sample as the prediction (first-order DPCM), giving efficient coding for highly correlated signals like speech and video.

Follow-up: What is ADPCM and how does it further improve upon DPCM?

Q10. What is ADPCM (Adaptive DPCM) and where is it used?

ADPCM improves on DPCM by adapting the quantization step size dynamically — when the difference signal is large (fast-changing input), the step size increases to avoid overload; when the signal is small, the step size decreases to reduce quantization noise. G.726 ADPCM encodes telephone-quality voice at 32 kbps (4 bits per sample at 8 kHz) rather than the 64 kbps of G.711 PCM, making it the standard for ISDN and early VoIP compression. The step-size adaptation is performed identically in both encoder and decoder using only the previous quantized values, so no side information needs to be transmitted.

Follow-up: Why is ADPCM preferred over delta modulation for voice coding?

Q11. What is delta modulation and what are its advantages and disadvantages?

Delta modulation encodes only a 1-bit quantized difference between the current sample and the previous output — just a 'step up' or 'step down' decision — making it the simplest possible DPCM system with a 1 bps/Hz efficiency. A DM system clocking at 32 kbps with a step size of 10 mV can track voice signals up to about 3.2 kHz before slope overload occurs (when the signal changes faster than the step size allows the output to track). The limitations are slope overload (fast signals cannot be tracked) and granular noise (slow signals cause chattering around the correct level), both of which are mitigated in Continuously Variable Slope Delta Modulation (CVSD).

Follow-up: What is slope overload in delta modulation and how do you prevent it?

Q12. What is T1 carrier system and how is PCM multiplexed in it?

The T1 carrier (DS1) is a TDM system that time-division multiplexes 24 PCM telephone voice channels, each at 64 kbps, into a single serial bit stream at 1.544 Mbps, with each frame containing one 8-bit sample from each channel plus a framing bit. Each T1 frame is 193 bits long (24×8 + 1 framing bit) and repeats at 8000 frames/second to give 8000×193 = 1,544,000 bps. T1 was deployed across the US telephone network from the 1960s and is the basis of the PDH (Plesiochronous Digital Hierarchy), with higher levels (T2 = 4 T1s, T3 = 28 T1s) formed by multiplexing multiple T1 streams.

Follow-up: What is the difference between T1 and E1 carrier systems in terms of number of channels and bit rate?

Q13. What is the difference between uniform and non-uniform quantization?

Uniform quantization uses equal step sizes Δ throughout the amplitude range, giving constant absolute quantization error but worse SQNR for small signals; non-uniform quantization uses smaller steps at low amplitudes and larger steps at high amplitudes, providing approximately constant relative quantization error. For a 12-bit uniform ADC sampling a microphone with a dynamic range of 80 dB, quiet whispers at -60 dBFS are quantized with only 4 effective bits (extremely noisy), while non-uniform quantization spreads the 12-bit resolution to give similar quality at all levels. Companding in G.711 achieves non-uniform quantization by applying a logarithmic transfer curve before a uniform 8-bit ADC.

Follow-up: How does the quantization step size vary with amplitude in µ-law quantization?

Q14. What is the role of the regenerative repeater in a PCM system?

A regenerative repeater in a PCM transmission system receives a degraded binary pulse stream, extracts timing, makes a clean binary decision (1 or 0) for each pulse, and retransmits a fresh, noise-free pulse — completely eliminating accumulated noise rather than just amplifying it along with noise as an analog repeater does. In a T1 line, regenerative repeaters are placed every 1.8 km to counter the 0.5 dB/km cable attenuation at 772 kHz, restoring the signal to its original amplitude and timing before errors can accumulate. This noise immunity through regeneration is the fundamental reason digital PCM transmission replaced analog carrier systems — noise does not accumulate over thousands of kilometers of regenerated digital links.

Follow-up: At what signal-to-noise ratio does the regenerative repeater fail to correctly detect the binary data?

Q15. What is PCM encoding and what line code is commonly used?

PCM encoding converts quantized amplitude values to binary bit patterns — typically using natural binary or Gray code — and then applies a line code to shape the spectrum for transmission over the physical medium. T1 carrier uses AMI (Alternate Mark Inversion) line coding, where each logical '1' alternates between +V and -V while '0' is represented by 0V, creating a bipolar signal with no DC component and an inherent error detection capability through bipolar violation detection. Modern high-speed links like Ethernet and PCIe use more sophisticated line codes (8b/10b, 64b/66b) that ensure DC balance, adequate transitions for clock recovery, and low BER through redundancy.

Follow-up: What is a bipolar violation in AMI coding and how is it used for error detection?

Common misconceptions

Misconception: Increasing the sampling rate always improves the quality of a PCM system.

Correct: Sampling at exactly the Nyquist rate is sufficient for perfect reconstruction; oversampling beyond the Nyquist rate does not improve the representation of the signal unless it is combined with noise shaping or multi-bit quantization to increase effective SQNR.

Misconception: The quantization noise in PCM is white noise uniformly distributed across all frequencies.

Correct: Quantization noise is approximately white (uniformly distributed across 0 to fs/2) only for signals with sufficient spectral content to randomize the quantization error; for simple sinusoidal inputs or low-level signals, quantization noise can be highly correlated and harmonic in nature.

Misconception: Companding reduces the bit rate of a PCM system.

Correct: Companding does not reduce the bit rate; it redistributes the quantization resolution to give more levels to small signals and fewer to large signals, improving perceived audio quality without changing the number of bits per sample or the sampling rate.

Misconception: Delta modulation is a type of PCM.

Correct: Delta modulation is a distinct scheme that encodes only 1-bit differences and is classified as a form of DPCM, not PCM; standard PCM encodes the absolute amplitude of each sample with multiple bits per sample.

Quick one-liners

What is the Nyquist sampling rate for a 4 kHz voice signal?The Nyquist rate is 2 × 4 kHz = 8 kHz, which is why G.711 PCM samples at exactly 8 kHz.
What is the bit rate of a single G.711 PCM voice channel?A single G.711 PCM voice channel has a bit rate of 8000 samples/s × 8 bits/sample = 64 kbps.
How much does each additional bit improve the SQNR of a PCM system?Each additional bit increases SQNR by approximately 6 dB.
What is the SQNR of a 16-bit PCM system for a full-scale sinusoidal input?SQNR ≈ 1.76 + 6.02 × 16 = 98.1 dB.
How many voice channels does a T1 (DS1) system carry?A T1 system carries 24 PCM voice channels.
What is the bit rate of a T1 carrier?T1 has a bit rate of 1.544 Mbps (24 channels × 64 kbps + 8 kbps framing).
What is the purpose of the anti-aliasing filter in a PCM system?The anti-aliasing filter removes all frequency components above fs/2 before sampling to prevent aliasing.
What companding standard does Europe use for PCM telephony?Europe uses A-law companding (ITU-T G.711 A-law) for PCM telephony.
What is the quantization step size for an 8-bit uniform ADC with full-scale range 0–5 V?Step size Δ = 5 V / 2⁸ = 5/256 ≈ 19.5 mV.
What is slope overload distortion in delta modulation?Slope overload occurs when the input signal changes faster than the delta modulator's step size allows the output staircase to track, causing the reconstructed signal to lag behind the input.

More Communication Systems questions