The Central Processing Unit ( CPU), can be regarded as the ‘brain’ of the computer. It is a unit that performs all the necessary tasks, as assigned by the computer program resident in the computer memory. It co-ordinates and controls the activities of all the other units in the computer system, as well as performing all the logical arithmetic operations.
In most computing systems, then a single integrated circuit, or microprocessor forms part of the .
The microprocessor company ZILOG was founded in Nov 1974 by Federico Faggin and Ralph Ungermann, both of whom were ex-engineers from INTEL. Faggin developed the Z80, which was an enhanced version of the INTEL 8085. From earlier discussions it can be seen that there are a number of blocks within the CPU. In general the CPU can be divided into two main blocks :
• Control Unit, responsible for decoding and controlling the execution of programs
and signals.
• Processing unit or Arithmetic Logic Unit, responsible for all the computations and data transfer.
Communication between all parts of the computer system occurs by the address lines (the location in memory ) and data lines ( the value of that location)
An example of what the CPU has to do can be illustrated by using the following example of multiplying two numbers together. In order to perform tasks the computer must have a primary memory and a secondary memory, in order to save programs and to carry out operations in the correct sequences. Computer programs are a set of instructions which must be executed in the correct sequence in order for the correct results to be achieved.
STEP1: Get the value of the first number ,NUM1, store this in memory.
STEP2: Get the value of the first number, NUM2 , store this in memory.
STEP3: Recall numbers an perform calculation, RESULT, and store result in
memory.
STEP4: Output the result to the screen.
Variables NUM1, NUM2 and RESULT
Essentially this process of executing a set of instructions is referred to as the Fetch and Execution cycle.
Control Unit
The control unit fetches instructions from the memory, interprets them, it then produces control signals that activate other parts of the microprocessor, or allow external parts of the system to be communicated with. Essentially it forms the control centre via which all operations are carried out.
The control unit may be typically divided into a number of sub-systems:
Timing circuit
The microprocessor works on a synchronous mode of operation. This means there is a central clock which dictates all the operations. The clock is generally formed with a crystal oscillator.
Microprogram Memory
The memory is used to interpret the memory instructions, that the microprocessor is running. This form of memory is Read Only Memory ( ROM ). The ROM is normally programmed by the manufacturer. The microprogram that is held in the ROM, allows the microprocessor to take the appropriate action.
Program Counter
This is a mechanism that allows the control unit to keep track of what instruction is being executed and where to find the instruction from memory.
Stack Pointer
This is used to point to various parts of the stack memory. The stack memory is used as a temporary store by the microprocessor. It is organised as a Last In, First Out ( LIFO ).
Processing Unit
The second part of the main memory is the processing unit. It is responsible for performing arithmetic and logical computations. It generally contains a number subsystems.
Registers
Registers are fast memory internal locations. There may be several locations associated with a specific microprocessor. Registers may be used to store immediate values of calculations by the ALU. There are also index registers.
Arithmetic logic Unit ( ALU )
The ALU performs, all the addition, subtraction, division, and multiplication. It also performs all the logical operations e.g. AND, OR, NOT, rotate, compare etc. The results of the ALU are placed in the Accumulator.
Accumulator
This is the main register and takes part in all the logical operations, temporary storage, or data transfer to and from the memory or I/O devices.
Flag Registers
Flag Registers indicate specific conditions e.g whether the result of an arithmetic operation resulted in an overflow, carry or indicating the sign of the number.
Co-processor
A co-processor or slave processing unit is a separate microprocessor which can be added to a computer system. This addition is used to enhance the performance of the system e.g the 80287 was specifically designed to run along side the 80286.
The co-processor can be used to perform mathematical calculations, and so increase the speed of operation. Co-processors are normally now built into the microprocessors