---
title: "Data converters: DACs and Nyquist ADCs"
heading: Quantization, linearity, and the flash, SAR and pipeline architectures
eyebrow: S2 · Lesson 42 · Data converters
xp: 50
---

::: hook
Data converters are where analog design meets everything else on a chip. A converter's resolution sets its quantization noise floor, but its real performance is set by everything this course has covered: matching sets the linearity of its DAC, kT/C sets the size of its capacitors, the comparator sets its speed and metastability, the op amp's settling sets how fast a pipeline can run, and clock jitter caps it at high frequencies. This lesson defines the measures (LSB, SNR, ENOB, INL, DNL, figures of merit) and compares the main architectures, so lesson 53's SAR converter has its context.
:::

::: play
- An N-bit quantizer's output (the staircase) and its error (dashed, scaled up by $2^N$ so it reads in LSBs), for inputs across the full scale.
- The error is a sawtooth between −½ and +½ LSB: for a busy signal it's like uniform noise of rms $\text{LSB}/\sqrt{12}$.
- Each extra bit halves the step and the error, buying 6 dB of SNR.
:::
:::

```sim plot
view: graph
x: v = 0..1
y: q = -0.6..1.1
slider: N = 2..8 step 1 = 3
plot: floor(v*2^N + 0.5)/2^N | samples: 2000 | label: quantized output
plot: (floor(v*2^N + 0.5)/2^N - v)*2^N | samples: 2000 | dashed | color: ch2 | label: error, in LSB
readout: ideal SNR for a full-scale sine, dB = 6.02*N + 1.76
```

::: predict
## A converter's measured SINAD on a full-scale sine is 68 dB. How many effective bits is that?

- [ ] 8
- [x] About 11
- [ ] 12
- [ ] 68/6 = 11.3, exactly

::: reveal
$\text{ENOB} = \frac{\text{SINAD} - 1.76}{6.02}$ = 11.0. An ideal N-bit converter's SNR is 6.02N + 1.76 dB for a full-scale sine, so the 1.76 dB has to come off before dividing. A "12-bit" converter with 68 dB SINAD behaves like an ideal 11-bit one: noise, distortion and jitter cost it a bit.
:::
:::

::: nameit
## Quantization

An N-bit converter with full scale $V_{FS}$ has an **LSB** of $V_{FS}/2^N$. Its quantization error, uniform over ±½ LSB for a busy input, has rms $\frac{\text{LSB}}{\sqrt{12}}$, so for a full-scale sine

$$\text{SNR}_\text{ideal} = 6.02N + 1.76\text{ dB}, \qquad \text{ENOB} = \frac{\text{SINAD} - 1.76}{6.02}$$

where SINAD counts noise and distortion together.

## Static linearity

- **DNL** (differential nonlinearity): each code step's width minus 1 LSB. DNL below −1 means a missing code.
- **INL** (integral nonlinearity): the transfer curve's deviation from a straight line, in LSBs.

## DACs

- **Resistor string:** $2^N$ resistors; monotonic by construction; large for many bits.
- **R-2R ladder:** few resistors; linearity depends on matching.
- **Binary-weighted current steering:** fast, but the midscale transition switches every element at once, so its DNL is worst: with unit elements of mismatch $\sigma_u$, $\sigma_\text{DNL} \approx \sigma_u\sqrt{2^N - 1}$ LSB there.
- **Unary (thermometer):** $2^N - 1$ equal elements switched one at a time, guaranteed monotonic, but needs a decoder. **Segmented** designs use unary MSBs and binary LSBs.

## Nyquist ADCs

| Architecture | Comparators | Conversion | Typical use |
|---|---|---|---|
| flash | $2^N - 1$ | one clock | 4 to 8 bits, highest speed |
| SAR | 1 | N clocks (binary search) | 8 to 18 bits, lowest power |
| pipeline | a few per stage | one stage per clock, pipelined | 10 to 16 bits, 100 MS/s to GS/s |
| integrating | 1 | $2^N$ clocks | meters, very high resolution |

A **SAR** converter samples onto a capacitor DAC and tests one bit per cycle from the MSB down, keeping each bit whose trial voltage doesn't overshoot. A **pipeline** stage resolves a few bits, subtracts them with a DAC, amplifies the residue and passes it on.

