ADC Resolution and LSB Calculator
ADC Resolution and LSB Calculator
What one bit of an analogue-to-digital converter is actually worth: the LSB size, the number of codes, the quantisation error and its RMS value, the ideal signal-to-noise ratio 6.02N + 1.76 dB derived rather than quoted, the effective number of bits your measured SNR really gives you, and what your sensor’s smallest meaningful change maps to in codes.
ADC resolution
a 12-bit converter on a 3.3 V reference, a signal that swings 2.0 V peak to peak, a sensor spanning 100 units of which 0.1 matters, a measured SNR of 68 dB and 16× oversampling
From bits to volts, and from volts to decibels
- LSB
- one code width. Vref ÷ 2^N for an ADC’s code width; Vref ÷ (2^N − 1) is the DAC step and both are shown
- erms
- the RMS of an error uniformly distributed over ±½ LSB — the integral of e² over one code width divided by that width, which is LSB²/12
- SINAD
- signal to noise AND distortion, measured on a full-scale sine. Feeding it into the SNR relation backwards is what defines ENOB
- OSR
- oversampling ratio. The quantisation noise power is spread evenly to fs/2, so filtering to fs/2/OSR keeps 1/OSR of it
Worked example
a 12-bit converter on a 3.3 V reference, a signal that swings 2.0 V peak to peak, a sensor spanning 100 units of which 0.1 matters, a measured SNR of 68 dB and 16× oversampling
12 bits give 4,096 codes, so one LSB is 3.3 V ÷ 4,096 = 805.7 µV
The quantisation error is anywhere in ±½ LSB = ±402.8 µV; spread evenly over that, its RMS is LSB ÷ √12 = 232.6 µV
A full-scale sine has an RMS of 2N·LSB ÷ 2√2, so the ratio of the two is 2N·√12 ÷ 2√2 — in decibels, 6.0206·N + 1.7609 = 74.00 dB at 12 bits
Reading that backwards, a measured 68 dB is an ENOB of (68 − 1.76) ÷ 6.02 = 11.00 bits — 1.00 bits of the 12 are lost to noise
Your signal uses only 60.6% of the reference, which costs another 0.72 bits, and spans 2,482 codes
Your 0.1-unit resolution maps to 2 mV, which is 2.48 codes — uncomfortably few
Averaging 16 samples spreads the noise over 16× the bandwidth and then throws most of it away: +12.04 dB, which is 2.00 extra bits and an effective LSB of 201.4 µV
What each resolution is worth on a 3.3 V reference
| Bits | Codes | One LSB | RMS quantisation error | Ideal SNR | Samples to reach it from 12 bits |
|---|---|---|---|---|---|
| 8 | 256 | 12.89 mV | 3.721 mV | 49.92 dB | — |
| 10 | 1,024 | 3.223 mV | 930.3 µV | 61.96 dB | — |
| 12 | 4,096 | 805.7 µV | 232.6 µV | 74.00 dB | 1 |
| 14 | 16,384 | 201.4 µV | 58.14 µV | 86.04 dB | 16 |
| 16 | 65,536 | 50.35 µV | 14.54 µV | 98.08 dB | 256 |
| 18 | 262,144 | 12.59 µV | 3.634 µV | 110.12 dB | 4,096 |
| 20 | 1,048,576 | 3.147 µV | 908.5 nV | 122.16 dB | 65,536 |
| 24 | 16,777,216 | 196.7 nV | 56.78 nV | 146.24 dB | 16,777,216 |
What a bit is actually worth
An analogue-to-digital converter divides its reference voltage into 2N equal steps and tells you which one the input landed in. That is the whole of it: a 12-bit converter on a 3.3 V reference has 4,096 codes each 805.7 µV wide, and the answer it gives you is the code number, not the voltage. The reference is therefore the measurement — a reference that is 0.5% high makes every reading 0.5% low, and no amount of resolution helps.
Where LSB ÷ √12 comes from. Rounding to the nearest code leaves an error anywhere between −½ LSB and +½ LSB, and for a signal that moves about, every value in that interval is about equally likely. The mean square of a quantity uniformly distributed over that range is the integral of e² across one code width divided by the width — ∫e² de/q from −q/2 to +q/2, which is q²/12 — so the RMS is q/√12, or 232.6 µV at the defaults. That figure, not the ±½ LSB worst case, is what adds in quadrature with the rest of the noise in your system.
And where 6.02N + 1.76 dB comes from. Take the largest sine the converter can digitise: it spans the whole range, 2N LSBs peak to peak, so its RMS is 2N·LSB ÷ 2√2. Divide by the error’s RMS of LSB ÷ √12 and the LSB cancels, leaving 2N·√12 ÷ 2√2 = 2N·√1.5. In decibels that is 20·log₁₀(2)·N + 20·log₁₀(√1.5) = 6.0206N + 1.7609, universally quoted as 6.02N + 1.76. Nothing about a particular converter enters it — it is the best any N-bit quantiser could do, which is why the number a real one achieves, divided back through the same relation, is such a useful figure of merit. That is ENOB: (SINAD − 1.76) ÷ 6.02. A 12-bit part measuring 68 dB is an 11.00-bit part, and that is a good one.
Why a 12-bit reading is rarely 12 bits. Four things eat the difference, and only the first is the converter’s fault. Its own input-referred noise, which on a 24-bit delta-sigma part is what actually sets the usable resolution — enter it above and the page will tell you how many bits survive. The reference: its noise and its drift with temperature appear directly in every reading. The source: an impedance too high for the sampling capacitor to settle against produces a gain error that looks like non-linearity. And the range you use — a signal that swings 2 V on a 3.3 V reference has thrown away 0.72 bits before the first conversion, which an amplifier in front would have kept. The 4–20 mA loop calculator and the PT100 RTD calculator both end at an ADC input, and both are worth checking against the code sizes here: a PT100 changes by 0.39 Ω per degree, and how many codes that is decides whether your thermometer resolves tenths.
Oversampling, and the assumption underneath it. Quantisation noise power is spread more or less evenly from DC to half the sampling rate. Sample four times faster and the same total noise is spread over four times the bandwidth, so filtering back down to the band you care about keeps a quarter of it — 6.02 dB, exactly one bit. Hence the rule that every extra bit costs four times the samples: two extra bits is sixteen, four extra bits is 256. The assumption that makes it true is that the quantisation error is white and uncorrelated with the signal, and that is not automatic. A dead-still DC input on a quiet converter gives the same code every time, and averaging a thousand identical numbers gives you that number. You need at least an LSB or two of genuine noise — or deliberate dither — for oversampling to do anything at all. This page’s derivation was checked by quantising a full-scale sine, taking its spectrum and measuring both the total SNR and the in-band noise after decimation, rather than by trusting the formula.
Frequently asked questions
How do you calculate the LSB size of an ADC?
LSB = Vref ÷ 2^N. For a 12-bit converter on 3.3 V that is 805.7 µV. Some datasheets use Vref ÷ (2^N − 1) instead; that is the DAC step size, the difference between the first and last output levels, and the page shows both.
What is the quantisation error of an ADC?
Up to ±½ LSB — ±402.8 µV at 12 bits on 3.3 V — and its RMS value is LSB ÷ √12, which is 232.6 µV. Use the RMS figure when you are adding it to other noise sources, and the ±½ LSB figure when you are stating a worst case.
Where does SNR = 6.02N + 1.76 dB come from?
It is the RMS of a full-scale sine (2^N·LSB ÷ 2√2) divided by the RMS quantisation error (LSB ÷ √12). The LSB cancels, leaving 2^N·√1.5, and in decibels that is 20log10(2)·N + 20log10(√1.5) = 6.0206N + 1.7609.
What is ENOB?
Effective number of bits: the resolution an ideal converter would need to achieve the SINAD you actually measured. ENOB = (SINAD − 1.76) ÷ 6.02. A 12-bit converter measuring 68 dB has an ENOB of 11.00, so one bit of the twelve is noise.
Does oversampling really add resolution?
Yes, 10log10(OSR) dB of it, so four times the samples for each extra bit — but only if the noise is white and uncorrelated with the signal. If the input is quiet and dead still, every conversion returns the same code and averaging achieves nothing. Add dither, or rely on the noise already there.
Why does my 12-bit ADC only give 10 useful bits?
Some combination of the converter’s own noise, reference noise and drift, supply and ground noise, clock jitter, a source impedance the sampling capacitor cannot settle against, and a signal that does not fill the reference. Two bits of loss between the number on the package and the number you can trust is completely normal.
Related calculators
References
- Analog Devices. MT-001 Tutorial: Taking the Mystery out of the Infamous Formula, “SNR = 6.02N + 1.76dB,” and Why You Should Care, by Walt Kester. The RMS quantisation noise q/√12, the full-scale sine RMS 2Nq/2√2, the resulting SNR = 6.02N + 1.76 dB over DC to fs/2, and the process-gain term 10·log₁₀(fs/2·BW) for oversampling.
- Analog Devices. MT-003 Tutorial: Understand SINAD, ENOB, SNR, THD, THD + N, and SFDR so You Don’t Get Lost in the Noise Floor, by Walt Kester. SINAD as the ratio of the signal RMS to the root-sum-square of everything else, and ENOB = (SINAD − 1.76 dB) ÷ 6.02, with the amplitude correction for a signal below full scale.
- Kester W (ed.). The Data Conversion Handbook. Analog Devices / Newnes, 2005. Chapter 2 on sampling and quantisation, and Chapter 5 on testing converters.
