Interview questions

Sampling Theorem Interview Questions

Sampling theorem questions are asked at semiconductor and signal processing companies like Texas Instruments, Qualcomm, and Samsung for ADC/DSP roles, and appear in TCS and Infosys technical rounds for ECE graduates. This topic typically comes up in the first or second technical round and is foundational to ADC selection, communication system design, and digital signal processing.

ECE, EI

Interview questions & answers

Q1. State the Nyquist sampling theorem and explain what happens when it is violated.

The Nyquist sampling theorem states that a band-limited signal with maximum frequency fmax must be sampled at a rate fs ≥ 2fmax to be perfectly reconstructed from its samples. When fs < 2fmax, aliasing occurs: frequency components above fs/2 fold back into the baseband and appear as false low-frequency components indistinguishable from actual signal content. In a 10 kHz bandwidth sensor system sampled at 15 kHz, a 9 kHz signal would alias to appear at 15−9 = 6 kHz, corrupting the measurement.

Follow-up: Why is sampling at exactly 2fmax theoretically sufficient but practically inadequate?

Q2. What is aliasing and give a practical example of it?

Aliasing is the phenomenon where a signal sampled below the Nyquist rate appears at a different (lower) frequency in the sampled data because the sampling copies of its spectrum overlap. A car wheel spinning at 26 revolutions per second filmed at 25 fps appears to rotate backward at 1 rps because the camera samples slightly slower than the wheel's rotation rate. In audio ADCs, a 22 kHz tone entering a system sampled at 40 kHz appears at 40−22 = 18 kHz after sampling, corrupting the audio band.

Follow-up: What specific frequencies does a 13 kHz signal alias to when sampled at 10 kHz?

Q3. What is an anti-aliasing filter and at what frequency should it be set?

An anti-aliasing filter is a low-pass filter placed before the ADC input that removes all frequency components above the Nyquist frequency fs/2 before sampling, preventing them from aliasing into the baseband. For a system sampled at 48 kHz, the anti-aliasing filter must attenuate all frequencies above 24 kHz before the ADC. In practice, the filter cutoff is set lower (e.g., 20 kHz for audio) to allow a practical filter transition band, which is why sigma-delta ADCs oversample at 3–6 MHz to push the aliasing concern far above the audio band and use a simple first-order RC anti-aliasing filter.

Follow-up: Why does oversampling relax the requirements on the anti-aliasing filter cutoff slope?

Q4. What is the Nyquist frequency and how does it differ from the Nyquist rate?

The Nyquist rate is the minimum required sampling frequency, equal to 2fmax, while the Nyquist frequency (also called the folding frequency) is the maximum frequency that can be correctly represented in the sampled data, equal to fs/2. For a system sampling at 44.1 kHz, the Nyquist rate is the threshold — any signal band up to 22.05 kHz satisfies it, and the Nyquist frequency is 22.05 kHz — the highest correctly representable frequency. Confusing these two terms causes errors when designing anti-aliasing filters: the filter must attenuate signals above the Nyquist frequency (fs/2), not at the Nyquist rate.

Follow-up: What happens to frequency components exactly at fs/2 in a sampled system?

Q5. What is oversampling and how does it improve ADC performance?

Oversampling samples the signal at a rate significantly above the Nyquist rate (typically 4× to 256×), spreading quantization noise across a wider frequency band so that less noise falls in the signal bandwidth, effectively increasing the signal-to-noise ratio. A sigma-delta ADC in the ADS1256 oversamples at 30 kHz while measuring a DC sensor signal with bandwidth of only 10 Hz, concentrating the signal energy in a narrow band where the quantization noise density is extremely low. Each doubling of the oversampling ratio improves SNR by 3 dB, equivalent to adding 0.5 bits of effective resolution.

Follow-up: What is decimation and why is it always paired with oversampling?

Q6. What is the reconstruction process for a sampled signal and what filter is used?

Reconstruction converts the discrete sample sequence back to a continuous-time signal by passing the DAC's staircase output through a reconstruction low-pass filter (also called a smoothing filter or interpolation filter) that removes the spectral images appearing at multiples of the sampling frequency. A CD player DAC operating at 44.1 kHz produces a staircase waveform whose spectrum contains copies of the audio spectrum at 44.1 kHz, 88.2 kHz, etc.; an analog low-pass filter with cutoff at 22.05 kHz removes these images. Without the reconstruction filter, the DAC output contains high-frequency switching artifacts audible as harsh distortion.

Follow-up: What is the ideal reconstruction filter and why can it not be physically implemented?

Q7. What is the mathematical representation of sampling in the time domain?

