Question 1 of 5: 8-bit Analog-to-Digital Conversion — Resolution, Codes and Quantisation Error
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Notes on this paper
Paper format. National Exams May 2019, 16-Elec-B5 Advanced
Electronics — 3 hours, CLOSED BOOK, one approved Casio or Sharp calculator. Five
questions, all to be answered, 20 marks each (100 marks total). In schematics ground
and chassis are common; op-amps are ideal and supply rails are ±15 V unless stated
otherwise. Candidates are told to state any interpretive assumption inside the answer, and to
supply block diagrams and schematics wherever an essay-format response needs them.
Reference texts. A. S. Sedra and K. C. Smith,
Microelectronic Circuits, 8th ed. (Ch. 7 transistor amplifiers, Ch. 8 differential and
multistage amplifiers, Ch. 10 frequency response, Ch. 11 feedback, Ch. 12 output stages and
power amplifiers); B. Razavi, Design of Analog CMOS Integrated Circuits, 2nd ed.
(Ch. 2 MOS device models, Ch. 4 differential amplifiers, Ch. 5 current mirrors) and
Fundamentals of Microelectronics, 2nd ed.; R. C. Jaeger and T. N. Blalock,
Microelectronic Circuit Design, 5th ed. (Ch. 17 low-frequency response); P. R. Gray,
P. J. Hurst, S. H. Lewis and R. G. Meyer, Analysis and Design of Analog Integrated
Circuits, 5th ed. (Ch. 4 current mirrors, Ch. 8 feedback); R. J. Baker,
CMOS: Circuit Design, Layout, and Simulation, 4th ed. (Ch. 20 current mirrors);
Analog Devices, Data Conversion Handbook, W. Kester (ed.), Ch. 2 (quantisation).
How each answer is laid out. Every question states its data,
the quantity sought, the circuit as drawn on the paper, a one-line strategy, then numbered
steps carrying the governing relation, the substitution and the intermediate result. Boxed
values are the answers a marker looks for, and each question closes with a results table and a
concept note.
Find. (a) the volt-per-code step size, (b) and (c) the output words
produced by two specific inputs, (d) the quantisation error committed on the 6.200 V sample
expressed three ways, and (e) the worst quantisation error the converter can ever make,
referred to full scale.
Transfer characteristic of the ideal 8-bit truncating quantiser, zoomed on codes 155 to 158. Each tread is one LSB (39.0625 mV) wide. The 6.200 V sample falls part way along the code-158 tread, and the horizontal gap back to the start of that tread is the quantisation error carried in part (d).
Approach. Fix the LSB from the range and the word length, convert
each sample by dividing by the LSB and taking the integer part, then read the error as the
distance from the sample back to the level the code represents.
Part (a) — divide the span by the number of codes. An
n-bit converter partitions the full-scale range into $2^{n}$ equal steps, so the
resolution, or one least significant bit, is
$$Q = \text{LSB} = \frac{FSR}{2^{n}} = \frac{10\ \text{V}}{2^{8}} = \frac{10}{256}$$
which evaluates to $\boxed{Q = 39.0625\ \text{mV} = 0.0390625\ \text{V}}$. This is the
number a data-sheet quotes as the resolution, and every later part of this question is
arithmetic on it.
Note the competing convention, and why it does not change the answers.
Some texts divide by $2^{n}-1$ instead of $2^{n}$, on the grounds that 255 steps separate
the 256 code centres; that gives $10/255 = 39.216$ mV. The difference is one part in 256,
which is far too small to move either of the codes found below, so the answers are robust
to the choice. The $FSR/2^{n}$ form is used throughout because it is the one implied by a
converter whose transfer function runs from 0 to $FSR - 1\,\text{LSB}$.
Part (b) — convert 6.000 V by dividing and truncating. An ideal
converter outputs the largest code whose level does not exceed the input, so
$$N_{1} = \left\lfloor \frac{v_{1}}{Q} \right\rfloor
= \left\lfloor \frac{6.000}{0.0390625} \right\rfloor = \lfloor 153.6 \rfloor = 153$$
and 153 in eight bits is $\boxed{N_{1} = 153_{10} = 1001\,1001_{2} = \text{99}_{16}}$. The
level that word stands for is $153 \times 0.0390625 = 5.9766$ V, so this sample is already
carrying an error of 23.4 mV even though it is a whole number of volts.
Part (c) — repeat for 6.200 V. The same division gives
$$N_{2} = \left\lfloor \frac{6.200}{0.0390625} \right\rfloor
= \lfloor 158.72 \rfloor = 158$$
so the converter returns $\boxed{N_{2} = 158_{10} = 1001\,1110_{2} = \text{9E}_{16}}$. Note
that a 200 mV increase in the input moved the code by five counts, consistent with
$200/39.0625 = 5.12$ — a useful arithmetic check before going on.
Part (d) — the error is the distance back to the code level. The
word 158 represents the voltage $N_{2}Q = 158 \times 0.0390625 = 6.171875$ V, so the
quantisation error committed on this sample is
$$\varepsilon = v_{2} - N_{2}Q = 6.200 - 6.171875 = 0.028125\ \text{V}$$
that is, $\boxed{\varepsilon = 28.125\ \text{mV}}$, which is $0.028125/0.0390625 = 0.72$ of
one LSB. It is positive because a truncating converter always rounds down.
Express the same error against the two references the question names.
Referred to the reading itself, and then to the full-scale range,
$$\begin{aligned}
\frac{\varepsilon}{v_{2}} &= \frac{0.028125}{6.200} = 0.004536 \\[2pt]
\frac{\varepsilon}{FSR} &= \frac{0.028125}{10} = 0.0028125
\end{aligned}$$
so the error is
$$\boxed{0.454\ \text{percent of the input, and } 0.281\ \text{percent of full scale}}$$
The two differ because the sample sits at 62 percent of full scale; the
percent-of-reading figure would grow without limit as the input approached zero, which is
exactly why converter accuracy is always specified against full scale.
Part (e) — bound the error over the whole input range. For a
truncating quantiser the input may sit anywhere on a tread, so the error runs from zero up
to (but never reaching) one full LSB. The largest possible value is therefore
$$\frac{\varepsilon_{max}}{FSR} = \frac{Q}{FSR} = \frac{1}{2^{n}} = \frac{1}{256}$$
giving $\boxed{\varepsilon_{max} = 1\ \text{LSB} = 0.391\ \text{ percent of full scale}}$.
State the rounding variant, because most real converters use it. If the
comparator thresholds are offset by half a step so that the converter rounds to the nearest
level rather than truncating, the error becomes symmetric on $\pm Q/2$ and the worst case
halves to $0.5\,\text{LSB} = 0.195$ percent of full scale. Since the question gives no
offset, the truncating figure is the answer, but a candidate who states both is showing
exactly the understanding the examiner is testing.