Part one: Electrons · Day 10 of 60
Signals in the real world: analog, digital and radio
The world is continuous and chips deal in numbers. Today you learn how a voltage becomes a stream of bits, how often you must measure and what noise costs, and how information rides on a radio wave.
By the end of today you can
- Explain sampling, the Nyquist limit and aliasing
- Work out a data rate from sample rate and bit depth, and read a figure in decibels
- Relate a radio frequency to its wavelength, its antenna and how much data it can carry
The number on every music file
A compact disc holds 44,100 measurements of the sound for every second of music. The number looks arbitrary, and part of it is.
One part is a theorem. People hear up to about 20,000 hertz, and to capture a frequency you must measure more than twice as often as it cycles. That demands more than 40,000 measurements a second. The other part is a tape machine. In the late 1970s the only recorders fast enough to store digital audio were video recorders, and 44,100 was a rate that fit neatly into the line structure of both American and European television.
A theorem and a tape machine: that is typical of how real signals get turned into numbers. Today covers the theorem, the numbers and the radio waves that carry them.
Analog and digital
The physical world is analog. Sound pressure, temperature, light and radio waves vary smoothly and can take any value. A sensor turns one of them into a voltage that varies the same way.
A computer wants digital data: a list of numbers. The chip that converts a voltage into numbers is an analog-to-digital converter, or ADC. Its opposite, a DAC, turns numbers back into a voltage. Every microphone, camera, radio and thermometer connected to a computer has an ADC behind it.
Conversion means two decisions: how often to measure, and how finely.
How often: sampling
Each measurement is a sample, and the number of them per second is the sampling rate.
A 1 kilohertz tone sampled 8,000 times a second
The rule comes from Harry Nyquist in 1928 and was proved by Claude Shannon in 1949. If you sample at more than twice the highest frequency in a signal, you lose nothing. Half the sampling rate is called the Nyquist limit. It is the highest frequency a given rate can hold.
| Use | Sampling rate | Highest frequency kept |
|---|---|---|
| Telephone voice | 8,000 a second | 4 kHz |
| Compact disc | 44,100 a second | 22 kHz |
| Video and studio audio | 48,000 a second | 24 kHz |
Break the rule and something worse than a loss happens.
A 7 kilohertz tone sampled 8,000 times a second
A frequency above the limit does not vanish. It shows up as a lower frequency that was never there, and once sampled it cannot be told apart from a real one. This is aliasing. You have seen it in films, when a wagon wheel appears to turn slowly backward because the camera's frame rate is too low for the spokes.
The cure is yesterday's low-pass filter. Every ADC has one in front of it to remove anything above the limit before it is sampled.
How finely: quantization
Each sample must be stored as a number with a fixed count of bits, so it is rounded to the nearest of a fixed set of levels. That rounding is quantization, and the number of bits is the bit depth.
A wave rounded to 3 bits
With n bits there are 2 to the power n levels. The rounding error behaves like a faint hiss added to the signal. Each extra bit halves it.
| Bits | Levels | Example |
|---|---|---|
| 8 | 256 | Old video games, basic sensors |
| 10 | 1,024 | The converter on an Arduino Uno: steps of about 5 millivolts over 5 volts |
| 12 | 4,096 | Most microcontrollers |
| 16 | 65,536 | Compact disc audio |
| 24 | 16.8 million | Studio audio, precision instruments |
Decibels
Signal engineers compare powers on a scale of ratios, the decibel, written dB. It turns multiplication into addition, which is convenient when a signal passes through many stages.
| Decibels | Power ratio |
|---|---|
| 3 dB | about 2 times |
| 10 dB | 10 times |
| 20 dB | 100 times |
| 30 dB | 1,000 times |
| −3 dB | half |
The signal-to-noise ratio, or SNR, is how much stronger the signal is than the noise beneath it. Each bit of depth adds about 6 decibels, so 16-bit audio has a ratio near 98.
The limit on any channel
Every wire, fiber and radio link has noise in it, from the random motion of electrons if nothing else. In 1948 Shannon showed that this sets an exact ceiling on how many bits a second any channel can carry without error.
No cleverness beats this number. It leaves three ways to send more. Use more bandwidth. Raise the signal or lower the noise, which helps only slowly because of the logarithm. Or create more separate channels, for instance with several antennas. Every new generation of wireless is some mixture of the three.
Radio
An alternating current in a wire sends out an electromagnetic wave, a ripple of electric and magnetic fields that travels at the speed of light. Light itself is the same thing at a far higher frequency.
An antenna works best when its length is about a quarter of the wavelength. That one fact sets the size of everything in radio.
| Signal | Frequency | Wavelength | Quarter-wave antenna |
|---|---|---|---|
| AM radio | 1 MHz | 300 m | 75 m |
| FM radio | 100 MHz | 3 m | 75 cm |
| GPS | 1.575 GHz | 19 cm | 4.8 cm |
| Wi-Fi and Bluetooth | 2.4 GHz | 12.5 cm | 3.1 cm |
| Satellite internet | about 12 GHz | 2.5 cm | 6 mm |
| 5G millimeter wave | 28 GHz | 1.1 cm | 2.7 mm |
Frequency is a trade. Low frequencies bend around hills and pass through walls, and they need large antennas and offer little bandwidth. High frequencies have bandwidth to spare and fit many antennas in a small space, but walls, leaves and rain stop them. Phones live in the middle, from about 600 megahertz to 6 gigahertz, because that range passes through buildings and still fits in a pocket.
To carry information, a transmitter starts with a steady wave at one frequency, the carrier, and varies it. Changing its strength is AM. Changing its frequency is FM. Modern systems vary strength and timing together, in a scheme that packs 8 or 10 bits into each change. All of these are modulation.
The range of usable frequencies is the spectrum, and it is finite. Two transmitters on the same frequency in the same place interfere, so governments divide the spectrum into bands and license them. Licenses are sold at auction. In early 2021 American carriers bid more than $80.9 billion for 280 megahertz of spectrum between 3.7 and 3.98 gigahertz.
Optical fiber is the far end of the scale. The light in it has a frequency near 193 trillion hertz, which leaves room for enormous bandwidth, and the glass is clear enough that 1% of the light is still there after 100 kilometers. That is why all long-distance data travels as light.
Playground · 10 minutes
Sample a signal, size an antenna
Part one samples a tone and shows what the numbers describe. Part two turns a radio frequency into a wavelength and an antenna.
Try these
Scenario · 2 decisions
What would you do?
This case is invented. A startup sells a vibration sensor that clamps onto factory motors to catch failing bearings. The brochure says it "captures faults up to 20 kilohertz." The specification sheet says its converter samples 25,000 times a second at 12 bits.
Quiz · 5 questions
Check what stayed
Bench work · 30 minutes
Take it to the bench
Things to measure, take apart, look up or work out by hand. No equipment is needed unless a prompt says so. Your notes are saved in this browser and collected on the Lab notes page.
Words to keep
- Analog signal
- A quantity that varies smoothly and can take any value.
- Digital signal
- A signal represented as a sequence of numbers.
- Analog-to-digital converter
- A chip that measures a voltage and reports it as a number, shortened to ADC.
- Sampling rate
- How many times a second a signal is measured.
- Nyquist limit
- Half the sampling rate, the highest frequency that rate can represent.
- Aliasing
- A frequency above the Nyquist limit appearing as a false lower frequency.
- Quantization
- Rounding each sample to one of a fixed set of levels.
- Bit depth
- The number of bits used to store each sample.
- Signal-to-noise ratio
- How much stronger a signal is than the noise accompanying it, usually given in decibels.
- Decibel
- A unit for ratios of power. Ten decibels is a factor of ten.
- Bandwidth
- The range of frequencies a channel passes, in hertz.
- Shannon limit
- The highest error-free data rate a channel can carry, set by its bandwidth and signal-to-noise ratio.
- Electromagnetic wave
- A traveling ripple of electric and magnetic fields. Radio and light are both examples.
- Wavelength
- The distance a wave travels in one cycle.
- Antenna
- A conductor shaped to turn an electrical signal into a radio wave, or the reverse.
- Carrier
- The steady wave that a transmitter varies in order to carry information.
- Modulation
- Varying a carrier's strength, frequency or timing to encode data.
- Spectrum
- The range of radio frequencies, divided into bands and licensed by governments.
Watch, read and build
- Watch: Monty Montgomery of Xiph.Org, "Digital Show & Tell". Sampling and quantization demonstrated on real equipment, with the common myths taken apart.
- Read: A Mind at Play by Jimmy Soni and Rob Goodman. A biography of Claude Shannon.
- Read: Claude Shannon, "A Mathematical Theory of Communication" (1948). The first few pages can be read without the mathematics.
- Try: A software-defined radio receiver that plugs into a USB port, with free software. You can see the spectrum around you, band by band.
Sources for dated facts checked November 2026
- Telecompetitor: the C-band spectrum auction January 15, 2021. More than $80.9 billion in gross bids for 280 megahertz between 3.7 and 3.98 GHz.