CompTIA A_ Certification All-In-One Exam Guide, Seventh Edition - Michael Meyers [65]
* * *
NOTE Some motherboards enable you to override the default or automatic settings by changing a jumper or making a change in CMOS. A few enthusiasts’ motherboards even enable you to make software changes to alter the speed of your CPU.
Back to the External Data Bus
One more reality check. We’ve been talking about tables with racks of light bulbs, but of course real CPU registers don’t use light bulbs to represent on/1 and off/0. Registers are tiny storage areas on the CPU, microscopic semiconductor circuits. When one of these circuits holds a charge, you can think of the light bulb as on; no charge, the light bulb is off.
Figure 5-13 is a diagram of a real 8088 CPU, showing the wires that comprise the external data bus and the single clock wire. Because the registers are inside the CPU, you can’t see them in this figure.
Figure 5-13 Diagram of an Intel 8088 showing the external data bus and clock wires
Now that you have learned what components are involved in the process, try the following simple exercise to see how the process works. In this example, you tell the CPU to add 2 + 3. To do this, you must send a series of commands to the CPU; the CPU will act on each command, eventually giving you an answer. Refer to the codebook in Figure 5-7 to translate the instructions you’re giving the Man in the Box into binary commands.
Did you try it? Here’s how it works:
1. Place 10000000 on the external data bus (EDB).
2. Place 00000010 on the EDB.
3. Place 10010000 on the EDB.
4. Place 00000011 on the EDB.
5. Place 10110000 on the EDB.
6. Place 11000000 on the EDB.
When you finish step 6, the value on the EDB will be 00000101, the decimal number 5 written in binary.
Congrats! You just added 2 + 3 by using individual commands from the codebook. This set of commands is known as a program, which is a series of commands sent to a CPU in a specific order for the CPU to perform work. Each discrete setting of the external data bus is a line of code. This program, therefore, has six lines of code.
Memory
Now that you’ve seen how the CPU executes program code, let’s work backward in the process for a moment and think about how the program code gets to the external data bus. The program itself is stored on the hard drive. In theory, you could build a computer that sends data from the hard drive directly to the CPU, but there’s a problem—the hard drive is too slow. Even the ancient 8088, with its clock speed of 4.77 MHz, could conceivably process several million lines of code every second. Modern CPUs crank out billions of lines every second. Hard drives simply can’t give the data to the CPU at a fast enough speed.
Computers need some other device that takes copies of programs from the hard drive and then sends them, one line at a time, to the CPU quickly enough to keep up with its demands. Because each line of code is nothing more than a pattern of eight ones and zeros, any device that can store ones and zeros eight-across will do. Devices that in any way hold ones and zeros that the CPU accesses are known generically as memory.
Many types of devices store ones and zeros perfectly well technically even a piece of paper counts as memory—but computers need memory that does more than just store groups of eight ones and zeros. Consider this pretend program:
1. Put 2 in the AX register.
2. Put 5 in the BX register.
3. If AX is greater than BX, run line 4; otherwise, go to line 6.
4. Add 1 to the value in AX.
5. Go back to line 1.
6. Put the value of AX on the EDB.
This program has an IF statement, also called a branch by CPU makers. The CPU needs a way to address