Skip to main content
Torqheart
← Foundations

Computer science

Bits and resolution

A computer stores a reading as an n-bit integer, so the range is cut into 2ⁿ steps. Resolution = range / 2ⁿ.

See it first

Try it

Step size against bits

00.511.5810121416Bits (bit)
range / 2ⁿ
At 12 bits
0.088
At 14 bits
0.022
Every extra bit halves the step.

One step at a time

Step by step

Bits and resolution

Step 1 of 5

Know the range

An encoder measures one turn, 360°.

In words

A 12-bit ADC cuts its voltage range into 4,096 steps; a 14-bit encoder cuts a turn into 16,384. Anything between steps is rounded: quantization.

One more bit doubles the resolution, but real accuracy still depends on noise: if the noise is bigger than a step, the last bits are just random (see averaging).

The formula

resolution = range / 2ⁿ

Where you meet this in a robot

The ESP32 reads analogue sensors with a 12-bit ADC; robot joint angles usually come from 12- to 17-bit encoders.