I learned that one way for an ADC to sample its input is using a Sample and Hold circuit.
In order to compute the digital output, the ADC can use a DAC and a comprator, in the following way: **broken link removed**
Say that the ADC samples a sine wave.
I read that:
1. if i start increasing the sine wave's frequency from zero Hz, then at some point, the output will be a straight line,
2. and that the first frequency that the output becomes a staight line is the ADC's sampling frequency.
When the sampling frequency is exactly equal to the frequency of the input AC signal, the sample will always occur at the same point on the AC waveform, giving a constant sample voltage. The sampled output will thus be a DC level. The value of this DC will depend at what point on the AC waveform the samples are being made. It can vary from 0V to the peak AC value.
It would not remain a straight line if you vary one of the frequencies. It's only going to be a straight line when one of the frequencies is a direct harmonic of the other, where it's sampling the same place in the sine wave every cycle, as crutschow mentioned.