# Lesson 20 Flashcards — Analog-to-Digital Conversion

Click a question to reveal the answer.

<div data-flashcards data-deck="b2l20"></div>

<details>
<summary><strong>1. Name the three stages of analog-to-digital conversion.</strong></summary>
<div class="card-answer"><p><strong>Sample</strong> (discretize in time), <strong>quantize</strong> (discretize in value), and <strong>encode</strong> (express as a binary number).</p></div>
</details>

<details>
<summary><strong>2. What is a transducer?</strong></summary>
<div class="card-answer"><p>A device converting a physical quantity into an electrical signal — a thermometer, accelerometer, or microphone, and the distance sensor you will calibrate in Lesson 22.</p></div>
</details>

<details>
<summary><strong>3. State the Nyquist criterion.</strong></summary>
<div class="card-answer"><p><span class="math notranslate nohighlight">\(f_s \geq 2f_\text{high}\)</span> — you must sample at least twice the highest frequency present; sampling exactly at the Nyquist rate counts. <span class="math notranslate nohighlight">\(2f_\text{high}\)</span> is the floor, not a target.</p></div>
</details>

<details>
<summary><strong>4. What is aliasing, and can it be fixed afterward?</strong></summary>
<div class="card-answer"><p>A high frequency masquerading as a low one because sampling was too slow. <strong>It cannot be fixed</strong> — once the samples are taken the information is gone. The only cure is filtering before sampling.</p></div>
</details>

<details>
<summary><strong>5. Where have you seen aliasing outside a circuits class?</strong></summary>
<div class="card-answer"><p>Wheels that appear to spin backward on film or video. A frame rate <em>is</em> a sampling rate, and it sits below twice the spoke frequency.</p></div>
</details>

<details>
<summary><strong>6. How many levels does a b-bit ADC have, and what is its resolution?</strong></summary>
<div class="card-answer"><p><span class="math notranslate nohighlight">\(\text{levels} = 2^b\)</span> and <span class="math notranslate nohighlight">\(\Delta V = (V_\text{max}-V_\text{min})/\text{levels}\)</span>. Objective 2.7 uses the same relation for truth-table rows, writing the exponent <span class="math notranslate nohighlight">\(n\)</span>.</p></div>
</details>

<details>
<summary><strong>7. What is quantization error, and how large can it get?</strong></summary>
<div class="card-answer"><p>The error from truncating a continuous input down onto the level below it: <span class="math notranslate nohighlight">\(QE = V_\text{in} - V_\text{quant}\)</span> with <span class="math notranslate nohighlight">\(V_\text{quant} = QL\,\Delta V + V_\text{min}\)</span>. At worst it is a full step, <span class="math notranslate nohighlight">\(QE_\text{max} = \Delta V\)</span>. Unlike noise it is permanent — the price paid for digital robustness.</p></div>
</details>

<details>
<summary><strong>8. How do you compute the digital output for a given input voltage?</strong></summary>
<div class="card-answer"><p>Expected level <span class="math notranslate nohighlight">\(EL = (V_\text{in}-V_\text{min})/\Delta V\)</span>, then quantized level <span class="math notranslate nohighlight">\(QL = \lfloor EL \rfloor\)</span> — truncate, never round. <strong>Watch a negative <span class="math notranslate nohighlight">\(V_\text{min}\)</span></strong> — forgetting it is the most common error.</p></div>
</details>

<details>
<summary><strong>9. A 12-bit ADC spans 0 to 3.3 V. What is its resolution?</strong></summary>
<div class="card-answer"><p><span class="math notranslate nohighlight">\(2^{12} = 4096\)</span> levels, so <span class="math notranslate nohighlight">\(\Delta V = 3.3/4096 = 0.806\ \text{mV}\)</span>.</p></div>
</details>

<details>
<summary><strong>10. How do you compute the memory needed for a recording?</strong></summary>
<div class="card-answer"><p><span class="math notranslate nohighlight">\(\text{bits} = b \times f_s \times t\)</span>, times the number of channels. Divide by 8 for bytes — and say which prefix you mean: <span class="math notranslate nohighlight">\(1\ \text{kB} = 1000\ \text{B}\)</span> (decimal), while the equation sheet's <span class="math notranslate nohighlight">\(1\ \text{kiB} = 2^{10}\ \text{B}\)</span> (binary).</p></div>
</details>

<details>
<summary><strong>11. An ADC spanning 0 to 5 V must hold quantization error under 10 mV. How many bits?</strong></summary>
<div class="card-answer"><p>Since <span class="math notranslate nohighlight">\(QE_\text{max} = \Delta V\)</span>, the spec is really on <span class="math notranslate nohighlight">\(\Delta V\)</span>: <span class="math notranslate nohighlight">\(2^b \geq (5-0)/0.010 = 500\)</span>, so <span class="math notranslate nohighlight">\(b = \lceil \log_2 500 \rceil = 9\)</span> bits — <strong>round up</strong>, because there is no partial bit and <span class="math notranslate nohighlight">\(b = 8\)</span> would give <span class="math notranslate nohighlight">\(\Delta V = 19.5\ \text{mV}\)</span>, worse than the spec. With 9 bits, <span class="math notranslate nohighlight">\(\Delta V = 5/512 = 9.77\ \text{mV}\)</span>.</p></div>
</details>

<details>
<summary><strong>12. What happens to an input outside the ADC's range?</strong></summary>
<div class="card-answer"><p>It <strong>saturates</strong> at the extreme code — that is clipping, and it is Objective 2.6's problem.</p></div>
</details>
