0% found this document useful (0 votes)
24 views

Lecture-3

The document provides an overview of the basic parts of a computer, focusing on hardware, software, people, and data. It details the Central Processing Unit (CPU), its components such as the Control Unit and Arithmetic Logic Unit, and the machine cycle process. Additionally, it explains memory types, including primary and secondary memory, and the role of CPU registers in data processing.

Uploaded by

mianajmal0989
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)
24 views

Lecture-3

The document provides an overview of the basic parts of a computer, focusing on hardware, software, people, and data. It details the Central Processing Unit (CPU), its components such as the Control Unit and Arithmetic Logic Unit, and the machine cycle process. Additionally, it explains memory types, including primary and secondary memory, and the role of CPU registers in data processing.

Uploaded by

mianajmal0989
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/ 23

Parts of Computer

ITC/CS/SE-301
Lecture – 3
By
Sir, Amir Ali
Information Technology Center
Sindh Agriculture University, Tandojam
Basic Parts of Computer

 Hardware
 Software
 People
 Data
Hardware
 Input unit
 Output Unit
 CPU
 Storage
What is Central Processing Unit CPU?
Understanding the Brain of the Computer

• The CPU (Central Processing Unit) is the primary component of a computer


that performs most of the processing inside the computer.
• It executes program instructions and data and controls all the devices within
the machine
• Often referred to as the "brain" of the computer.]
Central Processing Unit (CPU)

 It is where all the searching, sorting, calculating and decision making


takes place

 The CPU collects all of the raw data from various input devices (such a
keyboard or mouse) and converts it into useful information by carrying
out software instructions.

 The result of all that work is then sent to output devices such as
monitors and printers.
Types of CPUs

• Single-Core: One processing unit.


• Dual-Core: Two processing units.
• Quad-Core: Four processing units.
• Multi-Core: Multiple processing units for better performance.

• A common CPU today runs at around minimum 3.0 GHz or more.


• The Intel Pentium processor and the Athlon are examples of a CPU.
CPU Parts! helper of the CPU
The Control Unit (CU)
• The Control Unit is responsible for directing the flow of data and instructions within
the CPU and between the CPU and other components of the computer (e.g.,
memory, input/output devices).
• It ensures that instructions are executed in the correct sequence and that all parts of
the computer work together harmoniously.
How the Control Unit Works
The Control Unit operates in a cycle known as the Fetch-Decode-Execute Cycle:

1. Fetch: Retrieves the next instruction from memory.


2. Decode: Interprets the instruction and generates control signals.
3. Execute: Sends signals to the appropriate components to perform the operation.

This cycle repeats continuously as long as the computer is running.


CPU Performance Factors

Key Factors:
• Clock Speed: Measured in GHz (gigahertz), determines how many cycles per
second the CPU can execute.
• Cores: More cores allow for multitasking and faster processing.
• Cache Size: Larger cache improves speed by storing more data close to the
CPU.
• Thermal Design Power (TDP): Indicates heat output and power consumption.
ALU (Arithmetic and Logic Unit)

 The ALU is a fundamental component of a computer's CPU.


 It performs arithmetic and logical operations on binary data.

Functions:
Arithmetic Operations:

 Addition, subtraction, multiplication, and division.

Logical Operations:

 AND, OR, NOT, XOR, and comparisons (e.g., greater than, less than).
Arithmetic and Logic Unit

Comparison
(greater than, equal
to, or less than)

Arithmetic Logical
(addition, subtraction, (AND, OR,
multiplication, and NOT)
division)
Machine Cycle
 The basic operation performed by a CPU to execute an instruction.
 It consists of a series of steps required to fetch, decode, and execute an instruction.

Steps involved in Machine Cycle:


1.Fetch:
•The CPU retrieves the instruction from memory (RAM).
•The Program Counter (PC) holds the address of the next instruction to be fetched.

