The noise a computer makes.
On the evening of April 16, 1975, a club for computer hobbyists met at a school near San Francisco. The club was six weeks old. One of its members, Steve Dompier, had brought an Altair 8800, a computer that had gone on sale that year as a kit. It had no keyboard and no screen. A program went in through a row of switches on the front, eight bits at a time, and the only thing that came out was the glow of a row of small red lights.
Dompier spent several minutes flipping switches. Then he set a portable radio on top of the Altair and started his program. Out of the radio, in a rough buzzing voice, came the Beatles' "The Fool on the Hill," and after it "Daisy Bell," the old song about a bicycle built for two. The room gave him a standing ovation.
No wire ran between the radio and the computer. Dompier had noticed that the radio buzzed whenever the Altair was running, and that the pitch of the buzz depended on what the program was doing at that moment. So he had written a program with no purpose except to keep the machine busy in the right ways, for the right lengths of time, until the buzzes added up to a tune.
The Altair had been broadcasting all along, and every computer built since has done the same. This chapter is about where that noise comes from, what it costs to keep in, and what it has to do with how fast a wire can carry bits.
Every edge is a small broadcast
Every electric current is wrapped in a magnetic field, the same invisible influence that surrounds a magnet. Around a wire carrying a steady current that field sits still, like the water around a boat at anchor, and the wire is silent. Change the current, and the field has to rearrange itself, and the news of that rearrangement travels outward at the speed of light. That traveling disturbance is a radio wave. A transmitter is a circuit built to make such changes on purpose, in an antenna shaped to launch them well. A computer makes billions of changes a second for reasons of its own, in wires that make poor antennas. Poor antennas still radiate a little, and a little is a great deal to a sensitive radio.
How much gets out depends on how sudden each change is. Close a door gently and nobody in the house notices. Slam it, and the same door, swinging through the same arc, is heard in every room. The slam packs the motion into a shorter time, and it is the suddenness that carries. The edges of a digital signal are slams by design. Chapter 26 wanted them quick, so that a wire spends as little time as it can on the way between a zero and a one.
To put numbers on suddenness, it helps to know what a square wave is made of. Chapter 8 introduced Joseph Fourier, the French mathematician who showed two centuries ago that any signal can be built by adding pure tones together. For a shape that repeats, his recipe is a tidy one. The pure tones are the plain, smooth waves that a tuning fork makes, which are called sine waves. One of them repeats at the rate of the shape itself, and the others at two, three, four times that rate and so on. The faster ones are called harmonics. Chapter 15 met them coming out of an amplifier that was pressed too hard, and in music they go by the name of overtones.
A square wave that spends equal time high and low needs only the odd ones: the first at full strength, the third at one third of that, the fifth at one fifth, and on up without end. Build one below, a sine wave at a time, and watch what happens to the corners.
Two things are worth noticing. The first is that the broad shape of the wave is settled by the first two or three sine waves, and all the others are there for the corners. The second is that each one added makes the edge a little steeper and takes the highest frequency in the signal a little higher. Sharpness and high frequency are one thing described two ways. Press the button with one sine wave and again with fifteen, and you can hear the edges arrive as the plain hum turns into a buzz.
Engineers carry this around as a rule of thumb. Divide one by the time an edge takes, and take a third of the answer. Up to about that frequency the harmonics stay strong, and above it they fade quickly. An edge that takes a billionth of a second keeps its harmonics strong up to about 320 million cycles a second. An edge of a tenth of that, which is ordinary in a modern machine, carries them past three billion.
The rate of the clock appears nowhere in that rule. A slow clock with sharp edges reaches just as far up the dial as a fast one. It makes fewer edges each second, so each harmonic is weaker, and they sit closer together. So a computer whose clock ticks a hundred million times a second is also a transmitter on 300 MHz, which means 300 million cycles a second, and on 500, on 700, and on every other odd multiple, up through the frequencies used by television, mobile phones, GPS and WiFi.
#include <math.h>
#define PI 3.14159265358979323846
/* sin(x) / x, which is 1 when x is 0 */
static double sinc(double x) { return x == 0.0 ? 1.0 : sin(x) / x; }
/* Strength of harmonic n of a clock that swings from 0 to 1, is high
for `duty` of each cycle and spends `rise` of each cycle on every edge. */
double harmonic(int n, double duty, double rise) {
return 2.0 * duty * fabs(sinc(PI * n * duty) * sinc(PI * n * rise));
}
/* The harmonics stay strong up to about this frequency, in hertz. */
double strong_up_to(double edge_seconds) {
return 1.0 / (PI * edge_seconds);
}import numpy as np
def harmonic(n, duty, rise):
"""Strength of harmonic n of a clock that swings from 0 to 1, is high
for `duty` of each cycle and spends `rise` of each cycle on every edge."""
return 2 * duty * abs(np.sinc(n * duty) * np.sinc(n * rise)) # np.sinc(x) is sin(pi x) / (pi x)
def strong_up_to(edge_seconds):
"""The harmonics stay strong up to about this frequency, in hertz."""
return 1 / (np.pi * edge_seconds)One thing is still missing, because harmonics that stay on the board do no harm. Something has to act as an antenna. The first candidate is the trace itself, the thin strip of copper that carries the signal across the board, together with the path its current takes on the way back to where it started. Between them the two enclose a loop, and a loop of wire is an antenna. A small loop is a feeble antenna, and it favors high frequencies strongly. Raise the frequency ten times and the same loop radiates a field a hundred times as strong. So the highest harmonics, faint as they are, are the ones that escape best.
The second candidate is every cable plugged into the box. A cable a yard long is a far better antenna than anything on the board, and it takes astonishingly little to feed it. About five millionths of an ampere of stray current along a cable of that length is enough to put a computer over the legal limit.
A limit of a few billionths of a watt
Radio works only because the air is kept quiet. Chapter 11 found a phone picking up the GPS satellites at -130 dBm, which is a tenth of a millionth of a billionth of a watt. A receiver that sensitive is easily drowned out by a noisy neighbor, so every country limits what electronic equipment may radiate.
In the United States the rule is Part 15 of the regulations of the Federal Communications Commission, and for a computer sold for use in a home it reads like this. Set an antenna three meters from the machine, which is about ten feet. Between 30 and 88 MHz the field at the antenna may be no stronger than 100 millionths of a volt per meter. The limit rises in three steps, to 500 millionths above 960 MHz.
Those are small numbers. A transmitter that radiated equally in all directions would produce the first of them with a power of three billionths of a watt. A mobile phone at full power sends out one watt, which is about three hundred million times as much.
The rules took effect for home computers on the first day of 1981, and they claimed a famous casualty. Radio Shack's TRS-80 Model I had been on sale since 1977 and was one of the best-selling computers of its day. It was also well known for the interference it put into any radio or television nearby. Radio Shack stopped selling it on the day the rules came into force.
The antenna feeds an instrument called a spectrum analyzer, which is a radio receiver that tunes itself steadily across the dial and draws how much it hears at each frequency. It makes the same kind of picture as the fixed-slice chart of chapter 9, with frequency where that chart had pitch. A single harmonic that pokes above the line fails the machine.
Three ways to be quiet
There are three honest ways to get under the line, and each is paid for in a different coin.
The first is to slow the edges, which is closing the door gently. The circuit that pushes a signal onto a trace is called a driver. A driver built to switch gradually, or a small resistor between the driver and the trace, stretches each edge, and by the rule of thumb the upper harmonics fade. It costs almost nothing in parts. What it costs is time. An edge still has to fit inside the time allowed for one bit, with room left over for the receiver to read it.
The second is to keep the noise in. Shrink the antenna, by running every trace over a solid sheet of copper as in the figure above. Send the fast signals on pairs, as chapter 27 described, so that the fields of the two wires cancel. Put the whole board in a metal box. Clamp a ring of ferrite, which is a magnetic ceramic, around each cable, where it resists just the kind of current that rides out along all of a cable's wires together. This is the brute-force road, and the price is copper, weight and money.
A box also needs holes, for air and for connectors, and every hole is a leak. The door of a microwave oven shows how large a hole can safely be. Its metal screen is full of holes that light passes through freely, because the waves of light are far smaller than the holes, while the waves that do the cooking are nearly five inches long and cannot fit through. A computer case has many small holes, and no large ones, for the same reason.
The third is to spread the noise out. The test receiver, like every radio, listens to one narrow slice of the dial at a time. So the clock is made to wobble: its rate is swept down by half a percent and back up, about thirty thousand times a second, the way a singer's vibrato wavers around a note. Every harmonic is smeared across a stretch of the dial much wider than the slice the receiver listens to, and no single slice holds much of it.
The total noise is exactly what it was. It has been spread like a pat of butter over a larger piece of toast, and the reading at any one spot falls, often to a quarter of what it was or less. The fast lanes of chapter 27 are built to work this way. The price is paid in timing. The receiver's clock now has to follow a moving target, and every part of the machine that shares the clock has to put up with the wobble.
The drawing below puts a single trace on the test range. It is two inches long, it runs a little less than a tenth of an inch from its return path, and it carries a hundredth of an ampere. The signal on it is the busiest one possible, a line of ones and zeros in turn. Each step of a signal like this is called a symbol, and for now each symbol carries one bit.
There are two charts, one above the other, and they share the dial that runs between them. The upper chart shows what is in the trace, which is to say how strong the current is at each frequency. The lower chart shows what the analyzer makes of it three meters away, with the legal limit drawn across it. The difference between the two is the loop, which favors the high frequencies, so harmonics that are faint in the trace stand tall at the antenna. The ragged line along the bottom is the receiver's own hiss, the floor that chapter 11 measured. The strip underneath shows who else is using each part of the dial.
Beside the charts is the eye at the far end of the same trace, and under the eye the strongest reading on the chart is drawn again, large. Begin by slowing the edges until every harmonic is under the line. Then raise the number of symbols sent each second, and see how long both pictures can be kept healthy.
the same trace, at its far end
The scale up the side of the lower chart is the strength of the field in decibels, where 0 is one millionth of a volt per meter and every 20 is ten times as strong. The upper chart counts down in the same steps from the full swing of the current in the trace. With the clock wobbling, a small dash marks where each harmonic stood before.
At a hundred million symbols a second there is room for everything. An edge of one or two billionths of a second brings every harmonic under the line, and the eye hardly notices, because each symbol lasts ten. Now raise the rate. The symbols get shorter, the same gentle edge takes up more and more of each one, and the eye begins to close. Sharpen the edges to rescue it, and the harmonics climb back over the line. Near 350 million symbols a second the two demands meet, and any edge gentle enough for the neighbors is too slow for the receiver.
Past that point, slowing the edges has nothing left to give, and the other two remedies have to carry the load. With its clock wobbling, the same bare trace manages about 800 million symbols a second. Over a sheet of copper it reaches nearly two billion. That is why the fast lanes of chapter 27 run as pairs, over solid copper, inside a metal box, with clocks that wobble, and why a real machine uses every remedy in the table at once.
A signal that repeats, and one that never does
So far the trace has carried the same two bits forever, and that is the worst case for a reason. Anything that repeats piles its power onto a few exact frequencies. Press the button marked one word, over and over. The trace now carries twenty bits of the kind a link sends when it has nothing to say, again and again. The pattern takes ten times as long to come round, so its harmonics stand ten times closer together and there are ten times as many of them. The same power is shared among more of them, and each one is lower. At the setting the drawing opens with, the worst harmonic of the plain ones and zeros stands 9 dB over the limit, and the worst harmonic of the repeated word comes in just under it.
Now press scrambled data, which takes the idea as far as it will go. Before the bits are sent, each one is flipped or left alone according to a long stream of the kind chapter 4 made with a small machine of shifting bits. The stream looks random and is completely predictable. The receiver runs the same machine, flips the same bits back, and has the data exactly as it was. What travels on the wire never settles into a pattern, so its power has no exact frequencies to pile onto, and it lies spread along the whole dial. The harmonics are gone. What is left in the upper chart is a row of smooth humps.
The humps are worth a close look, because they are the shape of the signal itself. The dips between them fall exactly at the symbol rate, and at twice and three times it. Move the slider for the symbol rate and the whole row slides with it. The first hump, from the bottom of the dial up to the symbol rate, holds nine tenths of the signal's power, and its width is the bandwidth that chapter 11 spoke of, the stretch of the dial a signal occupies. Send symbols twice as fast and the signal takes up twice as much of the dial. The edges decide how quickly the later humps die away.
Bandwidth is also the reason scrambled data reads so low. The test receiver listens to a slice of the dial 120,000 cycles a second wide. A harmonic is far narrower than the slice, so the slice catches all of its power at once. Scrambled data at 250 million symbols a second is spread about two thousand times wider than the slice, so the slice catches about one part in two thousand, and the reading falls by 33 dB. The power in the trace is what it was. Its width is what has changed.
The same arithmetic shows where both charts step up at 1 GHz. Above that frequency the rules of the test widen the slice to a million cycles a second, about eight times as wide. A wider slice lets in eight times as much of anything that is spread out, which is 9 dB, and that goes for the receiver's own hiss as much as for the data. A harmonic was inside the slice already, and it stays where it was.
Scrambling can do nothing for a clock, which has to repeat to be a clock at all. That is what the wobble is for: it is the nearest thing to scrambling that a clock can bear. Turn the wobble on while the trace carries scrambled data and nothing changes, because that power is already spread as thin as it will go.
| the remedy | what it does | what it costs |
|---|---|---|
| slower edges | removes the upper harmonics at the place they are made | a ceiling on symbols per second, because an edge has to fit inside a symbol |
| copper under every trace | shrinks the loop that acts as the antenna | more layers in the board |
| a pair of wires | the fields of the two wires cancel each other | twice the wires and pins, and the two must match in length to a hair |
| a metal case | holds in whatever is left | weight and money, and every opening for air or a connector is a leak |
| ferrite on the cables | soaks up the noise that rides out along a cable | a lump on every cable, and no help for the board itself |
| a wobbling clock | lowers every peak by smearing it along the dial | the total noise is unchanged, and the timing of the whole machine wavers |
| scrambled data | keeps the data from repeating, so its power lies evenly along the dial and no slice holds much of it | a small circuit at each end, which must keep time with its twin, and no help at all for the clock |
More bits from the same edges
The drawing shows a ceiling. The neighbors set the pace of the edges, the edges set the number of symbols in a second, and that would seem to settle how many bits a wire can carry. There is one more move, and it is as old as the telegraph. Leave the symbols alone, and make each one say more.
Engineers count symbols per second in a unit called the baud. It is named for Émile Baudot, a French telegraph engineer who devised a code in the 1870s that sent each letter as five pulses, each one on or off. As long as a symbol can take only two values, high or low, each symbol is one bit, and a baud and a bit per second are the same thing. That is why the two words are so often mixed up.
They part company as soon as a symbol is allowed more than two values. A playing card dealt face up tells you one thing if you note only its color, red or black. Note its suit, and the same card, dealt at the same pace, tells you two. Give a symbol four voltage levels to choose from and it settles two bits at once. Eight levels carry three bits and sixteen carry four, and every doubling of the levels adds one more.
bits per second
= symbols per second
x bits in a symbol
bits in a symbol
= log2(levels)
2 levels: 1 bit 4 levels: 2 bits
16 levels: 4 bits
The beauty of it is that the edges are left alone. A signal with four levels changes no more often and no more sharply than a signal with two, so its harmonics are about the same, and so is the trouble the wire has in passing it. The cost turns up somewhere else. Switch between two levels and four below, and then raise the noise.
The full swing of the signal now has to be shared among three eyes, stacked one above the other, and each is a third as tall as the single eye was. Noise that a two-level signal would never notice is enough to push a symbol across into its neighbor.
Beside the eye, the levels that arrive at the moment of reading are heaped into piles, one for each level, and over each pile is drawn the bell-shaped curve that noise of that size produces. Where the foot of a bell reaches past a dashed threshold, the sliver beyond the line is the share of symbols that will be taken for the level next door. With two levels the bells stand far apart and their feet never meet. With four, each bell has a neighbor a third as far away, and the slivers appear long before the picture looks bad.
The four levels are labeled in an order that looks odd: 00, 01, 11, 10. It is chosen so that neighboring levels differ in a single bit. By far the commonest mistake is to take a level for the one next to it, and with this labeling that mistake spoils one bit and spares the other.
This is the bargain that chapter 27's table recorded for 2022. PCI Express 6 sends four levels, and doubles its bits without making a symbol any shorter. In exchange it accepts that a bit will be misread about once in a million times, where the versions before it allowed one wrong bit in a trillion, and it lays a second code over the data to find those mistakes and mend them.
Telephone modems pushed the idea further than anything before them. A telephone line passes a narrow band of frequencies, enough for about 3,400 symbols a second. The last modems of the 1990s carried up to ten bits in every one of those symbols, by choosing each symbol from about a thousand combinations of strength and timing. That is how more than 33,000 bits a second went down a line that was built for the human voice.
How far can this go? In 1948 Claude Shannon, at Bell Telephone Laboratories, settled the question. The number of levels worth having depends on how far the signal stands above the noise. A quiet line will bear many levels and a noisy one only a few, and every line has a top speed, set by its width in frequency and by its noise, that no cleverness can beat.
top speed, in bits per second
= width in hertz
x log2(1 + signal / noise)
So a noisy neighbor does more than annoy. Whatever noise a computer adds to the air takes bits per second away from every radio link within its reach.
Two clocks make a third
Noise is one way for a computer to spoil a radio, and there is a subtler one. Chapter 15 fed two signals into one amplifier and watched a third come out. Anything that flattens large signals will do the same, and the new tones land at sums and differences of the two that went in. If the two are at frequencies A and B, the troublesome ones fall at twice A minus B and at twice B minus A, right beside the originals, where no filter can separate them from a station that happens to live there. Engineers call the effect intermodulation.
It matters inside a computer because a laptop or a phone is the hardest case there is. It holds several transmitters, receivers that work at the faint levels of chapter 11, and billions of sharp edges, all within a hand's width and all sharing one sheet of copper. A gate in a digital circuit is about as far from linear as a circuit can be, since flattening is its whole job. So wherever two clocks meet inside a chip their harmonics mix, and the machine makes noise at frequencies that are multiples of neither clock.
The window between hiss and ceiling that chapter 15 described is tested nowhere harder than here. A phone's transmitter sends about a fifth of a watt. Its GPS receiver, a thumb's width away, is listening for a signal of a tenth of a millionth of a billionth of a watt. The filters and the spacing that keep the one from deafening the other are a large part of what the designers of a phone are paid for.
Hunting it down
When a machine fails on the test range, the report says which frequencies were over the line. It says nothing about which of ten thousand traces is to blame. Finding out is detective work, and it is done with a short list of instruments.
| the instrument | the question it answers |
|---|---|
| spectrum analyzer | Which frequencies are present, and how strong is each? Its most useful control is the width of the slice it listens to. Chapter 11 found that the hiss in a receiver grows with the width it listens across. Narrow the slice ten times and the hiss on the screen drops by 10 dB, while a steady harmonic stays where it was. A faint tone can be dug out of the noise that way, at the price of a slower sweep. |
| near-field probe | Where on the board is it coming from? The probe is a loop of wire the size of a coin on the end of a cable. Moved across the board an inch at a time, it works like a doctor's stethoscope, and the reading jumps as it passes over the guilty trace. |
| quasi-peak reading | How much would this noise bother a listener? It is a way of reading the analyzer that goes back to the days of AM radio. A click that comes once a second scores lower than a steady buzz of the same height, because that is how a person hearing them would judge. The limits below 1 GHz are written in terms of it. |
| two signal generators | How well does this amplifier stand up to strong signals? Two clean tones go in, and the analyzer looks for a third, as in the drawing in chapter 15. |
| line network | What is leaving by the power cord? Below 30 MHz the waves are too long for the machine itself to radiate well, and the noise travels out along the cord. A small box between the machine and the wall outlet lets the analyzer measure it. |
One more thing is worth knowing about the limit. It protects the neighbor's radio, ten feet away. It does nothing for a radio one inch away inside the same case, and a machine can pass its test and still deafen itself. In 2012 Intel published measurements of exactly that. The fast data lanes of USB 3.0, which were new at the time, put broad noise into the band around 2.4 GHz that is used by WiFi, by Bluetooth and by wireless mice, and it was strong enough to shorten the reach of a wireless receiver plugged in beside a busy USB 3.0 port. The cures were the ones in the table above: better shielding around the connector and the cable, and more distance.
Try it: listen to your own machine
- Find a small radio that receives AM, and tune it to a quiet spot between stations near the low end of the dial.
- Hold it close to a laptop, a phone charger, an LED light bulb and the back of a monitor, one at a time. Each has a voice of its own: a buzz, a whine or a rough hiss.
- With the radio beside the laptop, scroll a long page, start a video, and then leave the machine idle. The sound changes with what the machine is doing, and that is all Dompier needed to notice.
- Back the radio away a foot at a time. This close to its source the noise fades far faster than the open-air rule of chapter 11 would suggest.
- Look along the cable of a monitor or an old charger for a hard cylinder molded into it near one end. That is a ferrite, soaking up the noise that would otherwise ride out along the cable.
The tour inside the computer is nearly over. It began with a machine too large for its own clock, and it has come to one that has to be kept from drowning out its own radios. Every chapter so far has been about the question this book opened with, which is how to tell a signal from the noise around it. A threshold with a gap in it, an eye with room to spare, a pair of wires that share their troubles and a clock that wobbles on purpose are all answers to that one question, and the machine in front of you is asking it billions of times a second. One chapter remains, and it follows those bits out through the sockets on the back of the case.