0% found this document useful (0 votes)
141 views12 pages

Central Processing Unit

The document describes the basic components of a computer system, including input hardware like keyboards and mice, output hardware like monitors and printers, processing and memory hardware like the CPU and RAM, and secondary storage hardware like hard disks. It then provides more details on the CPU, describing its main components as the control unit, ALU, and memory or storage unit. The CPU fetches, decodes, and executes instructions using a fetch-execute cycle to process data.

Uploaded by

hussain korir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
141 views12 pages

Central Processing Unit

The document describes the basic components of a computer system, including input hardware like keyboards and mice, output hardware like monitors and printers, processing and memory hardware like the CPU and RAM, and secondary storage hardware like hard disks. It then provides more details on the CPU, describing its main components as the control unit, ALU, and memory or storage unit. The CPU fetches, decodes, and executes instructions using a fetch-execute cycle to process data.

Uploaded by

hussain korir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

 A computer system is a basic, complete and functional hardware Eg : Input ,

output , Processing and Storages and software setup with everything needed to
implement computing performance.
 Input Hardware: For users to input data into the computer system. Examples:
Keyboard, mouse, Scanner
 Output Hardware: To translate and display the result of the data processing .
Example: Monitor Screen, Printer etc
 Processing and Memory Hardware: Where data and information are processed
and manipulated to perform the task at hand. It is also the workspace of the
computer, where it temporarily stores data(R.A.M). Examples: Central Processing
Unit (CPU), Read Only Memory (ROM)
 Secondary Storage Hardware: Where the computer system stores data
permanently. Example: Harddisk, Pendrive etc
Central Processing Unit (CPU ) this is another name of the
microprocessor at the core of your computer system. The
C.P.U has the characteristics.
 IT is considered as the brain of the computer.
 CPU performs all types of data processing operation.
 It stores data ,results and Instructions(Programs)

 The CPU has three main Components .


 Memory or the storage Unit.
 The control Unit.
 ALU(Arithmetic Logic Unit.)
Control Unit
The CU provides several functions:
 it fetches, decodes and executes instructions
 it issues control signals that control hardware
 it moves data around the system
Arithmetic logic unit
 The ALU has two main functions:
 It performs arithmetic and logical operations (decisions). The ALU is where calculations
are done and where decisions are made.
 It acts as a gateway between primary memory and secondary storage . Data transferred
between them passes through the ALU.
Registers
 Registers are small amounts of high-speed memory contained within the CPU. They are
used by the processor to store small amounts of data that are needed during processing,
such as:
 the address of the next instruction to be executed
 the current instruction being decoded
 the results of calculations
Buses
A bus is a high-speed internal connection. Buses are used to send control signals and data between
the processor and other components.
Three types of bus are used:
 Address bus - carries memory addresses from the processor to other components such as
primary memory and input/output devices.
 Data bus - carries the actual data between the processor and other components.
 Control bus - carries control signals from the processor to other components. The control bus
also carries the clock's pulses.
Cache
Cache is a small amount of high-speed random access memory (RAM) built directly within the
processor. It is used to temporarily hold data and instructions that the processor is likely to reuse.
This allows for faster processing as the processor does not have to wait for the data and
instructions to be fetched from the RAM.
Clock
The CPU contains a clock which is used to coordinate all of the computer's components.
 The clock sends out a regular electrical pulse which synchronises (keeps in time) all the
components.
 The frequency of the pulses is known as the clock speed. Clock speed is measured in hertz. The
higher the frequency, the more instructions can be performed in any given moment of time.
Today, processors commonly run at a rate of 3 gigahertz (GHz) to 5 GHz, which is 3 billion to 5
billion pulses or cycles per second.
Processor Registers
A processor has five special registers which it uses for processing:
a. Program counter (PC) - holds the memory address of the next instruction to be fetched from
main memory.
b. Memory address register (MAR) - holds the address of the current instruction that is to be
fetched from memory, or the address in memory to which data is to be transferred.
c. Memory buffer register (MBR) - holds the contents found at the address held in the MAR, or data
which is to be transferred to main memory. It is also referred to as the memory data register
(MDR).
d. Current instruction register (CIR) - holds the instruction that is currently being decoded and
executed.
e. Accumulator (ACC) - holds the data being processed and the results of processing.
How the C.P.U Works
 Since creation and development, improvement of the CPU, Fetch, Decode and Execute are the
fundamental functions of the CPU.
The fetch-execute cycle
 The fetch-execute cycle (also known as fetch-decode-execute cycle) is followed by a processor to
process an instruction. The cycle consists of several stages .

1. The memory address held in the program counter is copied


into the MAR.
2. The address in the program counter is then incremented -
increased - by one. The program counter now holds the
address of the next instruction to be fetched.
3. The processor sends a signal along the address bus to the
memory address held in the MAR.
4. The instruction/data held in that memory address is sent
along the data bus to the MBR/MDR.
5. The instruction/data held in the MBR/MDR is copied into
the CIR.
6. The instruction/data held in the CIR is decoded and then
executed. Results of processing are stored in the ACC.
7. The cycle then returns to step one.
Factors affecting CPU performance
Even though today's processors are tremendously fast, their performance can be affected by a number
of factors like.:
 Clock speed
CPU clocks can sometimes be sped up slightly by the user. This process is known as overclocking.
The more pulses per second, the more fetch-decode-execute cycles that can be performed and the
more instructions that are processed in a given space of time. Overclocking can cause long term
damage to the CPU as it is working harder and producing more heat.
 Cache size
>>The bigger its cache, the less time a processor has to wait for instructions to be fetched.
 Number of cores
A processing unit within a CPU is known as a core. Each core is capable of fetching, decoding
and executing its own instructions.
The more cores a CPU has, the greater the number of instructions it can process in a given space
of time. Many modern CPUs are dual (two) or quad (four) core processors. This provides vastly
superior processing power compared to CPUs with a single core.
Example
Here is a worked example created using python.
Answer=2+3
To carry out this instruction the computer has to complete at least one fetch execute
cycle.
 Fetch : The control unit fetches the instruction “Add” and the data value (2,3) from
RAM.
 Decode: The control unit decode s the instruction, and send the signal to ALU,
telling it to add the numbers together.
 Execute : The ALU carries out the instructions, and add the two numbers together.
 Save: The ALU send back the result of the addition to the RAM, the result is saved
in the memory location with the label answer.
TOPICAL QUIZ

1) What is the difference between memory and storage?


__________________________________________________________________________
__________________________________________________________________________
2) List the four stages of the fetch , execute cycle.
__________________________________________________________________________
__________________________________________________________________________
3) Describe what happen during the “ execute “ stage of the fetch –execute cycle and
where it happens.
__________________________________________________________________________
__________________________________________________________________________
4) Explain why a computer with lots of RAM (memory )will generally go faster than a
similar computer with less RAM.
__________________________________________________________________________
__________________________________________________________________________

You might also like