0% found this document useful (0 votes)
26 views28 pages

Unit 3.components of A Computer System

Uploaded by

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

Unit 3.components of A Computer System

Uploaded by

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

UNIT 5: COMPUTER SYSTEM

Template designed by the eLearning Unit @Kab


Components of a computer system

A computer system is the collection of all the components


(hardware and software) that makes up a fully functional computer
CPU (Central Processing Unit):
▪ Control Unit: Directs operations within the CPU.
▪ ALU (Arithmetic Logic Unit): Performs calculations
and logical operations.
Memory: Stores data and instructions (RAM, cache).
I/O Devices: Facilitates interaction between the user
2
Illustration showing components of a computer
system.

3
Central Processing Unit (CPU)

 CPU stands for Central Processing Unit; it is also known as "the brain of the
computer". A CPU is a primary component of a computer that performs
most of the processing and controls the operation of all components
running inside a computer.

4
The operation or task that the CPU must perform

• Fetch Instruction: The CPU reads an instruction from memory.


• Interpret Instruction: The instruction is decoded to determine
what action is required.
• Fetch Data: The execution of an instruction may require reading
data from memory or I/O module.
• Process data: The execution of an instruction may require
performing some arithmetic or logical operation on data.
• Write data: The result of an execution may require writing data
to memory or an I/O module.
This is called the instruction cycle.
5
The operation or task that the CPU must perform

• Fetch Instruction: The CPU reads an instruction from memory.


• Interpret Instruction: The instruction is decoded to determine
what action is required.
• Fetch Data: The execution of an instruction may require reading
data from memory or I/O module.
• Process data: The execution of an instruction may require
performing some arithmetic or logical operation on data.
• Write data: The result of an execution may require writing data
to memory or an I/O module.
This is called the instruction cycle.
6
Instruction Cycle

Definition: The cycle a CPU follows to process


each instruction, also known as the Fetch-Decode-
Execute Cycle.
Steps
1.Fetch: The CPU retrieves an instruction from
memory.
2.Decode: The control unit interprets the fetched
instruction.
3.Execute: The CPU executes the instruction,
which may involve arithmetic operations, data
transfer, or I/O operations.
4.Store (optional): The result is written back to
memory or registers.
7
Components of CPU

 Control Unit (CU)

 ALU (Arithmetic Logic Unit)

 Registers

 Cache

8
Control Unit (CU)

 A major role of a control unit is to manage and execute


instructions to perform the tasks specified by a computer
program.
 It directs all the operations of the computer by interpreting
instructions from programs and converting them into signals that
control other parts of the computer.

9
Functions of Control Unit

 Instruction Fetch − A CU fetches instructions from RAM (Random Access


Memory).
 Instruction Decoding − It decodes the fetched instructions to operate.
 Instruction Execution − A CU sends control signals to perform operations like
ALU for arithmetic and logical operations.
 Control Flow Management − It controls flow by updating the programme counter.
 Exception Handling − A control unit effectively manages exceptions and
interruptions like hardware failures, system calls, and external events, by
appropriately diverting the control flow of the CPU to the planned procedure for
managing such exceptions.
 Synchronization − A CU plays a crucial role in facilitating the coordination of
instruction execution across several cores.
10
Arithmetic Logic Unit (ALU)

 The Arithmetic Logic Unit (ALU) is a component that has been extensively
optimised and engineered to do multiple tasks concurrently.
 It is commonly built to execute operations speedily.

 It works in conjunction with other CPU components, such as registers,


memory, and control units, to execute complex instructions.

11
Functions of an ALU

 Arithmetic Operations − The ALU can perform basic arithmetic

operations. addition, subtraction, multiplication and division.


 Logic Operations − The ALU can also perform logical operations like AND,
OR, NOT, XOR, and bit-shifting operations

12
Registers

 These are small, fast storage locations within the CPU that
temporarily hold data and instructions that the CPU is currently
processing.
 These registers store data in the form of memory address and
after the processing of the instruction present at that memory
address is completed, it stores the memory address of the next
instruction
13
Cache

 The cache is a smaller, faster type of volatile memory that stores


