Understanding bits and resolution is key to working with analog converters. The resolution of an analog converter helps us to make meaningful interpretations of a sensed signals. It seems that the resolution just gives us a conversion ratio so that the true value of the signal can be expounded, but there is more to it, than what meets the eye.

## What are bits in Analog converters?

Bits in ADC are actually the number of bits the output data from the ADC will have. A 8, 12, 16 or 24 bit ADC will convert the analog signal into a discrete time-based data which will have 8, 12, 16 or 24 bits respectively. As shown in the image below according to the ADC bits, the output data is determined. For 8 and 16 bit, the output data size is 1 and 2 bytes respectively. But for 12 bit, we generally have 2 bytes of output data, which is left or right aligned (details of which can be found in the manufacturers datasheet) with 4 bit as ‘don’t care’.

Thus we can deduce that the bits represent the sensitivity with which the ADC senses the signal. More the bits an ADC has, finer the change it can perceive (improved resolution). The higher the resolution, more precise the measurement.

**Step Size(Voltage step) : **Δ** = V _{ref }/ 2^{n}**

Where,

**V _{ref} **= Reference voltage, it is the range across which the voltage measurement is to be made

**. V**V

_{ref}=**V**

_{refmax }–

_{refmin}.**n**= ADC resolution in bits.

To better understand step size, let’s assume the example where we have a 8 bit ADC. with **V _{ref}** = 5V.

**Therefore, Δ = **

**5V/256 = 0.0195V or 19.5mV = LSB**

The voltage step size is also the LSB (Least Significant Bit) of the data obtained. i.e the minimum value of the output date i.e. 1 corresponds to the voltage step size. The MSB (Most Significant Bit) of this word indicates whether the input voltage is greater than half the reference (2.5V, with a 5V reference). Each succeeding bit represents half the range of the previous bit.

Bit: |
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |

Volts: |
2.5 | 1.25 | 0.625 | 0.3125 | 0.156 | 0.078 | 0.039 | 0.0195 |

Output Value: |
0 | 1 | 1 | 0 | 1 | 1 | 0 | 0 |

The table above illustrates this point. Adding the voltages corresponding to each set bit in 0110 1100, we get:

**1.25 + .625 + .156 + .078 = 2.109 Volts**

For the example we’ve been using , the voltage resolution is 19.5mV. This means that any input voltage below 19.5mV will result in an output of 0. Input voltages between 19.5mV and 39mV will result in an output of 1. Between 39mV and 58.6mV, the output will be 2.

Voltage resolution can be improved by reducing the reference input. Changing that from 5V to 2.5V gives a resolution of 2.5/256 or 9.7mV. However, the maximum voltage that can be measured is now 2.5V instead of 5V.

The only way to increase resolution without reducing the range is to use an ADC with more bits. A 10-bit ADC has 2^{10}, or 1024 possible output codes. So the resolution is 5V/1024, or 4.88mV; a 12-bit ADC has a 1.22mV resolution for this same reference.

### Step size formula

When I initially started working with ADCs, I went through a lot of documents and found something confusing. Certain documents mentioned the formula as **V _{ref }/ 2^{n} **while, others mentioned

**V**

_{ref}**. So which one is true?**

_{ }/ (2^{n }– 1)Well, both the formulas are true as it all comes down to the definition of **V _{ref. }**

While using the formula **V _{ref }/ 2^{n}**,

**V**= Reference voltage

_{ref }While using the formula **V _{ref }/ (2^{n }– 1)**,

**V**= Full-scale voltage reading (

_{ref }**E**)

_{FSR}or FSso the correct way of putting this together would be:

** Voltage** **Step Size : **Δ** = V _{ref }/ 2^{n} = E_{FSR} / (2^{n }– 1)**

Full-scale voltage determines the maximum voltage the ADC can measure. For our example of an 8 bit ADC with Vref=5V, if we have a close look at the step size, the digital output is actually restricted to 255 which is equivalent to 4.98V. Here 4.98V is our Full-scale. Though our reference voltage is 5V (**V _{ref}**), we can only measure up to 4.98V (

**E**

_{FSR}or**FS**).

**E _{FSR }= V_{ref }– LSB**

Another confusion is the formula and the example stated on Wikipedia regarding analog to digital converters (as on 27^{th} July 2016).

The data stated on Wikipedia is a little confusing and may seem to contradict the facts stated earlier in this post. But if you take a closer look at the definition, they are one and the same.

** **Δ** = V _{ref }/ 2^{n} = E_{FSR} / (2^{n }– 1)**

The formula for voltage step size seems to be the same as we deduced, but the definition of **E _{FSR}** seems to match the formula for

**V**. This completely contradicts the idea of

_{ref}**E**

_{FSR}**=V**But as I said earlier, everything lies in the definition of the terms and symbols used. The same notations used by different documents may have a different definition and meaning.

_{ref }– LSB.As stated,** V _{RefHi}** and

**V**are the upper and lower extremes, respectively, of the voltages that can

_{RefLow}**“be coded.”**

- The term “be coded” is really important. This means the
value is associated with the upper boundary voltage that can be quantized and encoded. i.e 255 for an 8-bit converter. Whereas our*V*_{RefHi}**V**definition takes into account V_{ref}as the upper extreme value which in fact cannot be coded. i.e. V_{refmax}corresponds to 256 which is a value above 8 bits. So the actual value which can be coded is V_{refmax}– LSB which corresponds to 255. Resulting in the conclusion of_{refmax}**V**, thus proving the equality of both the definitions._{RefHi}= V_{refmax }– LSB -
### Some pratical advice

- In most of the ADCs I have worked with like ST, Freescale, TI, Microchip the manufacturer’s datasheet sticks to the formula of
**= V**where_{ref }/ 2^{n }**V**V_{ref}=V_{refmax }–. And V_{refmin}(_{refmax }**V**) and V_{ref+ }(_{refmin }**V**) are provided as Input pins on the microcontroller or ADC chip. And in most applications,_{ref- }**V**is to be externally connected to V_{ref+}_{dd}(supply for the IC) or any voltage below V_{dd}through a small inductor and**V**is externally connected to the ground. If_{ref-}**V**pin is not provided, it is assumed to be internally connected to the analog ground (Vssa)._{ref-}