The Chip: How Two Americans Invented the Microchip and Launched a Revolution

Home > Other > The Chip: How Two Americans Invented the Microchip and Launched a Revolution > Page 20
The Chip: How Two Americans Invented the Microchip and Launched a Revolution Page 20

by T. R. Reid


  In any case, the program, whether built in at the factory or provided separately, is a long chain of instructions that reside in a designated block of memory. In order to do any job, no matter how mundane, the machine’s central control unit has to fetch individual instructions from memory and execute them, one at a time, one after another.

  The fundamental fetch-and-execute cycle begins the instant DIM-I is turned on. The clock generator starts generating regular pulses, beeping out every 1/100,000 second. If you turn on a calculator and then put it down to sip some coffee or answer the phone, the calculator may look as if it is doing nothing. In fact, it is working furiously away, fetching and executing instructions—a special instruction set that continually checks the keyboard, looking for input. All your digital devices—calculator, computer, beeper, pager, cell phone, remote control, etc.—follow this same special program when they are waiting for somebody to come along and press a key. This special watching-and-waiting program is called the idle routine. The idle routine is what most of our modern tools are doing most of the time, during the periods when they are not in active use.

  DIM-I starts into its idle routine 1/100,000 second after it is turned on, with the first clock pulse. Tick. The control unit goes to the first location in the memory bank where instructions are stored and fetches the first instruction: “Check the ‘1’ key on the keyboard.” Tick. Now the controller executes that instruction. That is, it sends an electronic query to the keyboard: “Has anybody pushed the ‘1’ key lately?” The electronic reply comes back: “No.” With this sequence—the first instruction was fetched and executed—the first instruction cycle has been completed.

  Tick. The idle routine continues. The control unit goes back to memory and fetches the second instruction: “Check the ‘2’ key on the keyboard.” Tick. Having fetched and received an instruction, the controller now executes the order. It calls the keyboard: “Has anybody hit the ‘2’ key lately?” The electronic reply: “No.” Tick. The controller fetches the next instruction: “Check the ‘3’ key.” Tick. The controller queries the keyboard: “Anybody pushed the ‘3’ key lately?” Reply: “No.”

  At this point, even the most primitive intelligence would start to appreciate that the drill here is to check all the keys seriatim to see if anybody has pushed. A child could figure out that the next two steps will be to check the “4” and the “5” keys. DIM-I, however, is much more stupid than any child. It has no intelligence; it is an ignorant digital mechanism. It knows nothing but the unvarying fetch-and-execute routine it has been programmed to follow mechanically.

  Tick. Doggedly, the controller fetches the instruction in the next memory location. “Check the ‘4’ key on the keyboard.” Tick. Execute. Tick. Fetch. Tick. Execute. Tick. This is a computer’s life. One by one, the control unit will check each of DIM-I’s eighteen keys. If none has been pushed, there’s only one thing for this mechanism to do. It runs through the whole routine again, and again, and again. Any human, indeed any chimpanzee, any creature with intelligence would be driven to distraction after the first few repetitive cycles of this. A digital device, in contrast, races its way through billions and billions of fetch-and-execute cycles every working day, never getting bored, never getting tired. It’s a machine, after all, and that’s what machines do for us. They take over the jobs that are too heavy, or too boring, for humans to manage.

  At some point, every million or billion instruction cycles or so, DIM-I’s unceasing vigilance pays off: Somebody pushes a key. The keyboard reports to the controller that a key has been pushed. But which key?

  Each key on the keyboard of our calculator is a switch, just like the light switch on the wall. When somebody flicks the light switch on the wall, it lets current flow to the light bulb. When somebody pushes a key on the keyboard, it lets current flow to the control unit. This is just a quick surge of current—a swarm of electrons—and it is the same pulse no matter which key is hit. The “1,” the “+,” the “9”—every key sends the same pulse. (In those warehouse-size computers of the 1950s, some designers did try to vary the current for each signal, so that a “9” sent a surge nine times as powerful through the circuit as a “1.” But this approach takes huge amounts of power and generates huge amounts of heat. Things are much simpler if you have each key send the same pulse. The only problem is that the control unit needs to discern whether a given pulse is supposed to be a “1,” a “+,” or a “9.” That’s where the clock comes in.)

  The control unit at the heart of DIM-I is like the stationmaster at some isolated depot along the main freight line. The stationmaster knows that four trains come through from the south each day: the 10:00 A.M. from Tulsa, the noon train from Natchez, the 2:00 P.M. from Texarkana, and the 4:00 P.M. from Fort Worth. His job is to watch for the trains and switch each one to the right track to reach its destination.

  Each morning at about 9:45 the stationmaster hears the remote rumble of a train chugging in from the south. He can’t see the train, and all trains sound alike at a distance. Yet, the station man knows that this is the train from Tulsa. It has to be; it’s the only train scheduled for that hour. He checks off the Tulsa train in his logbook; then he reaches in the desk drawer and fetches his stationmaster’s manual to get the instruction for which track he should route it to. Then he gets a cup of coffee and goes back into his idle routine. At 11:45 he hears another engine; the stationmaster can’t see that, either, and all trains sound alike. But he takes out the logbook and checks off the train from Natchez. He knows it has to be the train from Natchez, because the timetable tells him so.

  So it is for the control unit inside DIM-I. All through the idle routine it has been querying each of the eighteen keys, one at a time. Each key is queried at a specific time interval—intervals determined by the steady heartbeat of the clock generator. The control unit can receive a pulse from a given key only when it is addressing that particular key. If a pulse comes in from the keyboard during the 2/100,000 second when the control unit is querying the “3” key, then the pulse had to be a 3. Somebody just pushed the “3” button. Pulses from the keyboard, like locomotives at a distance, all sound alike. But the control unit knows this pulse had to come from the “3” key, because the timetable tells it so.

  Except that there’s one other possibility: The surge of current may not have come from the keyboard at all. It could have been nothing more than random electronic “noise.” Our atmosphere is almost always noisy with stray electromagnetic pulses, some generated by nature, others by mankind’s machines and weapons. Weapons, particularly nuclear weapons, are prolific producers of electromagnetic pulses, or EMP, to use the Pentagon acronym. One of the many unknowns about the world’s nuclear arsenals is the quantity of EMP that might result from an atomic blast or test. It is considered possible that any nuclear weapon, once triggered, would release so much electromagnetic “noise” that the control units of the world’s computers—including the computers supposedly directing strategic planning in war rooms around the planet—would be flooded with stray pulses and would break down in a state of terminal confusion. Even in time of peace, though, there is enough EMP floating around that every digital device must be programmed to check the signals coming in. Before the control unit of DIM-I can really be sure it got a signal from the keyboard, therefore, it goes back to the “3” key a few more times to make sure the key has actually been pressed. This is fairly simple, because in the time it takes a finger to push that key once, the calculator will go through tens of thousands of instruction cycles.

  Having determined that the pulse it sensed did in fact come from the “3” key, the control unit now proceeds the same way the stationmaster did. First it enters the newly arrived “3” in a logbook and then it sends the signal on to its proper destination.

  The “logbook” for recording the receipt of a signal from the keyboard is a chain of four transistors constituting a small memory unit known as a register. The control unit sends a signal—a surge of curre
