Wize Electricity and Magnetism Textbook > Electronics

Digital-to-Analog (DAC) and Analog-to-Digital Conversion (ADC)

ADC and DAC: Sampling, Codes, and Resolution

Two directions of conversion

An analog-to-digital converter (ADC) samples a continuously varying input at discrete times and assigns each sample to one of finitely many codes. A digital-to-analog converter (DAC) maps a code to an analog level, often followed by a reconstruction filter. Sampling and quantization are different operations: sampling limits time resolution, while quantization limits amplitude resolution.

Sampling and aliasing

For an ideally band-limited signal whose highest frequency is fmax, the Nyquist sampling condition is fs ≥ 2fmax. A component above half the sample rate can appear at an incorrect lower frequency in sampled data; that ambiguity is aliasing.


In a physical measurement, an analog low-pass anti-alias filter is placed before the ADC so energy above the usable band is attenuated.


Sampling at the theoretical boundary is a mathematical condition, not a promise that a real filter, clock, or signal is ideal.

Resolution and quantization

An ideal n-bit unipolar converter has 2n code intervals across its specified full-scale range. Under the convention used in a calculation, the nominal least significant bit (LSB) step is the range divided by 2n.


For nonsaturating inputs whose nearest quantized level is a valid code, rounding to the nearest code gives an ideal error no larger than one half LSB; endpoint clipping or saturation can have a different bound.


That bound is not a full accuracy specification: offset, gain error, nonlinearity, noise, and reference uncertainty can be larger in a real instrument.

Keep conventions visible

A DAC calculation needs its coding convention. A common ideal straight-binary model maps code k to k times the LSB step.


This model places the largest code one LSB below the nominal full-scale endpoint; some devices use a different endpoint convention. State the range, number of bits, rounding rule, and convention before comparing a computed voltage to a device data sheet.

An ideal unipolar ADC has an input range of 0 to 3.3 V and 10 bits. Using LSB = range/2n, what is its nominal LSB step?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A sensor signal is known to be ideally band-limited so that no frequency component exceeds 6.5 kHz. What is the minimum theoretical sampling rate that satisfies the Nyquist condition?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

An ideal 8-bit unipolar DAC uses the convention Vout = k(2.56 V/256), where k is the unsigned straight-binary code. What output corresponds to k = 173?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors