Analog vs Digital Signals
11 min read
Quick Answer
An analog signal varies continuously and can take any value within its range. A digital signal is interpreted as one of a small number of discrete levels, usually two. Analog represents the world directly; digital trades exactness for immunity to noise, and for the ability to be copied without loss.
Intuition
A ramp and a staircase
Picture a ramp and a staircase rising to the same landing. The ramp lets you stop at any height you like, including heights you could not describe without a very long decimal. The staircase gives you a fixed set of places to stand, but you always know exactly which step you are on, and so does everyone else.
Electrical signals come in both shapes. An analog signal is the ramp: a voltage that varies smoothly, taking any value in between. The output of a microphone is analog, and so is the voltage from a temperature sensor or a light meter. The signal is a copy of the thing it represents, drawn in volts instead of sound or heat.
A digital signal is the staircase, and usually one with just two steps: low and high, 0 and 1. A voltage that lands between them is not read as some third thing. The circuit reading it does not ask "how many volts?" but "which side of the line?".
Losing all those in-between values is a real cost, and what it buys is tolerance of noise. Every wire adds some, and every copy of an analog signal comes out slightly worse than the one before — the reason a cassette copied five times sounds terrible. A digital signal degraded a little is still unambiguously a 0 or a 1, so the next stage can rebuild it perfectly. Copy it a thousand times and the thousandth is identical to the first.
That single property is why almost everything is digital now. The world itself is stubbornly analog, though: sound, light, temperature and force arrive as continuous quantities. Real systems are therefore both — an analog front end that senses the world, a converter, digital processing, and often a converter back the other way to drive a speaker or a motor.
Practitioner
Where the staircase gets its steps
Turning an analog voltage into a number is called conversion. Quantisation decides how finely the voltage axis is divided, sampling decides how often a reading is taken, and neither choice constrains the other. Information lost at either step is lost for good.
Quantisation is described by the size of one step — one least significant bit. Divide the converter's full-scale range by the number of steps it offers:
A converter with N bits provides 2 to the power N steps, so each extra bit halves the step. Datasheets quote the bit count, but whether a converter is good enough for a job depends on the step size that bit count works out to.
Worked example — How fine is a 12-bit converter?
A microcontroller's converter runs from a 3.3 V reference and has twelve bits, giving 4096 steps.
Dividing the range by the step count gives the size of one step: 806 µV. An input change smaller than that produces no change in the number at all, and every reading already carries that much uncertainty before noise is considered.
Underneath, a digital signal is still an analog voltage. A logic 1 is a voltage inside a band that the receiving circuit agrees to call high, and a logic 0 is a voltage inside a lower band. The gap between the bands is the noise margin, and everything digital depends on that gap staying open — see logic levels. Push a digital signal too far and it stops behaving digitally, which is why long cables, fast edges and weak drivers cause faults that look like software problems.
The component sitting on the boundary between the two worlds is the comparator. It takes an analog input, compares it against a threshold, and produces a clean digital output — one bit of conversion. Converter design builds outward from that single bit, and comparators and ADCs and DACs take it further.
Accuracy belongs to neither side by default. A digital number is exact as a number, but its relationship to the original voltage is only as good as the reference, the converter's linearity and the noise on the input. A well-designed analog signal path can carry more real information than a poorly designed digital one. What digital has going for it is that the signal stops degrading once the conversion is done.
Engineer
What each axis costs
Resolution is the choice made on the voltage axis. Dividing the same full-scale range more finely resolves smaller changes, at the cost of speed, power, price and — beyond a point — noise that swamps the extra bits.
Worked example — The same input at three resolutions
Keep the 3.3 V range and change only the number of steps.
Eight bits gives 256 steps, so one step is 12.9 mV. Twelve bits divides the same range into 4096 steps, at 806 µV each. Sixteen bits gives 65536 steps of 50 µV.
Each extra bit halves the step, so the improvement from eight to sixteen bits is a factor of two hundred and fifty-six. Whether that is useful depends on whether the signal reaching the converter is that quiet — a step of tens of microvolts is meaningless on a signal carrying a millivolt of noise.
Quantisation error is bounded by half a step and, for a busy signal, behaves like added noise. Each additional bit improves the ideal signal-to-noise ratio by roughly six decibels, which is the usual way converter resolution is compared with the analog noise floor it has to beat. Once one step falls below the input's own noise, extra bits buy nothing but data volume — the reason datasheets quote an effective number of bits alongside the nominal one.
Sampling settles the time axis, and the limit it imposes is absolute. A sampled signal can only represent frequencies below half the sampling rate. Components above that limit do not disappear; they reappear inside the band as false low-frequency content that no later processing can remove. That is aliasing, and the only defence is an analog filter ahead of the converter.
At a sample rate of 44.1 kHz, half the rate is 22.05 kHz — which is where the familiar audio sampling rate comes from, sitting just above the upper limit of human hearing with a little room for the filter to roll off in. That filter has to be analog and it has to be there, because by the time the signal is sampled the damage is already done. Low-pass filters covers the analog side.
The Layer 1 picture needs a correction here. "Digital is immune to noise" holds only within the margin. A digital receiver restores a degraded signal perfectly right up to the point where noise crosses the threshold, and then fails completely rather than gracefully. Analog degrades steadily; digital holds and then falls off a cliff. Systems that must fail gently — some instrumentation, some safety interlocks — sometimes stay analog for that reason.
Timing carries noise of its own. Uncertainty in when a sample is taken becomes an error in what value is captured, and the faster the signal is moving, the bigger that error. Clock jitter is irrelevant on a slow sensor and can dominate everything else on a fast waveform.
Professional
Where the engineering actually is
The hard part of a digital system is its analog edges. Processing bits is nearly free; getting a clean, correctly scaled, correctly filtered voltage into the converter is not. Sensor conditioning, reference stability, input protection, filter design and grounding are what decide the accuracy of a measurement chain, and every one of them is an analog problem. A datasheet that leads on resolution is describing the easier half of the work.
Everything a converter reports is measured as a fraction of its reference, so the reference sets a ceiling on the whole instrument. Drift with temperature and time appears directly as gain error in every reading. A sixteen-bit converter fed by a casual reference delivers eight bits of trustworthy result, and it does so silently, with no indication that anything is wrong.
Mixed-signal performance is usually decided by the grounding. Digital switching currents returning through shared copper appear as noise on the analog ground that the converter uses as its zero, and the classic symptom is a reading that changes when unrelated software runs. The remedies are layout work rather than schematic work: plan the return paths deliberately, keep switching returns away from sensitive references, and decouple close to the pins.
Digital is cheaper wherever the processing is complicated, because complexity is nearly free in software and expensive in analog components. It is not cheaper by default. For a single threshold, a single gain stage or a single filter, the analog part is smaller, faster and cheaper than a converter plus a processor, and the crossover moves with volume and with what else the processor is already doing.
Conversion also costs time. Sampling, filtering and processing each add delay, so a control loop closed in software carries a phase lag that an analog loop does not, and above some bandwidth that lag makes the loop unstable. Motor current loops, switching-supply compensation and audio effects with strict timing all still have analog implementations for that reason.
The two sides fail in different ways as well. An analog fault usually shows as drift, distortion or a wandering offset, which is visible and often diagnosable with an oscilloscope. A digital fault shows as a wrong value, a stuck bit or nothing at all, and it may be intermittent in a way that correlates with temperature or with a cable being moved. Working out which world a symptom belongs to is most of the job in a mixed-signal fault.
Under both approaches sits a noise floor that neither escapes. Every resistor and every semiconductor generates noise, so no signal path is arbitrarily quiet and no converter can resolve below what reaches it — noise basics sets out where it comes from. A resolution chosen above that floor is a datasheet number rather than a real improvement in the measurement.
Common mistakes
- Treating a digital signal as immune to noise — it is immune only within the noise margin, and then it fails abruptly rather than gradually.
- Quoting bits instead of step size — the useful question is how many volts one step is, and whether that is smaller than the change you need to detect.
- Buying resolution the signal cannot use — extra bits below the input's own noise floor add data, not information. Check the effective number of bits, not the nominal one.
- Expecting software to remove aliasing — content above half the sample rate folds into the band before conversion and is indistinguishable from real signal afterwards. The anti-alias filter is analog and mandatory.
- Ignoring the reference — every reading is a fraction of the reference, so reference drift appears as an error in all of them, invisibly.
- Sharing return paths between digital and analog sections — switching return currents show up as noise on the converter's zero, and the symptom looks like a software bug.
Frequently asked questions
What is the difference between analog and digital signals?
An analog signal varies continuously and can take any value in its range. A digital signal is interpreted as one of a small set of discrete levels, typically two, with everything between the bands treated as invalid.
Why is digital more resistant to noise?
Because the receiver only has to decide which side of a threshold the signal is on. Noise smaller than the margin between levels is discarded entirely, so the signal can be regenerated exactly.
What does the bit count of an ADC tell you?
How many steps it divides its full-scale range into: N bits gives 2 to the power N steps. Divide the range by that number to get the voltage represented by one step, which is the figure that matters.
What is aliasing?
Content above half the sampling rate appearing as false low-frequency content after sampling. It cannot be removed later, so it must be filtered out with an analog filter before the converter.
Is a digital signal really digital?
Not at the wire. It is an analog voltage that circuits agree to interpret as one of two states. Push the edges, the cable length or the drive strength too far and it stops being interpretable.