SECTION III-5: Inside Central Processing Units

A program stored in memory provides instructions to the CPU to perform an action. The action can simply be adding data such as payroll data or controlling a machine such as a robot. The function of the CPU is to fetch these instructions from memory and execute them. To perform the actions of fetch and execute, all CPU's are equipped with resources such as the following:

  1. Foremost among the resources at the disposal of the CPU are a number of registers. The CPU used registers to store information temporarily. The information could be two values to be processed, or the address of the value needed to be fetched from memory. Registers inside the CPU can be 8-bit, 16-bit, 32-bit or even 64-bit registers, depending on the CPU. In general, the more and bigger the registers, the better the CPU. The disadvantage of more and bigger registers is the increased cost of such a CPU.
  2. The CPU also has what is called ALU (Arithmetic Logic Unit). The ALU section of the CPU is responsible for performing arithmetic functions such as Addition, Subtract, Multiply and Divide, and logic functions such as AND, OR, and NOT.
  3. Every CPU has what is called a program counter. The function of the program counter is to point to the address of the next instruction to be executed. As each instruction is executed, the program counter is incremented to point to the address of the next instruction to executed. The contents of the program counter are placed on the address bus to find and fetch the desired instruction. In the IBM PC, the program counter is a register called IP, or the instruction pointer.
  4. The function of the instruction decoder is to interpret the instruction fetched into the CPU. One can think of the instruction decoder as a kind of dictionary, storing the meaning of each instruction and what steps the CPU should take upon receiving a given instruction. Just as a dictionary requires more pages, the more words it defines, a CPU capable of understanding more instructions required more transistors to design.




More From