## Figures of merit

- **Walden:** $\text{FOM}_W = \frac{P}{2^\text{ENOB}f_s}$, energy per conversion step (femtojoules for good designs).
- **Schreier:** $\text{FOM}_S = \text{SNDR} + 10\log\frac{BW}{P}$, in dB, better for noise-limited designs.
:::

::: example
## A 12-bit converter has a 1 V full scale. Find its LSB, its ideal SNR, and the ENOB if its measured SINAD is 68 dB.

::: solution
1. **LSB.**
   $$\frac{1\ \text{V}}{4096} = 244\ \text{µV}$$
   with a quantization noise of 70.5 µV rms.
2. **Ideal SNR.**
   $$\begin{aligned} \text{SNR} &= 6.02 \times 12 + 1.76 \\ &= 74.0\ \text{dB} \end{aligned}$$
3. **ENOB.**
   $$\begin{aligned} \text{ENOB} &= \frac{68 - 1.76}{6.02} \\ &= 11.0 \end{aligned}$$
   The extra 6 dB of noise and distortion cost one bit.

**Answer:** an LSB of 244 µV, an ideal SNR of 74.0 dB, and 11.0 effective bits.
:::
:::

::: example
## A converter reaches 9.5 effective bits at 100 MS/s on 10 mW. What's its Walden figure of merit? And what DNL does a 10-bit binary-weighted DAC with 0.5% unit mismatch have at midscale?

::: solution
1. **Walden figure of merit.**
   $$\begin{aligned} \text{FOM}_W &= \frac{10^{-2}}{2^{9.5} \times 10^8} \\ &= 138\ \text{fJ} \end{aligned}$$
   per conversion step, a reasonable mid-range design.
2. **DAC at midscale.** The midscale code change swaps 512 units for 511, so the step error has spread
   $$0.005 \times \sqrt{1023} = 0.16\ \text{LSB}$$
3. **At 1% unit mismatch.** It would be 0.32 LSB, and 3σ parts would come close to missing codes.

**Answer:** a Walden figure of merit of 138 fJ per conversion step, and a midscale DNL spread of 0.16 LSB.
:::
:::

::: example
## How many comparators does a 6-bit flash converter need, and how many cycles does a 6-bit SAR take?

::: solution
1. **Flash.** It decides in one cycle, with
   $$2^6 - 1 = 63$$
   comparators.
2. **SAR.** One comparator, 6 cycles (plus sampling).
3. **Scaling.** Each extra bit doubles the flash's comparators but adds only one SAR cycle, which is why flash converters stop at about 8 bits.

**Answer:** the flash needs 63 comparators, and the SAR takes 6 cycles.
:::
:::

::: check
given: V = 1 | 2 | 3.3; N = 8 | 12 | 16
answer: V/2^N*1e6
unit: µV
tolerance: 0.1%

## What's the LSB of an {N}-bit converter with a {V} V full scale?

::: right
Right. $V_{FS}/2^N$ = {answer} µV.
:::

::: misses
- [any] Not yet. Divide full scale by the number of codes.
:::
:::

::: check
given: N = 6 | 10 | 14
answer: 6.02*N + 1.76
unit: dB
tolerance: 0.1%

## What's the ideal SNR of an {N}-bit converter for a full-scale sine?

::: right
Right. 6.02N + 1.76 = {answer} dB.
:::

::: misses
- [6.02*N] Add 1.76 dB: a full-scale sine's power against uniform quantization noise.
- [any] Not yet. Sine power over $\text{LSB}^2/12$.
:::
:::

::: check
given: S = 50 | 62 | 80
answer: (S - 1.76)/6.02
tolerance: 0.5%

## A converter's SINAD is {S} dB. What's its ENOB?

::: right
Right. $\frac{\text{SINAD} - 1.76}{6.02}$ = {answer} bits.
:::

::: misses
- [S/6.02] Subtract 1.76 dB first.
- [any] Not yet. Invert the ideal SNR formula.
:::
:::

::: check
given: N = 4 | 6 | 8
answer: 2^N - 1
tolerance: 0.1%

## How many comparators does an {N}-bit flash ADC need?

::: right
Right. $2^N - 1$ = {answer}.
:::

::: misses
- [2^N] One comparator per threshold: $2^N - 1$.
- [any] Not yet. Count the decision thresholds.
:::
:::

