ADC Code, Voltage and Quantization Interval
Extends resolution estimates with legal integer-code/voltage conversion, Vmin/Vmax and the quantization interval represented by each code.
Inputs and reverse calculation
Calculated results
| Quantization levels | 1024 |
|---|---|
| Voltage resolution LSB | 4.883 mV |
| ADC code | 512 |
| Current voltage value | 2.5 V |
| Quantization interval for this code | [2.5 V, 2.505 V) |
How to interpret the result
An ideal N-bit ADC has 2ᴺ quantization codes, numbered 0 through 2ᴺ−1. A voltage edit preserves the entered voltage and calculates its code. A code edit returns the lower voltage boundary and displays the whole interval.
Formulas and units
LSB=(Vmax−Vmin)/2ᴺ; code=floor((Vin−Vmin)/LSB); Vlow=Vmin+code·LSB; Vhigh=Vmin+(code+1)·LSB. The Vin=Vmax endpoint maps to 2ᴺ−1; the top interval includes Vmax.
Worked example
For 10 bits and 0–5 V, LSB=0.0048828125 V. Code 512 has lower boundary 2.5 V and interval [2.5,2.5048828125) V. An input of 5 V gives final code 1023. With a −5–5 V range, code 512 has lower boundary 0 V.
Scope and limitations
This is an ideal equal-width bin model with lower-bound reconstruction, excluding real ADC half-LSB transition thresholds, offset, gain errors and interface encoding. Negative Vmin is handled by an origin shift; codes follow offset-binary numerical mapping, not two’s complement. Resolution is restricted to integer 1–32 bits and code to integer 0–2ᴺ−1. A bit change invalidating the current code is rejected; change the code first. App fractional-bit, negative-code and code=2ᴺ behavior is not retained. Only the explicit Vin=Vmax final-code endpoint rule remains. Voltage input is not overwritten with a bin edge.
Common questions
Why is the LSB denominator not 2ᴺ−1?
2ᴺ is the number of quantization intervals; 2ᴺ−1 is the index of the last code. Confusing them changes each bin width.
Why might a real ADC produce a different reading?
A device may use midpoint reconstruction, half-LSB transitions, two’s complement or a different full-scale definition. Check its transfer curve and calibration parameters.
Related tools
Formula and data sources
Rebuilt from the extracted Electrodoc Pro 5.2 specification. Added, inferred and corrected behavior is identified in the limitations. Updated 2026-11-14.