An ideal ADC uniquely represents all analog inputs within a certain range by a limited number of digital output codes.
Each digital code represents a fraction of the total analog input range. Since the analog
scale is continuous, while the digital codes are discrete, there is a quantization process that introduces an error. As the
number of discrete codes increases, the corresponding step width gets smaller and the transfer function approaches an
ideal straight line. The steps are designed to have transitions such that the midpoint of each step corresponds to the point
on this ideal line.

The width of one step is defined as 1 LSB (one least significant bit) and this is often used as the reference unit for other
quantities in the specification. It is also a measure of the resolution of the converter since it defines the number of
divisions or units of the full analog range. Hence, 1/2 LSB represents an analog quantity equal to one half of the analog
resolution.

The resolution of an ADC is usually expressed as the number of bits in its digital output code. For example, an ADC
with an n-bit resolution has 2^{n} possible digital codes which define 2^{n} step levels.
However, since the first (zero) step
and the last step are only one half of a full width, the full-scale range (FSR) is divided
into 2^{n} – 1 step widths.

Effective number of bits (ENOB) is a measure of the dynamic range of an ADC. The resolution of an ADC is
specified by the number of bits used to represent
the input analog value, in principle giving 2^{N} signal levels for an N-bit signal.
However, all real ADC circuits introduce noise and distortion. ENOB specifies the resolution
of an ideal ADC circuit that would have the same resolution as the circuit under consideration.

ENOB is based on the equation for an ideal ADC’s SNR:

**SNR (dB) = 6.02 × N + 1.76 dB**

where N is the ADC’s resolution.
A real world ADC never achieves this SNR due to its own noise and errors. You can rearrange the equation to calculate an
ADC’s effective N, or ENOB as we commonly call it:

**ENOB = (SNR – 1.76)/6.02 dB**.

An ADC datasheet will indicate the ENOB uder certain condition. SNR can be obtain as follows:

The resolution of an ADC is usually expressed as the number of bits in its digital output code. For example, an ADC
with an n-bit resolution has 2n possible digital codes which define 2n step levels. However, since the first (zero) step
and the last step are only one half of a full width, the full-scale range (FSR) is divided into 2^{n} – 1 step widths.

for an n-bit converter

The Ideal Transfer Function (ADC)

Signal-to-noise and distortion ratio (SNR) is a measure of the quality of a signal.
It is a measure used in science and engineering that compares the level of a desired signal
to the level of background noise. It is defined as the ratio of signal power to the noise power,
often expressed in decibels. A ratio higher than 1:1 (greater than 0 dB) indicates more signal
than noise. While SNR is commonly quoted for electrical signals, it can be applied to any
form of signal (such as isotope levels in an ice core or biochemical signaling between cells).

By definition SNR is computed as a ratio of signal and noise powers:

R_{signal} is the internal impedance of the signal source.

R_{noise} is the internal impedance of the noise source.

If **R _{signal} = R_{noise}**, then

The quantization error as a function of time is shown in more detail in the figure. A simple sawtooth waveform provides a sufficiently accurate model for analysis. The equation of the sawtooth error is given by:

Signal to noise ratio can be computed as follows:

**SNR = P _{signal} / P_{noise} = μ / σ**

The analog power supply is used as the reference voltage for conversion. As the ADC output is the ratio between the analog signal voltage and the supply voltage, any noise on the analog reference will cause a change in the converted digital value.

**V _{STEP} = V_{REF} / 2^{n}**

The analog signal to be converted may have some noise superimposed on it. There may be a
high frequency noise signal. It is recommended to connect a 10nf capacitor to the analog input
signal. You can also add a low pass filter but this will affect F_{AIN}, so you should use this only
if the input signal frequency is low.

F_{AIN} is the frequency of the analog input signal.

The offset error as shown in Figure 3 is defined as the difference between the nominal and actual offset points. For an ADC, the offset point is the midstep value when the digital output is zero, and for a DAC it is the step value when the digital input is zero. This error affects all codes by the same amount and can usually be compensated for by a trimming process. If trimming is not possible, this error is referred to as the zero-scale error.