# Origin of a Resolution formula for ADC/DAC

What is the origin for the forumla: $$\ R= {1\over2}V_{LSB} ={1\over2}*{V_{inMax}\over2^n-1} \$$

Where does the $$\ {1\over2} \$$ comes from?
Shouldn't it be just: $$\ R={V_{inMax}\over{2^n-1}}\$$ ?

• @TonyStewartSunnyskyguyEE75 AFAIK: if your $2^0$ bit(i.e 00..0) is 0v, then you're fine. but usually 00..0 is 0v. it's like counting: when you count: 1,2,3- 3numbers.but we didnt count 0. thats why we need the "minus one" part. An example: Vin[0v-9v], 2bit. so we know 00=0v, and 11=9v. the smallest step will be $R={{9V-0V}\over{2^n-1}} -> R=3v$ (i.e. 0v,3v,6v,9v). if im wrong please correct me. Feb 1, 2020 at 20:18

If $$\R\$$ is the resolution as conventionally defined, then $$R = \frac{V_{REF}}{2^N}$$ where $$\R\$$ is the resolution in volts, $$\V_{REF}\$$ is the internal reference voltage for the converter, and $$\N\$$ is the number of bits. The resolution is the smallest observable change in input voltage (for an ADC) or the smallest possible change in the output voltage (for a DAC). Note that the maximum observable/producible voltage is therefore $$V_{MAX} = R \times (2^N -1)$$ You need to be careful here, because the "maximum voltage" specification for an ADC may be the maximum input voltage that does not damage the ADC, not the maximum measurable voltage.

You can also talk about the uncertainty in an ADC input value, and the uncertainty is assumed to be plus or minus one-half of the resolution. I think perhaps you have mixed up the uncertainty and the resolution.

• [1]- thanks for the detailed answer [2]- why in the first formula, it's Vref/2^N ? Shouldnt it be devided by 2^N-1 ? because we "exclude" the 00...0. Just like we usually dont count starting at 0, but instead at 1. [3]- so if i understood corectly, the half(0.5) there is to account for the 'uncertainty'? Although you said that its usually 1.5... Feb 1, 2020 at 19:46
• @nutter if you have a 1-bit DAC, do you divide your max voltage by 1? Or 2? Counting the number of pieces something is divided into is not the same as counting how many times it has been divided. If I cut something ONCE, I end up with TWO pieces, Feb 1, 2020 at 20:16
• for unipolar, isn't $V_{REF}=V_{MAX}$ then $R=\dfrac{V_{REF}}{2^N-1}$ Feb 1, 2020 at 20:31
• @DKNguyen apologies if i missunderstood, but: if youve 1bit, AFAIK, you devide by 1. $R={{9V-0V}\over{2^1-1}}={9\over1}=9v$ i.e. your step/resolution is 9v. either it is 0 or 1. 0v or 9v. basicaly a 'true/false' switch. I still dont understand why Elliot didnt write $2^N-1$ ... the $2^N$ is number of values, including 00...0. [Edit: formating + correction] Feb 1, 2020 at 20:34
• @Nutter I think I see the difference in thought. 1-bit means you can represent two states: zero or one. We have only two discrete values but we are trying to represent an range of infinite values. Two states means two ranges, not points. From 0V all the way to 9V. So zero has to cover everything between 0V and 4.5V, and one has to cover everything between 4.5V and 9V. Feb 1, 2020 at 20:54

Your output step size is 1LSB, but the maximum distance (i.e. error) away from your truly desired value is 1/2LSB, when the desired value is halfway between two steps and you cannot get any closer to it.

• Not sure i understand. Do you mean the 1/2*Vlsb is the 'uncertainty' that Elliot talks about in his answer? if so, why 1/2, and not other number? I ask more theoreticaly. Trying to understand a lecture i had. Feb 1, 2020 at 19:50
• @Nutter Yes. What other number? Feb 1, 2020 at 19:51
• @DK Thank you. I see. but why 0.5? is it a standad/usual value? why the uncertainty isnt, say, 0.1 or a whole number? is it possible that my lecturer picked just randimly 0.5... or is there a reason for this number? [edit: typo] Feb 1, 2020 at 19:55
• @nutter It is not randomly chosen. Draw a line with a scale 1V to 2V. If your output can be either 1V or 2V, what truly desired value in between them that has the most error if 1V and 2V are your output choices? If you want 1.4V then you get error of 0.4V for 1V or 0.6V for 2V so you would output 1V. If you want 1.6V then error is 0.6V for 1V and 0.4V for 2V so you output 2V. In both cases the error is 0.4V if you choose correctly. If your desired value gets closer to 1V or 2V the error just decreases. But what if you want 1.5V? What is the error? What if you want 1.49V? Or 1.51V? Feb 1, 2020 at 20:08
• @Nutter What is the worst place to run out of gas if there is a gas station behind you and ahead of you? Is it closer to either gas station? Or is it exactly in the middle between two gas stations where they are both equally far from you? Feb 1, 2020 at 20:12