The world is analog; computers are not
Speak a single word and you push a wave of pressure through the air. A microphone feels that wave and answers with a voltage that rises and falls in exact step with it — louder sound, bigger swing; higher pitch, faster wiggle. That voltage is continuous: it exists at every instant, and between any two moments there is always another moment, with its own precise value. This is what engineers mean by an *analog* signal — a quantity that varies smoothly, like the level of water in a glass as you tilt it.
A computer cannot hold that. Its memory is a grid of switches that are each either on or off — it can only store numbers, and only a finite list of them at a time. So before any software can touch your voice, we face two unavoidable surrenders. First, we must stop pretending we know the voltage at *every* instant and instead peek at it only at chosen moments. Second, each peeked value must be rounded to one of a fixed menu of numbers the machine can actually write down. Those two acts — [[sampling|sampling]] in time and [[quantization|quantizing]] in value — are the whole bridge from the analog world into the digital one.
Following one sound: the ADC → DSP → DAC pipeline
Picture a voice memo on your phone, then the same memo played back. Between your mouth and your ear, the sound passes through three stages, and almost every digital audio gadget on Earth — earbuds, hearing aids, guitar pedals, modems — is built from this same spine.
- Capture & digitize. The microphone turns pressure into a continuous voltage, and an [[analog-to-digital-converter|analog-to-digital converter (ADC)]] samples that voltage thousands of times a second, rounding each sample to a number. Out comes a plain stream of integers.
- Process. Software — or a dedicated [[ee-dsp-processor|DSP processor]] — does arithmetic on that stream of numbers: boost the bass, cancel a hiss, compress the volume. This is the 'DSP' in *digital signal processing*: the signal is now just data, and we reshape it with math.
- Reconstruct & play. A [[digital-to-analog-converter|digital-to-analog converter (DAC)]] turns the numbers back into a stepped voltage, a gentle filter smooths the steps into a continuous wave, and that drives the speaker so your ear hears sound again.
sound ~~~ continuous voltage numbers ~~~ sound
pressure / \ | x[n] = 5, 7, 6, 2, -3, -8 ... / \
((( ))) -> | mic | -> [ADC] -> [ DSP: do math ] -> [DAC] -> | spk | -> ((( )))
\___/ sample + (filter, gain, smooth \___/
analog quantize echo, mix...) + analog
output
ANALOG | D I G I T A L ( just integers ) | ANALOGx[n]: a signal as a list of numbers
Here is the central idea the rest of this track is built on. After the ADC, the signal is no longer a curve — it is a sequence: sample number 0, then sample 1, then sample 2, marching forward in fixed steps of time. We write it x[n], read 'x of n', where n is just the integer count of which sample we mean. x[0] is the first value, x[1] the next, x[100] the hundred-and-first. This is a [[ee-discrete-time-signal|discrete-time signal]] — it has a value only at the tick marks, and asking 'what is x at n = 3.5?' is a question with no answer, because we simply never looked there.
Each step in n corresponds to a fixed slice of real time T, the *sampling period*. If T = 1/44100 of a second, then sample n happens at time n·T seconds. The flip side of T is the sample rate f = 1/T, measured in hertz: how many snapshots we grab per second. For CD-quality audio, f = 44.1 kHz — 44,100 numbers every second, per channel. That is why one minute of stereo CD audio is roughly 44100 × 60 × 2 ≈ 5.3 million samples.
voltage
^
| .--. o = the samples x[n]
| o' `o. .o. (a value at each tick)
| o' `o. o' `o
| o' `o.o `o.
--+--o----o----o----o----o----o----o---> time
| 0 1 2 3 4 5 6 = n (sample index)
| <-T-> T = 1/f (sampling period)
x[n] = { x[0], x[1], x[2], ... } = a plain list of numbers, nothing moreQuantization: rounding to a finite menu of levels
Sampling chops up time, but each captured value is still a real number with endless decimals. A computer cannot store 'endless', so the ADC also rounds every sample to the nearest rung on a fixed ladder of allowed values. The number of rungs is set by the bit depth. With b bits you get 2^b levels: 8 bits gives 256 levels, and CD audio's 16 bits gives 2^16 = 65,536 levels. The voltage range is sliced into that many equal steps, and every sample snaps to the closest one.
That snapping is never quite exact — the tiny gap between the true value and the rung you landed on is quantization error, and it shows up in the played-back sound as a faint background hiss. More bits means finer rungs, smaller error, and a quieter hiss. This is captured by the [[signal-to-noise-ratio|signal-to-noise ratio]]: roughly, each extra bit buys you about 6 dB more SNR. Sixteen bits yields around 96 dB — the gap between a whisper and a jet engine — which is why CD audio sounds clean to the human ear.
levels 3-bit example: 8 rungs (000..111)
111 |- - - - - - o - - - - - - - - - true value 5.4 --> rounds to 5
110 |- - - - o - - - o - - - - - - - true value 5.4 stored as 101
101 |- - o - - - - - - - o - - - - - |
100 |o - - - - - - - - - - o - - - - 5.4
011 |- - - - - - - - - - - - o - o - rung -> 5 .... error = 0.4
010 |- - - - - - - - - - - - - o - - (this leftover 0.4 IS the noise)
001 |- - - - - - - - - - - - - - - -
000 |________________________________> n
each sample must land on a rung; the leftover is quantization errorWhy bother? Math beats op-amps
For a century, signals were shaped purely in the analog domain: resistors, capacitors, inductors, and op-amps wired into circuits. To filter out a hum you built a physical network whose component values *were* the filter. It works beautifully — but those values drift with temperature, age, and the luck of the manufacturing line, and changing the design means rebuilding the board with a soldering iron.
Once the signal is x[n], the filter is a formula instead of a network — a few lines of code multiplying and adding samples. That brings powers analog can rarely match: it is exact and repeatable (a number never drifts), flexible (swap the filter by editing a constant, not the hardware), capable of effects with no analog counterpart (perfectly linear phase, infinite-precision echoes), and effortlessly copyable (a million phones run the identical code). The cost is the ADC and DAC at the edges, plus a budget of delay and computation. For most modern audio, communications, and sensing systems, that trade is a landslide win — which is why DSP quietly runs inside almost everything you own.
The vocabulary you'll reuse everywhere
Every later rung of this track leans on the handful of words you just met. A [[ee-discrete-time-signal|discrete-time signal]] x[n] is the object we manipulate; [[sampling|sampling]] at rate f = 1/T is how it was born; [[quantization|quantization]] at a given bit depth is why it carries a little noise; the [[analog-to-digital-converter|ADC]] and [[digital-to-analog-converter|DAC]] are the doors in and out; and [[signal-to-noise-ratio|SNR]] is the yardstick for how clean the result is. Hold onto these and the rest of DSP becomes a set of clever recipes for reshaping x[n].
From here the track builds upward: how fast you *must* sample so nothing is lost, how to add and multiply samples to build real filters, how to see a signal's hidden frequencies, and finally how a [[ee-dsp-processor|DSP processor]] crunches it all in real time. But it all starts with the quiet act you now understand — turning a wiggling voltage into a list of numbers, then trusting math to do the rest.