Mark's Article on Sampling
About Sampling
It is impossible to store all possible information about a waveform in a computer. The function on any interval has an infinite amount of points inside that interval. We need a way of storing a waveform inside finite memory. This can be accomplished through the awesomeness of something called sampling. With some restrictions, mentioned below, you can take the magnitude of the waveform at a given time interval, store it, and be able to reproduce the the same waveform through Fourier Transforms.
Restrictions
When you sample, you must first band-limit your input waveform before you sample. Otherwise, you'll get a lot of artifacts.
Why you must band-limit the input
When you look at the Fourier Transform of an example input waveform, you'll get a semicircle. After you sample, the semicircle will be periodic. If you do not band-limit the input wavevform, the semicircles may overlap, and if that happens, there is no way of knowing what part of each semicircle is where. You won't be able to tell the difference between each semicircle.
Nyquist Theorem
If you sample a band-limited signal at a sample rate greater than 2 times the highest frequency component of the input waveform, you won't lose any information about the signal and you'll be able to reconstruct the waveform from the samples.