Embedded Systems Fundamentals · Interview question

What is aliasing and how do you prevent it?

A strong answer

Aliasing is what happens when you sample a signal too slowly: frequency components above half the sampling rate (the Nyquist frequency, f_s/2) fold back down and appear as lower frequencies that weren't in the original, phantom signals indistinguishable from real ones once sampled. For example, a real 9 kHz tone sampled at 10 kHz appears as a 1 kHz tone. The Nyquist-Shannon theorem says you must sample at strictly more than twice the highest frequency present to capture it faithfully. You can't remove aliasing in software after the fact, because the high-frequency information has been irreversibly mapped onto low frequencies. The prevention is an analog anti-aliasing filter, a low-pass filter placed before the ADC that attenuates everything above f_s/2 so it can't fold in. For a slowly-varying signal like temperature this is trivial (or inherent), but for audio, vibration, or any fast signal it's mandatory, and the filter's cutoff and the sample rate are chosen together.

What a weak answer sounds like

You know the answer. Do you know what gets you dinged?

Pro breaks down the answer most candidates actually give to this question — and the specific reason an interviewer marks it down. It’s the difference between sounding correct and sounding senior, on all 472 questions.

From the lesson

ADC & DAC

Bridging the analog and digital worlds: how an ADC quantizes a voltage to an N-bit count (and a DAC reverses it), the count↔voltage math, and why Vref and Nyquist set your limits.

More ADC & DAC questions

Browse all 472 interview questions
What is aliasing and how do you prevent it? | EmbeddedPrep.io