2.Decode:
•The fetched instruction is decoded by the Control Unit.
•The CPU determines what operation needs to be performed.

3.Execute:
•The CPU performs the operation using the ALU (Arithmetic Logic Unit) or other components.
•Data may be read from or written to memory during this step.

4.Store (Optional):
•The result of the operation is stored in memory or a register.
Machine Cycle
Key Components Involved:

 Program Counter (PC): Tracks the address of the next instruction.


 Instruction Register (IR): Holds the fetched instruction.
 Control Unit (CU): Manages the execution of instructions.
 ALU: Performs arithmetic and logical operations.
Memory
Types of Memory
 Primary Memory (Main Memory):
 Volatile (loses data when power is turned off).
 Directly accessible by the CPU.
 Examples:
 RAM (Random Access Memory):
 Stores data and instructions temporarily while the computer is running.
 Faster than secondary memory but limited in size.
 ROM (Read-Only Memory):
 Non-volatile memory that stores firmware or boot instructions.
 Data cannot be easily modified.
Memory
Secondary Memory (Storage Memory):

 Non-volatile (retains data even when power is off).


 Used for long-term storage of data and programs.
 Examples:

 HDD (Hard Disk Drive):


Magnetic storage with large capacity but slower access speeds.

 SSD (Solid State Drive):


Faster than HDD, no moving parts, and more durable.

 USB Drives, CDs, DVDs:


Portable storage devices.

Cache Memory:
 Small, high-speed memory located close to the CPU.
 Stores frequently accessed data for faster retrieval.
 Levels: L1 (fastest), L2, and L3 (larger but slower).
Memory
Functions of Memory

 Stores data and instructions required for processing.


 Enables the CPU to access information quickly.
 Acts as a bridge between the CPU and storage devices.

Importance of Memory
 Determines the performance and multitasking capability of a computer.
 Allows quick access to data, reducing CPU idle time.
 Essential for running applications and storing user data.
Relationship between

CPU → Cache Memory → RAM → Secondar


MU(Memory Unit )
 The memory unit is the part of a computer that holds data and instructions for
processing.
 It acts as a bridge between the CPU and storage devices, ensuring quick access to
information.

1.Store Data and Instructions:


 Holds input data, intermediate results, and final output.
 Stores program instructions for the CPU to execute.

2.Enable Fast Access:


 Provides quick access to data and instructions for the CPU.
 Reduces the time the CPU spends waiting for data.

3. Facilitate Multitasking:
 Allows multiple programs to run simultaneously by storing their data and
instructions.
CPU Register
 Registers are the fastest type of memory in a computer, located directly within the
CPU.
 They store data, instructions, and addresses that the CPU is currently processing.

Functions of CPU Registers

1.Temporary Storage:
 Hold data and instructions that the CPU is actively using.

2.Speed Optimization:
 Provide the CPU with quick access to frequently used data.

3.Instruction Execution:
 Store operands, intermediate results, and memory addresses during processing.

4.Control Operations:
 Help manage program flow and control tasks (e.g., Program Counter).
Types of CPU Register
1. General-Purpose Registers:
 Used for storing data and intermediate results during calculations.
 Examples: AX, BX, CX, DX (in x86 architecture).

2. Special-Purpose Registers:

 Dedicated to specific tasks.


 Examples:

1. Program Counter (PC):


Holds the address of the next instruction to be executed.
2. Instruction Register (IR):
Stores the currently executing instruction.
3. Memory Address Register (MAR):
Holds the address of a memory location to be accessed.
4. Memory Data Register (MDR):
1. Temporarily stores data being transferred to or from memory.
Types of CPU Register
1. Stack Pointer (SP):
Points to the top of the stack in memory.

2. Status Register (Flag Register):


Stores information about the state of the CPU (e.g., overflow, carry, zero
flags).

1. Floating-Point Registers:

1. Used for storing floating-point numbers during arithmetic operations.

You might also like