# Aliasing

**Aliasing** is a problem with digital sampling of analog waveforms, such as sound waves. When the digital sample is converted back to an analog waveform - such as when a CD is played - the player will emit the lowest **alias** waveform, which might not be the sound actually recorded.

## The Problem

Sound waves are continuous and can have any frequency, while digital sampling only records the value at discrete intervals. For example, a sampling frequency of two kilohertz records the value of the sound wave 2,000 times per second. If the original sound wave has a frequency of 500 hertz, that means that its value will be recorded four times per period, or cycle.

Unfortunately, multiple sine waves can fit these points. For example, `sin(2πt)` and `sin(10πt)` cross at six points in each cycle. When digitalized with a frequency of 6t, they will create identical digital records. A CD player playing the digital record will not be able to tell which sound was recorded. These two waves are therefore called *aliases* of each other.

### Analyzing Aliases

In general, the sequence of alias frequencies is `n*f _{s}±g`, where

`g`is the lowest alias frequency,

`f`is the frequency of sampling, and

_{s}`n`is any natural number.

This series begins:
`g`, `f _{s}-g`,

`f`,

_{s}+g`2f`,

_{s}-g`2f`. It continues to infinity.

_{s}+g## The Solution

The **Nyquist-Shannon Sampling Criterion**, formulated by Harry Nyquist in 1928 and proven by Claude Shannon in 1949, states that each digital sample can be converted to a unique analog signal if the sampling rate is more than twice as large as the highest frequency in the signal. While Shannon's proof requires Fourier transforms, it can be deduced from the sequence of alias frequencies above. If `g < 1/2 f _{s}`, then f

_{s}is, by definition, greater than two times the sample's frequency. If

`g > 1/2 f`, then

_{s}`f`, which is another alias, is less than one-half the frequency of sampling. Therefore, there is always one unique alias frequency less than 1/2 f

_{s}-g_{s}.

Of course, every frequency always has aliases. However, digital-to-analog converters assume that the sound has been recorded according to the Nyquist Criterion; therefore, they always play back the lowest alias.