# Analog-to-Digital Converter (ADC)

> A part that reads how strong a signal is. It turns that into a number.

**Field:** Software Development  
**Category:** Embedded & IoT  
**Also known as:** ADC, Analog Input, analogRead

## Think of it like

It is like a ruler for power in a wire. It turns how much into a number.

## Definition

An analog-to-digital converter turns a smooth voltage into a number a chip can use. Many sensors, like a light sensor or a dial, give a voltage that slides up and down. A plain digital pin only sees high or low. The ADC measures how high the voltage is and gives back a whole number. More bits mean finer steps.

## Example

An Arduino Uno's ADC has 10 bits. It turns 0 to 5 volts into a number from 0 to 1023.

## Example code

```cpp
int level = analogRead(A0);  // 0 to 1023 on an Uno
```

One call reads the voltage on pin A0 and gives back a number.

## Why it matters

Most of the real world is not just on or off. The ADC lets code read heat, light and sound levels.

## Common mistake

Feeding it more volts than the board runs on. A higher voltage reads as the top number at best, and can harm the pin.

## Three principles

- **Voltage in.** A sliding signal from a sensor.
- **Number out.** A whole number code can use.
- **Bits set steps.** 10 bits gives 1,024 steps.

## Related terms

- [General-Purpose Input/Output (GPIO)](https://learn.benibix.com/term/development/gpio)
- [Pulse-Width Modulation (PWM)](https://learn.benibix.com/term/development/pulse-width-modulation)
- [Microcontroller (MCU)](https://learn.benibix.com/term/development/microcontroller)
- [Arduino](https://learn.benibix.com/term/development/arduino)

![Four rows, one per kind of pin signal. GPIO: a line that is either high or low, on or off. ADC: a knob turns a smooth voltage into a number from 0 to 1023. PWM: two square waves, one on a quarter of the time for a dim light and one on three quarters of the time for a bright one. Interrupt, lit up: a button press makes the chip stop its loop at once, run a short handler, then go back.](https://learn.benibix.com/diagrams/dev4-pin-signals.svg)

---

Source: https://learn.benibix.com/term/development/analog-to-digital-converter
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
