The result of an analog-to-digital conversion is written to the 16-bit Result (ADCn.RES) register and is given by the following equations:

Single-ended 12-bit conversion:

Single-ended 10-bit conversion:

Differential 12-bit conversion:

Differential 10-bit conversion:

where V_{AINP} and V_{AINN} are the positive and negative ADC
inputs and V_{ADCREF} is the selected ADC voltage reference.

The data format used for single-ended conversions is unsigned one’s complement, while two's complement with sign extension is used for differential conversions. Consequently, for differential conversions the sign bit is padded to the higher bits in the Result register, if needed.

By default, conversion results are stored in the Result register as
right-adjusted 16-bit values. The eight Least Significant bits (LSbs) are then located in the
low byte of the Result register. By writing a ‘`1`

’ to the Left Adjust Result
(LEFTADJ) bit in the Control A (ADCn.CTRLA) register, the values will be left-adjusted by
placing the eight Most Significant bits (MSbs) in the high byte of the Result register.

The two figures below illustrate the relationship between the analog input and the corresponding ADC output.

Figure 1. Unsigned Single-Ended, Input Range, and
Result Representation

Where V_{AINP} is the single-ended or internal input.

Figure 2. Signed Differential Input, Input Range,
and Result Representation

If a single-ended analog input is above the ADC voltage reference level, the 12-bit ADC result
will be `0xFFF `

(decimal 4095). Likewise, if the input is below 0V, the ADC
result will be `0x000`

.

If the voltage difference between V_{AINP} and V_{AINN} for a 12-bit
differential conversion is above the ADC voltage reference level, the ADC result will be
`0x7FF`

(decimal 2047). If the voltage difference is larger than the voltage
reference level in the negative direction, the ADC result will be `0x800`

(decimal -2048).