small amounts of data and instructions temporarily which can be
reused as and when required.
 It reduces the amount of time needed to fetch the instructions as
instead of fetching it from the RAM, it can be directly accessed
from Cache in a small amount of time.

14
CPU connection

▪ The CPU is connected to the rest of the system through


system bus.
▪ Through system bus, data or information gets transferred
between the CPU and the other component of the system.

15
The system bus components:

▪ Data Bus: Data bus is used to transfer the data between main
memory and CPU.
▪ Address Bus: Address bus is used to access a particular
memory location by putting the address of the memory location.
▪ Control Bus: This bus carries control signals that manage and
coordinate the activities of the computer. It ensures that data is
transferred correctly and prevents data

16
Memory

 A memory is a hardware component which is used to store and access the


data whenever required. Majorly; computer memory is categorised into two
parts i.e.

i. Primary Memory (RAM)

ii. Secondary Memory (Hard Disk)

17
Primary Memory

 RAM is also known as primary or temporary memory; it is a type of volatile


memory used for temporarily storing data.
 The contents inside the RAM are erased when the computer’s power gets
off or restarted.
 RAM is actively used for program or instruction execution.
 Once we start the computer; system necessary files, programs and
operating system files are loaded into the RAM for the smooth running of
the computer.
 The more RAM a computer has, the better it can handle multitasking and
the faster it can run applications since data can be accessed more quickly.

18
Secondary storage (Hard Drives, SSDs, Flash Drives,
etc)
 Secondary Storage devices are used to store the data permanently, even
when the computer is powered off.
 They are non-volatile (the data remains intact even when the power is
turned off or the system restarts)
 The most popular and commonly used storage devices are Hard disks
(HDs), Solid-State Drives (SSDs), USB flash drives, and optical disks (e.g.,
DVDs), pen drives.

19
Input devices

 An input device is any hardware device that sends data to a


computer, allowing you to interact with and control it

20
Out put devices

▪ An output device is any peripheral that receives data from a


computer, usually for display, projection, or physical
reproduction.

21
Instruction Pipeline
▪ An instruction pipeline reads consecutive instructions from memory while in the other
segments, the previous instructions are being implemented. Most of the digital computers
with complex instructions require instruction pipeline to carry out operations like fetch,
decode and execute instructions.
In general, the computer needs to process each instruction with the following sequence
of steps

1. Fetch instruction from memory.

2. Decode the instruction.

3. Calculate the effective address.

4. Fetch the operands from memory.

5. Execute the instruction.

22
6. Store the result in the proper place.
Cont.…..

 Each step is executed in a particular segment, and there are times when
different segments may take different times to operate on the incoming
information. Moreover, there are times when two or more segments may
require memory access at the same time, causing one segment to wait until
another is finished with the memory.
 The organization of an instruction pipeline will be more efficient if the
instruction cycle is divided into segments of equal duration. One of the most
common examples of this type of organization is a Four-segment
instruction pipeline.
 A four-segment instruction pipeline combines two or more different
segments and makes it as a single one. For instance, the decoding of the
instruction can be combined with the calculation of the effective address
23 into one segment.
Block diagram showing a typical example of a four-
segment instruction pipeline

24
Explanation of the above block diagram

Segment 1
 The instruction fetch segment can be executed using a first-in, first-out
(FIFO) buffer.
Segment 2
 The instruction fetched from memory is decoded in the second segment.
The effective address is computed in an independent arithmetic circuit.
Segment 3
 An operand from memory is fetched in the third segment.
Segment 4
 The instructions are finally implemented in the final segment of the pipeline
organization.
25
General functions of the CPU

 The CPU performs arithmetic and logic operations.

 It directs the operation of the processor.

 It directs Input and output units that how to respond to the instructions that
have been communicated to the processor.
 A CPU contains registers which are considered small storage locations
within the CPU to hold data temporarily during execution of a program.
 A CPU executes instructions by fetching them from memory, decodes them,
and then executes them.
26
Reading assignment

 About the various types of registers.

27
Thank you

Thoughts? Suggestions?

28
Template by the eLearning Unit @Kab

You might also like