Sampling is modeled as multiplying the continuous-time signal x(t) by an impulse train p(t) = Σδ(t − nTs), producing the sampled signal xs(t) = x(t) × Σδ(t − nTs) = Σx(nTs)δ(t − nTs). The Fourier transform of the impulse train is itself an impulse train with period fs = 1/Ts, so multiplication in time becomes convolution in frequency, creating copies of X(f) centered at every multiple of fs. This frequency-domain picture directly shows that if X(f) has bandwidth exceeding fs/2, adjacent spectral copies overlap and aliasing results.

Follow-up: Why is the spectrum of a sampled signal periodic with period fs?

Q8. How does the sampling theorem apply to bandpass signals?

For a bandpass signal occupying bandwidth B centered at carrier fc, the Nyquist rate can be as low as 2B (bandpass sampling or undersampling) rather than 2(fc + B/2), provided the sampling frequency is chosen so that aliasing folds the bandpass signal to a convenient IF frequency without overlap. A 100 MHz IF signal with 10 MHz bandwidth can be sampled at 25 MHz (choosing fs such that the alias lands at 5 MHz) instead of 220 MHz, dramatically reducing ADC speed requirements. This bandpass sampling technique is used in direct IF sampling software-defined radios like those built around the AD9361.

Follow-up: What constraint must be satisfied when selecting the undersampling frequency for a bandpass signal?

Q9. What is aperture jitter in ADC sampling and how does it affect high-frequency signal accuracy?

Aperture jitter is uncertainty in the exact moment the ADC's sample-and-hold captures the input signal; for a high-frequency sinusoidal input, this timing jitter translates directly to amplitude error because the signal is changing rapidly. For a 100 MHz input signal and 1 ps RMS jitter, the amplitude error is approximately 2π × 100 MHz × 1 ps = 0.000628 or −64 dB SNR — setting a fundamental limit on ENOB. This is why high-frequency ADCs like the AD9625 specify aperture jitter below 100 fs and require ultra-low-jitter clock sources such as crystal oscillator-based clock conditioners.

Follow-up: How do you calculate the maximum input frequency for a given ADC aperture jitter and target ENOB?

Q10. What is a sample-and-hold (S/H) circuit and why is it necessary for ADC conversion?

A sample-and-hold circuit tracks the input signal continuously in track mode and then freezes (holds) it at a fixed voltage level during the conversion period so the ADC measures a stable, non-changing value. A typical S/H uses a JFET switch to connect the input to a hold capacitor (e.g., 10 pF) and an op-amp buffer to drive the ADC input; when the switch opens, the capacitor holds the last sampled voltage. Without a S/H, a SAR ADC comparing a moving input during its 16-cycle conversion sequence would make an error at each bit step as the signal changes between comparisons.

Follow-up: What is droop in a sample-and-hold circuit and what causes it?

Q11. What is the Whittaker-Shannon interpolation formula?

The Whittaker-Shannon formula states that a band-limited signal sampled at or above the Nyquist rate can be exactly reconstructed as x(t) = Σx[n] × sinc((t−nTs)/Ts), a sum of sinc-interpolated samples. Each sample x[n] contributes a scaled sinc function centered at time nTs, and the infinite sum of all sincs exactly reconstructs the original continuous signal. This ideal interpolation is implemented approximately in digital audio players using polyphase FIR interpolation filters that approximate the infinite sinc kernel with a finite-length FIR filter.

Follow-up: Why is the ideal sinc interpolation filter non-causal and how is it approximated in practice?

Q12. What is the difference between the sampling rate and the bit depth of an ADC and how do both affect audio quality?

Sampling rate determines the maximum signal frequency that can be captured (bandwidth = fs/2), while bit depth determines the minimum resolvable amplitude step (dynamic range ≈ 6.02 × N dB). A 16-bit, 44.1 kHz audio ADC captures frequencies up to 22.05 kHz with a 96 dB dynamic range, matching the limits of human hearing. Increasing sampling rate to 192 kHz extends bandwidth but provides no perceptible audio quality improvement for humans, while increasing bit depth from 16 to 24 bits improves low-level noise floor headroom used in recording and mastering — not playback.

Follow-up: Why do professional recording studios capture audio at 24-bit, 96 kHz even though the final delivery format is 16-bit, 44.1 kHz?

Q13. What is decimation and how is it applied after oversampling?

