The ideal A/D converter (ADC) produces a digital output code that is a function of the analog input voltage and the voltage reference input. The figure below shows the basic ADC measurement circuit.

The formula for the ADC digital output is provided by Equation 1

(1)
$$Output Code = FS (VIN_+ - VIN_-)(VREF_+ - VREF_-)$$

Full-Scale (FS) is defined as analog input voltage range where the ADC digitizes the input up to the maximum full-scale input voltage. The FS input voltage range is determined by the voltage reference value. FS range varies from device to device, for an n-bit (n is the resolution in bits) ADC, FS = (2n) (code width)