The parts of a computer.
Grace Hopper, who wrote some of the first programs ever run on a computer, liked to hand out pieces of wire at her lectures. Each one was 11.8 inches long, a little short of a foot. That, she explained, is the farthest that light or any electrical signal can travel in one billionth of a second. She called each piece a nanosecond, and people went home with one in a pocket.
The processor in an ordinary computer now counts time in smaller pieces than that. Its clock ticks about four billion times a second, and in the space of one tick a signal on a circuit board covers about an inch and a half. The board inside a desktop computer is a foot across. So here is something that few of the people who use computers ever have a reason to notice: the machine is too big for its own clock. A signal that sets out from one corner of the board is still on its way to the opposite corner ten ticks later.
Nearly everything about the way a computer is laid out follows from that. This part of the book takes the cover off and follows the signals. It goes from the parts on the board to the way a processor works with its memory, then to what a one and a zero look like on a real wire, then to how billions of them a second are sent down a pair of copper traces, and last to the radio noise that leaks out of all of it. Everybody uses a computer. What goes on under the hood turns out to be the subject of every earlier chapter, put to work.
A kitchen arranged by reach
Picture a cook at a stove. The spoon is in hand. Salt and oil stand on the counter, an arm's length away. Flour is in the pantry down the hall, the winter's potatoes are in the cellar, and anything else means a trip to the warehouse across town. A working kitchen ends up arranged by how often each thing is reached for, with the things used most kept closest. A computer is arranged the same way, for the same reason, and the cook is the processor.
The drawing below is the main circuit board of a desktop computer, the motherboard, seen from above with its large parts labeled. The lines are the roads between them, and a wider line is a faster road. Press any part to read what it does. Start with the board from 2005, which shows the classic arrangement, then switch to a board from today and see what has moved.
Two chips called bridges
For about twenty years the middle of that map held two chips, and engineers drew them the same way every time. The processor went at the top of the page, like north on a map. The chip just below it came to be called the north bridge, and the chip below that one the south bridge.
The north bridge was the processor's only connection to anything. Every request the processor made left over a single set of wires, called the front-side bus, and arrived at the north bridge, which passed it on to memory or to the graphics card. Those were the two things that had to be fast, which is why the north bridge sat an inch or two from the processor with the memory right beside it. At these speeds distance is time, and Hopper's wire is the ruler.
The south bridge hung below and gathered everything that could afford to wait: the disks, the USB ports, sound, the network, the expansion slots, the firmware chip, and the small clock that keeps the date while the machine is switched off. A hard drive answers in thousandths of a second, and a typist delivers ten letters a second. To a processor those are geological ages, so a longer road cost them nothing.
Why have bridges at all? The parts of a computer speak different electrical languages at very different speeds, and something has to translate. Memory expects one set of signals and one kind of timing, a disk expects another, and a USB port a third. A processor that spoke every one of those languages itself would need thousands of pins, which are the metal contacts that join a chip to the board, and it would need a new design each time one of the languages changed. The two bridges took on the translating, and they sorted the traffic by speed while they were at it, with an express interchange beside the processor and local streets farther out. A burst of data on its way to the graphics card was spared a wait behind a keystroke.
Then the processors outgrew the arrangement. As clocks sped up, the detour through the north bridge became the slowest part of every trip to memory: out over the front-side bus, through the bridge, and back the same way. In 2003 a processor from AMD called the Athlon 64 took the circuits that run the memory inside itself, and the detour was gone. Intel did the same in 2008. By 2011 the connection to the graphics card had moved in as well, and the north bridge had dissolved into the processor.
What was the south bridge is still on the board as a single chip. In a phone or a thin laptop even that has been absorbed, and the whole map sits on one chip, called a system on a chip. The two old names are still worth knowing, because the idea behind them has outlived the chips: sort the traffic by speed, and keep the fast things close.
Follow a job through the machine
A list of parts says little about a computer until something moves through it. Here is the same board again, and three everyday jobs to send across it: a key press, a file being opened, and one frame of the picture on the screen. Choose a job and press next step to move it along. Under the board, a small screen shows what is on the wires at each stop, the way an oscilloscope clipped onto that stretch of the board would draw it. Then try the same job on the other board. The older one sends nearly everything through the north bridge, and often twice.
Two things are worth noticing. The first is that every job is a relay. Nothing travels straight from the keyboard to the screen, and each part does one piece of the work and hands the result to the next. The second is that the processor stands in the middle of every one of them. It reads, it decides, and it writes, and everything else on the board is fetching and carrying.
There is a third thing, and the small screen shows it. Follow the key press once more and count the kinds of signal it passes through. It begins as two pieces of metal touching. It becomes a number on a pair of wires, then a single tap on one line, then sixty-four wires changing together, then billions of bits a second on the fast lanes, and it ends as rows of color on the way to the screen. That is six kinds of signal for one letter.
Each kind suits the stretch it covers. Where there is time to spare, the signal is slow, simple and forgiving, like the switch and the keyboard's cable. Where there is none, it is fast and carefully guarded, like the lanes to the graphics card. And under the differences they all rest on the same few ideas: a threshold that tells a one from a zero, a clock that says when to look, and a second wire to cancel what the first one picks up. The four chapters that follow take those ideas one at a time.
Who does what
With the jobs in mind, here is the whole cast again, each with its role and with the one thing the rest of the machine counts on it for.
| the part | its role | what it answers for |
|---|---|---|
| processor | Reads instructions one at a time, does the arithmetic, and decides what happens next. | Every decision the machine makes. Each job starts with it and comes back to it. |
| memory | Holds the programs that are running and whatever they are working on, for as long as the power is on. | Handing back any number it holds within a few tens of billionths of a second, exactly as it was stored. |
| north bridge | On the older board, carries the processor's requests to memory and to the graphics card. | The fastest traffic on the board. Its work now lives inside the processor. |
| south bridge, or controller hub | Gathers the slower traffic: ports, drives, sound, the network and the slots. | Translating between each device's way of signaling and the processor's, and tapping the processor on the shoulder when something arrives. |
| graphics card | Works out the color of every pixel, on a processor and memory of its own. | A finished frame for the screen, sixty times a second or more, without fail. |
| drives | Keep programs and files while the power is off: a hard drive on spinning platters, a solid state drive as charge in cells. | Giving back years later exactly the bits it was given, and finding and mending its own errors on the way. |
| ports | The doors to the outside: keyboard, mouse, network, sound, screens and drives that plug in. | Taking in whatever the world plugs into them, sparks of static included, without harm to the board. |
| slots | Sockets for cards that add something the board was built without. | Power for each card, and a road from it to the processor. |
| firmware chip | Holds the first instructions the processor runs when the power comes on. | Starting the machine from nothing: check the hardware, find a drive, hand over to the operating system. |
| clock | A sliver of quartz that rings at one exact pitch, and a coin cell that keeps the date. | The steady beat that every faster clock on the board is multiplied up from, so that all the parts agree on when to look. |
| power stage | Turns the 12 volts from the supply into the single volt or so that the processor runs on. | Holding that voltage steady while the processor's appetite swings from a trickle to a hundred amperes and back. |
Read down the last column and a pattern shows. Nearly every promise is about a signal: that it will arrive on time, arrive intact, and mean the same thing at the far end as it did at the near one. The rest of this part of the book is about how those promises are kept.
If one tick took a second
The times in those jobs are hard to feel. A hundred billionths of a second and ten thousandths of a second both sound like no time at all. So stretch time until one tick of the processor's clock lasts one second, about a heartbeat, and stretch everything else by the same amount.
| the errand | real time | if one tick took a second |
|---|---|---|
| one tick of the processor's clock | 0.25 billionths of a second | 1 second |
| a number from the nearest shelf of memory | 0.5 billionths | 2 seconds |
| a number from main memory | 100 billionths | 7 minutes |
| a block of data from a solid state drive | 150 millionths | 7 days |
| a block from a hard drive, once the arm has moved | 10 thousandths | 15 months |
| a key press reaching the screen | about 20 thousandths | 2 and a half years |
| a message to another continent and back | 150 thousandths | 19 years |
At that scale the processor is a cook who can chop once a second and has to wait seven minutes for anything from the pantry. A hard drive is a supplier who takes fifteen months to deliver. Now the layout of the board makes sense, and so does much of what goes on inside the processor. It keeps small, fast shelves of memory of its own, called caches, so that most trips take two seconds and few take seven minutes. Solid state drives pushed hard drives aside for the same reason. And when a program feels slow, the processor is often standing idle, waiting on a delivery.
Three ways to hold a bit
Three of the parts on the board exist to remember things, and each remembers in a different way. The differences explain why a computer needs all three.
| memory | solid state drive | hard drive | |
|---|---|---|---|
| a bit is | charge on a tiny capacitor | charge trapped in an insulated cell | a magnetized patch on a spinning platter |
| with the power off | gone in an instant | kept for years | kept for years |
| time to fetch | 100 billionths of a second | about 150 millionths | about 10 thousandths |
| moving parts | none | none | platters and an arm |
| in the kitchen | the pantry | the cellar | the warehouse across town |
Two of these have appeared in this book already, in other clothes. The capacitor in a memory chip is the bucket of chapter 23, a small well that holds electrons, and here the only question asked of it is whether it is full or empty. The hard drive is a tape recorder bent into a circle, and the signal that comes off its head is a faint, noisy one that has to be cleaned up before it means anything.
The solid state drive has the neatest trick. To fit more into each cell, most drives store three bits in one cell, by trapping one of eight different amounts of charge and measuring carefully which one is there. Eight levels in one cell is three bits, because three yes-or-no questions are enough to pick one thing out of eight. Chapter 28 meets the same idea on a wire, where it is the reason that the number of bits sent each second and the number of changes on the wire each second are two different things.
Try it: open one up
An old desktop computer, retired to a closet or found at a thrift store, is a museum that you are allowed to touch.
- Unplug it. Before you reach inside, touch the bare metal of the case, so that any static charge on you goes there and stays away from the chips.
- Take off the side panel and find the processor, under the largest fan. The sticks of memory stand beside it, and the longest slot on the board, a little way below, is for the graphics card.
- Look for the bridges. On a board made before about 2010, a second heat sink between the processor and the slots covers the north bridge, and a flat chip near the drive connectors is the south bridge. A newer board has one such chip.
- Find the clock. It is a small silver can, often stamped with its frequency.
- Cut a piece of string 11.8 inches long and lay it across the board. That is how far light travels in one nanosecond, and the processor ticks four times in that nanosecond. A signal in the copper of the board covers about half the string.
The next chapter goes inside the largest chip on the board and watches it take a single step.