Decimation reduces the sample rate of an oversampled digital signal by discarding samples (after low-pass filtering to prevent aliasing) by a factor M, producing an output at fs/M with the quantization noise redistributed to give higher in-band SNR. A sigma-delta modulator in the PCM1808 audio codec oversamples at 6.144 MHz and decimates by 128 to produce a 48 kHz output stream, with the SINC³ decimation filter removing quantization noise above 24 kHz before downsampling. Decimation without the preceding low-pass filter causes aliasing just as undersamplingg a continuous signal would.

Follow-up: What type of digital filter is typically used before decimation and why is a simple averaging filter sometimes sufficient?

Q14. What happens to the spectrum of a signal when sampled at exactly twice its highest frequency?

When sampled at exactly fs = 2fmax, the spectral copies just touch at fmax without overlapping, which is the theoretical minimum for no aliasing; however, reconstruction requires an ideal brick-wall low-pass filter with infinite roll-off at exactly fmax, which is physically unrealizable. If the signal has any energy at exactly fmax (e.g., a pure sine at the Nyquist frequency), the reconstructed amplitude depends entirely on the sampling phase — sampling at the sine's peaks gives maximum amplitude but sampling at the zero crossings gives zero amplitude. This is why practical systems sample at 5–10× fmax to allow realizable anti-aliasing filter slopes.

Follow-up: What sampling artifact occurs when a pure sinusoid at exactly the Nyquist frequency is sampled at exactly 2fmax?

Q15. What is sub-Nyquist sampling and how is it used in compressed sensing?

Sub-Nyquist sampling deliberately samples below the Nyquist rate for signals known to be sparse in some domain, relying on compressed sensing algorithms (like LASSO or basis pursuit) to reconstruct the original sparse signal from far fewer measurements than Shannon requires. The Xampling architecture by Eldar et al. samples wideband radar signals at 10–50× below Nyquist by exploiting the sparsity of a few strong targets in a large empty radar scene. This approach is implemented in prototype ADC systems from companies like Analog Devices where capturing the full Nyquist rate would require ADC sampling speeds beyond current technology.

Follow-up: What mathematical condition on the signal must be satisfied for compressed sensing reconstruction to work?

Common misconceptions

Misconception: The Nyquist rate and Nyquist frequency are the same value.

Correct: The Nyquist rate is the minimum sampling frequency (2fmax), while the Nyquist frequency is the maximum representable frequency in the sampled data (fs/2) — they are reciprocally defined, not the same quantity.

Misconception: Sampling at exactly twice the signal frequency always gives perfect reconstruction.

Correct: Sampling at exactly 2fmax is theoretically sufficient only with an ideal brick-wall filter; practically, a pure sine at exactly the Nyquist frequency can be reconstructed as having zero amplitude if sampled at its zero crossings.

Misconception: Oversampling only wastes memory and bandwidth without adding real signal information.

Correct: Oversampling redistributes quantization noise across a wider frequency band, reducing noise density in the signal band and increasing effective SNR and resolution through subsequent digital filtering and decimation.

Misconception: An anti-aliasing filter can be placed after the ADC to remove aliases.

Correct: Anti-aliasing filtering must occur before the ADC samples the signal; once a signal has aliased, the alias is indistinguishable from a legitimate signal component and cannot be removed by post-sampling filtering.

Quick one-liners

What is the minimum sampling rate for a 10 kHz bandwidth signal per the Nyquist theorem?20 kHz — twice the maximum signal frequency.
What is the Nyquist frequency for a system sampling at 48 kHz?24 kHz — the maximum correctly representable frequency.
What is aliasing?The appearance of high-frequency signal components as false low-frequency components when a signal is sampled below the Nyquist rate.
What filter must be placed before an ADC to prevent aliasing?An anti-aliasing low-pass filter with cutoff at or below fs/2.
How much does SNR improve for each doubling of the oversampling ratio?3 dB improvement, equivalent to 0.5 additional bits of effective resolution.
What is the ideal reconstruction filter and why is it non-causal?An ideal brick-wall low-pass filter with sinc impulse response extending from −∞ to +∞ in time — it requires future samples to compute the output, making it non-causal.
What component in an S/H circuit holds the sampled voltage?A capacitor — the input voltage charges it when the switch is closed, and it holds the voltage when the switch opens.
What is decimation?The process of reducing sample rate by an integer factor M after low-pass filtering the oversampled digital signal.
What is aperture jitter and why does it limit high-frequency ADC accuracy?Aperture jitter is timing uncertainty in the sample instant; for fast-moving signals, this timing error converts to amplitude error proportional to the signal's slew rate.
In the Whittaker-Shannon formula, what basis function is used for interpolation?The sinc function — each sample contributes a scaled sinc centered at its sampling instant.

More Signals Systems questions