Tricky Circuit

Resolution and quantization

Turn a voltage into a number

ADC means Analog to Digital Converter: it maps an input voltage to a number. Resolution in bits sets how many codes exist: 2^bits. Quantization groups a continuous range into steps. The reference voltage sets the top of that range. A bit is one binary digit, either 0 or 1.

Open interactive experiment

EXPERIMENT BENCH

Change the circuit settings, predict the readings, then check a challenge. These are learning models, with the assumptions explained in each lesson.

Sign in to save progress. Guest progress stays on this device.

Open laboratory in a full window

Why it works

Ideal ADC rounds downward and clips to its code limits. No noise, input loading, sampling delay or calibration error. The sensor slider represents 0–5 V.

Step = Vref/2^bits. Code = floor(Vin/step), limited to 0…2^bits − 1. floor means round down. A smaller step distinguishes smaller voltage changes. Vin is input voltage; Vref is reference voltage.

Difficulty
  1. Build · Build it

    Power on at 8 bits, a 5 V reference and 50% sensor level. Read code 128.

    Need a hint?

    8; 5 V; 50% → 128

  2. Explore · Change one thing

    Select 10 bits, a 5 V reference and 25% sensor level. Read code 256.

    Need a hint?

    10; 5 V; 25% → 256

  3. Solve it · Solve the challenge

    Select 12 bits, a 2.5 V reference and 80% sensor level. Observe saturation at code 4095.

    Need a hint?

    12; 2.5 V; 80% → 4095

Extra reading and circuit recipes

Turn a voltage into a number

A useful pattern

An 8-bit conversion has 256 codes, numbered 0 through 255.

Beyond this model

More bits give smaller ideal steps; real noise and errors can limit useful resolution.

A useful trap to avoid

Clipping a number does not protect a physical input from too much voltage. Check real input limits.

An ideal 8-bit ADC sees exactly its reference voltage. Its code is…

  1. 256
  2. 255
  3. 128
Read more

There are 256 codes but the first is zero, so the highest is 255.

Texas Instruments