::: check
given: P = 1 | 10 | 100; E = 8 | 10 | 12; f = 10 | 100
answer: P*1e-3/(2^E*f*1e6)*1e15
unit: fJ
tolerance: 1%

## A converter uses {P} mW at {f} MS/s with an ENOB of {E}. What's its Walden figure of merit?

::: right
Right. $\frac{P}{2^\text{ENOB}f_s}$ = {answer} fJ per step.
:::

::: misses
- [any] Not yet. Power over effective steps per second.
:::
:::

::: check
given: s = 0.2 | 0.5 | 1; N = 8 | 10 | 12
answer: s/100*sqrt(2^N - 1)
tolerance: 1%

## A binary-weighted DAC has {N} bits and unit elements matched to {s}%. What's the spread of its midscale DNL, in LSB?

::: right
Right. $\sigma_u\sqrt{2^N - 1}$ = {answer} LSB.
:::

::: misses
- [s/100*sqrt(2^(N - 1))] All $2^N - 1$ elements change at midscale.
- [any] Not yet. Sum the variances of all switched units.
:::
:::

::: check
given: V = 1 | 2; N = 10 | 14
answer: V/2^N/sqrt(12)*1e6
unit: µV
tolerance: 0.5%

## What's the rms quantization noise of an {N}-bit, {V} V full-scale converter?

::: right
Right. $\frac{\text{LSB}}{\sqrt{12}}$ = {answer} µV.
:::

::: misses
- [V/2^N/2*1e6] That's the peak error; the rms of a uniform error is LSB/√12.
- [any] Not yet. Uniform error over one LSB.
:::
:::

::: check
kind: parts
given: N = 8 | 10 | 12 | 14; S = 50 | 60 | 70

## An {N}-bit converter measures {S} dB SINAD.

::: part
answer: 6.02*N + 1.76
unit: dB
tolerance: 0.5%

### What is its ideal SNR?

::: misses
- [any] $6.02N + 1.76$.
:::
:::

::: part
answer: (S - 1.76)/6.02
unit: bits
tolerance: 0.5%

### What ENOB does it reach?

::: misses
- [any] $(\text{SINAD} - 1.76)/6.02$.
:::
:::
:::

::: check
kind: derivation
vars: P = 1e-4..1, f = 1e5..1e10, E = 4..16

## A converter uses power P at sample rate f and reaches E effective bits.

::: step
answer: P/(2^E*f)

### What is its Walden figure of merit (energy per conversion step)?
:::

::: step
answer: 2*P/(2^E*f)

### What if it needed twice the power for the same performance?
:::

::: right
Right. The Walden figure prices each conversion step; state-of-the-art converters reach a few femtojoules.
:::
:::

::: explain
## Why does a binary-weighted DAC have its worst differential nonlinearity at the midscale transition?

::: model
A binary-weighted DAC builds each output from elements weighted 1, 2, 4 and so on, each made of unit elements with independent random errors. Most code steps change only a few small elements, so the step's error is small. Going from just below midscale to midscale, every element except the MSB turns off and the MSB turns on: about $2^N$ unit elements change state at once. Their errors add in variance, so the step's error grows as the square root of $2^N$, and that's where the step is most likely to be too small or too large, or even negative. Thermometer coding avoids it by turning on one equal element per step.
:::
:::

::: practice

::: check
given: V = 1.5 | 2.5; N = 10 | 14
answer: V/2^N*1e6
unit: µV
tolerance: 0.1%

## LSB: {N} bits, {V} V?

::: misses
- [any] $V_{FS}/2^N$.
:::
:::

::: check
given: S = 50 | 56 | 62 | 68 | 74 | 86 | 98
answer: (S - 1.76)/6.02
tolerance: 0.5%

## ENOB for {S} dB SINAD?

::: misses
- [any] $(S - 1.76)/6.02$.
:::
:::

::: check
given: P = 3 | 30; E = 9 | 11; f = 50 | 200
answer: P*1e-3/(2^E*f*1e6)*1e15
unit: fJ
tolerance: 1%

## Walden FOM: {P} mW, {f} MS/s, ENOB {E}?

::: misses
- [any] $P/2^\text{ENOB}f_s$.
:::
:::
:::