nt—to a group of logic gates. This logic circuit, in turn, emits a pattern of electronic pulses to the register, switching the four transistors on and off so that they line up like this:

  OFF OFF ON ON

  This pattern is the electronic version of the binary number

  0 0 1 1

  Reading from the right, this means one 1 plus one 2 plus no 4’s plus no 8’s. Add it all up—1 + 2 + 0 + 0—and 0011 is the binary version of the decimal number 3. And it is now stored in DIM-I’s temporary memory register.

  With that taken care of, the 3 has to be sent from the temporary register to its real destination—in this case, the calculator’s display screen. DIM-I is going to turn the keyboard “input” into display screen “output.” That is, it’s ready to put the 3 on the screen.

  Being at least as dumb as a dull-witted stationmaster, the control unit can’t even begin to do this without looking up the instructions. It jumps ahead to the memory location that stores the programmed sequence of steps that will display a number in the first digit position on the screen. The calculator will now fetch and execute, in precise rhythm with the ticking of the clock, the instructions to operate the “output decoder” circuitry—the series of logic gates that will transform the binary 0011 that has been stored in the register into the digit 3 on the display screen.

  Small digital devices—watches, calculators, cell phones, car navigation systems, etc.—can use any of a variety of display techniques. The choice in any particular machine is dictated by a number of considerations—the amount of power available, the type of information that needs to be displayed, the speed at which the image will change, etc. For a cheap little handheld calculator like DIM-I, the only two realistic possibilities—because they work fine on battery power—are light-emitting diodes and liquid crystal displays. The light-emitting diode (known to engineers as LED) system employs a group of small diodes made of a special semiconductor material that work something like a standard light bulb. They give off a bright glow—red, yellow, green, orange, or white, depending on the material used—when current flows through. Unlike a light bulb, though, an LED can be made to glow with a minute amount of current; and since it has no filament to heat up, the LED gives off light without heat. (Although it doesn’t have much to do with this chapter, I can’t resist pointing out that, early in the twenty-first century, the glowing-filament light bulb that Edison invented in the nineteenth century will finally be replaced. Engineers have been developing brighter and whiter LEDs; soon a white LED will replace the familiar glass light bulb as the standard home lighting source. These new lights will use far less power, they won’t get hot, and they’ll never burn out. So don’t buy any light bulb stock.) The other standard display device for low-powered devices is the liquid crystal display (LCD), a creamy gray liquid that works the opposite of a light bulb: When current is applied, the liquid crystal blocks the flow of current and thus turns black. The result is the familiar black digit floating on a gray background that you see whenever you look at your digital watch. Whether it uses LED or LCD, though, the display produces the characteristic squared-off digits that have become part and parcel of the microelectronic age, staring out at us everywhere from the digital readouts of clocks and calculators, scoreboards and scales.

  Each of the ten digits from 0 to 9, together with a few other standard symbols such as the minus sign for negative numbers, can be created in the familiar squared-off style from a rectangular cluster containing seven separate diodes, arranged this way:

  Drawing all the digits using just these pieces turns into a sort of high-tech version of the maddening little puzzles that ask you to form a “T” out of four weirdly shaped pieces of plastic. In a seven-segment display, some shapes are simpler to make than others. To make a number “8,” all seven diode segments would be lighted. A “1” is formed by lighting only segments b and c. A “5” can be made with segments a, f, g, c, and d:

  If an eighth diode, shaped like a period, is added to the cluster, this eighth segment can represent a decimal point:

  The calculator’s output circuit has to solve the puzzle: it has to draw the decimal digit representing whatever number the control unit sends along. The output unit consists of a group of logic gates that sends out a pattern of signals to selected segments of the display. In the case at hand, the binary pattern 0011 flows from the control unit to the output gates. The gates, in turn, will turn on segments a, b, g, c, d, and h, but not segments e and f. The display, consequently, lights up like this:

  Moving the “3” from the keyboard to the display screen—and writing it down in a register along the way—has taken hundreds or thousands of instruction cycles. If the machine took just one second to fetch and execute each instruction, we would have waited ten or fifteen minutes for the display to light up. Anybody who has surfed the Internet using a standard telephone line knows what it feels like to sit around waiting for something to show up on the screen, but our little calculator doesn’t make anybody wait. With its clock ticking every hundred thousandth of a second, DIM-I runs through all the instructions and completes the job in a total time of about .005 second. On the human scale, this is effectively instantaneous: the digit appears to hit the display screen the instant we push the key. The calculator is quicker than the eye, even though it turns every task into a ridiculously complicated series of fetch-and-execute operations.

  It’s also quicker than the hand. Presumably, the human operator will soon be punching some more keys. But even an unusually nimble human finger will take two or three tenths of a second between keys—virtually eons of time on the microelectronic scale. Thus the control unit, even at the unhurried (by microelectronic standards) pace of our 10-microsecond calculator, has more than enough time to check for EMP, write the “3” in the register, send it on to the output circuitry, and return to its old familiar pastime—the idle routine—before the finger can move on. Indeed, a calculator will check the keyboard thousands of times in the interval when the human finger is between two key punches.

  On its next few thousand queries to the keyboard, consequently, control will probably find a finger still resting on the “3” key. This manifestation of human torpidity requires a whole new subgroup of idle routine instructions so that DIM-I can figure out what the user really has in mind: was she just taking her time about punching that 3, or is she really trying to enter a number like 33, or 333333? Among programmers, in fact, there’s endless dispute about how long a control unit should wait before deciding that the finger on the “3” key is sending a new 3. The same problem shows up on cellular phone keyboards. Some people, particularly teenagers who send endless text messages on their phones, have become amazingly fast typists on that tiny keyboard. The phone has to be programmed to deal with both whiz-kid speedsters and slow-poke adults who punch out each new number slowly, slowly, slowly.

  Once control figures out how many 3’s were intended, it can go back to its stationmaster duties: watching the keys, checking each pulse it senses against the timetable, logging it in, and sending the appropriate signals to various parts of the circuitry. It may switch the pulse onto a wire leading to the main memory unit, to a temporary memory register, or to the display screen.

  And occasionally it sends the signals on to the most important destination in any digital machine. This is the complex nest of logic gates that actually does the calculating. It is known by various names: arithmetic-logic unit, adder-subtracter, etc. Whatever it’s called, this central arithmetic circuitry is the place where a computer does its computing.

  Let’s assume, for example, that the person who pushed DIM-I’s “3” key was starting to punch in an addition problem: 3 + 2 = . As we have seen, the first keystroke resulted in a byzantine sequence of operations that left 0011 (binary 3) in a memory register and displayed a “3” on the screen. For the next two keystrokes, the same general sequences are followed again, in all their labyrinthine complexity, as DIM-I digests the “+” and the “2.”

  Things
become even more complicated when the pulse comes in from the “=” key. That pulse is the call to action. As soon as control senses that someone has touched that key, it jumps to a new set of instructions that dispatches the number and the plus sign to the arithmetic unit. The most complicated part of any digital device is the circuitry for that unit. All the switches and all the wiring must be arranged so that no matter what binary pulses are fed in, only the correct answer can come out. It is only because humans have figured out how to build arithmethic-logic circuitry that an ignorant tool can perform logical and arithmetic operations.

  The basic building blocks of the arithmetic circuit in any digital tool, big or small, are the standard logic gates that Claude Shannon first proposed in 1937. As Shannon showed then, various combinations of switches can be wired together with a few resistors and capacitors to carry out the basic logical operations that George Boole had formulated. These logic circuits are called gates; the gates take in and send out impulses according to established rules. The simplest of these logic gates is the circuit called a NOT gate—a set of switches with an output that is always the opposite of the input. That is, if current flows into the NOT gate, current does not flow out. When current is not flowing in, current does flow out.

 

‹ Prev