|
Generalized Computer Diagram
To understand how the whole system works, consider the diagram of a generalized computer system as shown below. Input and output devices have been omitted for clarity. (They must, however, be there if the computer is to be useful to humans)! You are looking at a generalized CPU with its component parts and main memory. Note that the contents of only one memory location are displayed in the diagram.
|
|
|
This diagram shows the basic components of a generalized CPU. An actual CPU may have these components, or others with different names that provide the same functions. Each of the components shown in the diagram is discussed briefly below.
Accumulator (ACC) This is a special group of bits, similar to a memory location. The ACC is also a register, but a special one. It differs from the bytes that form main memory locations in that 1) it's part of the CPU, 2) it's an implicit operand for arithmetic and logic operations performed by the ALU, 3) it's often the implicit destination of results generated by the ALU, and 4) it's usually 2 bytes or more in size. Special circuitry allows the ACC to send its contents to the ALU, other registers, and the memory buffer register (MBR).
Arithmetic Logic Unit (ALU) The ALU contains all the circuitry required to perform arithmetic and logic instructions such as addition, subtraction, comparison, and logical operations including AND, OR and NOT. Most arithmetic and logic operations require two operands. One of those operands usually comes from a main memory location (via the MBR) while the other is the previously loaded value (from a prior instruction) in the accumulator (ACC). The ACC usually gets the result of the operation performed, which therefore overwrites the value stored there initially.
Clock A special circuit that sends pulses of current to the CPU and other computer components. These current pulses determine the time behavior of all the circuits in the system. Nothing happens until a pulse is received. Pulses are sent approximately 10 or more million times in one second. This is measured by the clock speed of a computer and expressed in megahertz (MHz). A 133 MHz computer sends 133 million pulses in one second. Or in other words, 133 million microinstructions can be performed in one second. Clearly, faster is better.
Control Unit The Control Unit contains the circuitry necessary to send current pulses where needed with each clock pulse. In one sense, it serves as a filter that directs the current to flow in the proper fashion needed to cause things to happen. It uses the instruction contained in the Instruction Register (IR) to decide which circuits need to be activated.
Instruction Register (IR) A special register in the CPU that holds the bit pattern corresponding to the next instruction be performed within the CPU. The Control Unit accesses this register to decide which circuits need to be activated.
Memory Address Register (MAR) When another instruction is needed in the IR, or a value is to be loaded into the ACC,or an operand is needed to perform some arithmetic or logic instruction, this register contains the memory address where the desired information can be found. It also serves as a pointer to the location in memory where the contents of some CPU register is to be stored.
Memory Buffer Register (MBR) This CPU register serves as an interface between the CPU and main memory. Anything needed by the CPU (instruction or data) is first placed here before it goes to its final destination (such as the ACC, IR, PC, or other register). Anything in the CPU that is to be stored in main memory comes here first. It is then copied into main memory at the location specified by the address contained in the MAR.
Program Counter (PC) This CPU register always contains the memory address where the next instruction to be performed by the CPU can be found. Its contents are copied into the MAR before an instruction is fetched from main memory. While theinstruction is being fetched, the control unit updates the contents of the PC so that it will again point to the next instruction to be performed.
|
|