SlideShare a Scribd company logo
1 of 20
Lecture 3
Computer System Architecture
Definition and Importance
• Definition: Computer Architecture encompasses the structure and behavior
of a computer system, defining its components and their interactions.
• Importance: Understanding it is crucial for designing efficient systems and
optimizing performance in various applications, from personal computing to
large-scale data centers.
Historical Background
• Long ago, people used simple machines like abacuses to do math.
• Then, during World War II, engineers built huge machines called computers
to help with complex calculations.
• After the war, computers became smaller and more powerful.
• This led to the birth of modern computers, like the ones we use today.
Computer Hardware
• Computer hardware refers to the physical parts of a computer that you can
touch and see, like the monitor, keyboard, and mouse.
• It also includes the internal components, such as the processor, memory, and
storage devices, which work together to perform tasks and run software on
the computer.
Computer Hardware
• Monitor: Displays images and text output from the computer.
• Keyboard: Input device used to type text and commands into the computer.
• Mouse: Pointing device used to navigate and interact with graphical user interfaces.
• Central Processing Unit (CPU): Brain of the computer, performs calculations
and executes instructions.
• Random Access Memory (RAM): Temporary storage that holds data and
instructions that the CPU needs to access quickly.
• Hard Disk Drive (HDD) or Solid State Drive (SSD): Stores data and software
programs permanently on the computer.
Computer Hardware
• Graphics Processing Unit (GPU): Specialized hardware for rendering
graphics and images.
• Motherboard: Main circuit board that connects and integrates all the
computer components.
• Power Supply Unit (PSU): Converts electrical power from an outlet into
usable power for the computer.
• Network Interface Card (NIC): Allows the computer to connect to a
network for communication with other devices and the internet.
CPU
• The CPU, or Central Processing Unit, is like the brain of a computer. It
processes instructions and performs calculations that make software
programs work.
• It's made up of small electronic components called transistors.
• The CPU's speed and power determine how quickly and efficiently the
computer can run programs and tasks.
Main Parts of CPU
• The main parts of CPU are
• ALU (arithmetic logical unit)
• CU(control unit)
• Registers
• Cache Memory
• Clock
Main Parts of CPU
• ALU:
• The Arithmetic Logic Unit (ALU) is like the calculator of a computer,
performing math and logic operations.
• It adds, subtracts, compares numbers, and performs logical operations like
AND, OR, and NOT.
• ALU's calculations help the CPU execute tasks and process data, making it a
crucial component for computing operations.
Main Parts of CPU
• CU:
• The Control Unit (CU) acts as the manager of the CPU, overseeing the
execution of instructions.
• It fetches instructions from memory, decodes them into signals the computer
can understand, and coordinates the flow of data between the CPU's
components.
• The CU ensures tasks are carried out in the correct sequence, enabling the
CPU to operate efficiently.
Registers
• Registers are small, high-speed storage areas within the CPU used to temporarily hold data and
instructions during processing. Some common types of registers include:
• Program Counter (PC): Keeps track of the memory address of the next instruction to be
fetched and executed.
• Instruction Register (IR): Stores the current instruction being executed by the CPU.
• Memory Address Register (MAR): Holds the memory address of data to be fetched or stored
in the main memory.
• Memory Data Register (MDR): Stores the data being transferred to or from the main memory.
• Accumulator (ACC): Stores intermediate arithmetic and logic operation results during
processing. It's commonly used in many arithmetic operations and logical comparisons.
Cache Memory
• Cache memory is a high-speed storage located close to the CPU, storing
frequently accessed data and instructions for rapid retrieval.
• It serves as a temporary buffer between the CPU and main memory,
reducing access time and improving system performance.
• Cache memory helps speed up processing by providing quick access to
frequently used information.
Clock
• The computer's clock is like its heartbeat, ticking at a constant speed.
• It helps different parts of the computer work together by coordinating when
tasks happen.
• Faster clocks mean quicker processing.
• The clock's speed, measured in Hertz, determines how fast the computer can
do things, like running programs and responding to commands.
CPU instruction cycle
• The CPU instruction cycle, also known as the machine cycle, is the sequence
of steps executed by the CPU to fetch, decode, execute, and potentially write
back an instruction from memory.
• It represents the fundamental process through which instructions are
processed and executed within the CPU.
CPU instruction Cycle
CPU instruction cycle
• Fetch: Obtain the next instruction from memory, transferring it to the CPU
for further processing and execution.
• Decode: Interpret the fetched instruction to understand its intended
operation or action within the CPU.
• Execute: Perform the operation or action specified by the decoded
instruction, manipulating data or controlling processes.
• Write back: Store the result of the executed instruction, updating memory
or CPU registers with the outcome of the operation.
Understanding the instruction cycle
• Scenario:
• Imagine you have a simple calculator with a display screen. You press the
number "5" followed by the addition sign "+" and then the number "3".
Afterward, you hit the "equals" button "=" to get the result.
• Question:
• Explain how the CPU instruction cycle works using the scenario of using the
calculator. Identify the steps involved in the CPU instruction cycle.
Solution to above problem
• Fetch: Imagine you press the number "5". The CPU fetches the instruction related to the number "5" from
memory.
• Decode: The CPU interprets the fetched instruction as "display the number 5".
• Execute: The CPU performs the operation, displaying the number "5" on the calculator screen.
• Fetch: When you press the addition sign "+", the CPU fetches the instruction related to addition.
• Decode: The CPU interprets the fetched instruction as "perform addition".
• Execute: The CPU adds the numbers "5" and "3".
• Fetch: The CPU fetches the instruction for displaying the result.
• Decode: The CPU interprets the fetched instruction as "display the result".
• Execute: The CPU displays the result, which is "8", on the calculator screen.
Another example
• Scenario:
• Consider a simple computer program that adds two numbers: 10 and 20. The
program is stored in the computer's memory. The CPU fetches the
instructions, executes the addition, and writes back the result to memory.
• Question:
• Describe the CPU instruction cycle involved in executing the addition of 10
and 20, including the "write back" step.
Solution
• Fetch: The CPU fetches the instruction to add two numbers from memory.
• Decode: The CPU deciphers the fetched instruction as an addition
operation.
• Execute: The CPU performs the addition of 10 and 20, resulting in 30.
• Write back: The CPU writes back the result (30) to the specified memory
location for storage or further processing.

More Related Content

Similar to Lecture 3 Computer architecture-cpu.pptx

pre phd class 1.pptx
pre phd class 1.pptxpre phd class 1.pptx
pre phd class 1.pptx
RbiGradeB
 
bachlor of computer application pc assembly and troubleshooting
bachlor of computer application pc assembly and troubleshootingbachlor of computer application pc assembly and troubleshooting
bachlor of computer application pc assembly and troubleshooting
KUSHSHARMA630049
 
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
Abhishekn84
 

Similar to Lecture 3 Computer architecture-cpu.pptx (20)

diploma basic of computers.ppt
diploma basic of computers.pptdiploma basic of computers.ppt
diploma basic of computers.ppt
 
HHCJ AMUMARA: COMPUTER STUDIES LECTURE NOTE FOR SS2-001
HHCJ AMUMARA: COMPUTER STUDIES LECTURE NOTE FOR SS2-001HHCJ AMUMARA: COMPUTER STUDIES LECTURE NOTE FOR SS2-001
HHCJ AMUMARA: COMPUTER STUDIES LECTURE NOTE FOR SS2-001
 
Central Processing Unit-6.pptx
Central Processing Unit-6.pptxCentral Processing Unit-6.pptx
Central Processing Unit-6.pptx
 
The cpu cycle
The cpu cycleThe cpu cycle
The cpu cycle
 
Chapter1 introduction to computer systems
Chapter1 introduction to computer systemsChapter1 introduction to computer systems
Chapter1 introduction to computer systems
 
CPU Architecture - Basic
CPU Architecture - BasicCPU Architecture - Basic
CPU Architecture - Basic
 
2 the computer system hardware
2  the computer system hardware2  the computer system hardware
2 the computer system hardware
 
Science computer processor
Science computer processorScience computer processor
Science computer processor
 
computer devices and memory unit 2 notes.pdf
computer devices and memory unit 2 notes.pdfcomputer devices and memory unit 2 notes.pdf
computer devices and memory unit 2 notes.pdf
 
Introduction to Computer System
Introduction to Computer System Introduction to Computer System
Introduction to Computer System
 
introduction COA(M1).pptx
introduction COA(M1).pptxintroduction COA(M1).pptx
introduction COA(M1).pptx
 
pre phd class 1.pptx
pre phd class 1.pptxpre phd class 1.pptx
pre phd class 1.pptx
 
Computer Architecture
Computer ArchitectureComputer Architecture
Computer Architecture
 
bachlor of computer application pc assembly and troubleshooting
bachlor of computer application pc assembly and troubleshootingbachlor of computer application pc assembly and troubleshooting
bachlor of computer application pc assembly and troubleshooting
 
Computer architecture pptx
Computer architecture pptxComputer architecture pptx
Computer architecture pptx
 
Lec 4 oraganization
Lec 4 oraganizationLec 4 oraganization
Lec 4 oraganization
 
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
 
Central Processing Unit (Cpu)kurdish
Central Processing Unit (Cpu)kurdishCentral Processing Unit (Cpu)kurdish
Central Processing Unit (Cpu)kurdish
 
Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1)
 
Basic Computer Skills.pptx
Basic Computer Skills.pptxBasic Computer Skills.pptx
Basic Computer Skills.pptx
 

Recently uploaded

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 

Lecture 3 Computer architecture-cpu.pptx

  • 2. Definition and Importance • Definition: Computer Architecture encompasses the structure and behavior of a computer system, defining its components and their interactions. • Importance: Understanding it is crucial for designing efficient systems and optimizing performance in various applications, from personal computing to large-scale data centers.
  • 3. Historical Background • Long ago, people used simple machines like abacuses to do math. • Then, during World War II, engineers built huge machines called computers to help with complex calculations. • After the war, computers became smaller and more powerful. • This led to the birth of modern computers, like the ones we use today.
  • 4. Computer Hardware • Computer hardware refers to the physical parts of a computer that you can touch and see, like the monitor, keyboard, and mouse. • It also includes the internal components, such as the processor, memory, and storage devices, which work together to perform tasks and run software on the computer.
  • 5. Computer Hardware • Monitor: Displays images and text output from the computer. • Keyboard: Input device used to type text and commands into the computer. • Mouse: Pointing device used to navigate and interact with graphical user interfaces. • Central Processing Unit (CPU): Brain of the computer, performs calculations and executes instructions. • Random Access Memory (RAM): Temporary storage that holds data and instructions that the CPU needs to access quickly. • Hard Disk Drive (HDD) or Solid State Drive (SSD): Stores data and software programs permanently on the computer.
  • 6. Computer Hardware • Graphics Processing Unit (GPU): Specialized hardware for rendering graphics and images. • Motherboard: Main circuit board that connects and integrates all the computer components. • Power Supply Unit (PSU): Converts electrical power from an outlet into usable power for the computer. • Network Interface Card (NIC): Allows the computer to connect to a network for communication with other devices and the internet.
  • 7. CPU • The CPU, or Central Processing Unit, is like the brain of a computer. It processes instructions and performs calculations that make software programs work. • It's made up of small electronic components called transistors. • The CPU's speed and power determine how quickly and efficiently the computer can run programs and tasks.
  • 8. Main Parts of CPU • The main parts of CPU are • ALU (arithmetic logical unit) • CU(control unit) • Registers • Cache Memory • Clock
  • 9. Main Parts of CPU • ALU: • The Arithmetic Logic Unit (ALU) is like the calculator of a computer, performing math and logic operations. • It adds, subtracts, compares numbers, and performs logical operations like AND, OR, and NOT. • ALU's calculations help the CPU execute tasks and process data, making it a crucial component for computing operations.
  • 10. Main Parts of CPU • CU: • The Control Unit (CU) acts as the manager of the CPU, overseeing the execution of instructions. • It fetches instructions from memory, decodes them into signals the computer can understand, and coordinates the flow of data between the CPU's components. • The CU ensures tasks are carried out in the correct sequence, enabling the CPU to operate efficiently.
  • 11. Registers • Registers are small, high-speed storage areas within the CPU used to temporarily hold data and instructions during processing. Some common types of registers include: • Program Counter (PC): Keeps track of the memory address of the next instruction to be fetched and executed. • Instruction Register (IR): Stores the current instruction being executed by the CPU. • Memory Address Register (MAR): Holds the memory address of data to be fetched or stored in the main memory. • Memory Data Register (MDR): Stores the data being transferred to or from the main memory. • Accumulator (ACC): Stores intermediate arithmetic and logic operation results during processing. It's commonly used in many arithmetic operations and logical comparisons.
  • 12. Cache Memory • Cache memory is a high-speed storage located close to the CPU, storing frequently accessed data and instructions for rapid retrieval. • It serves as a temporary buffer between the CPU and main memory, reducing access time and improving system performance. • Cache memory helps speed up processing by providing quick access to frequently used information.
  • 13. Clock • The computer's clock is like its heartbeat, ticking at a constant speed. • It helps different parts of the computer work together by coordinating when tasks happen. • Faster clocks mean quicker processing. • The clock's speed, measured in Hertz, determines how fast the computer can do things, like running programs and responding to commands.
  • 14. CPU instruction cycle • The CPU instruction cycle, also known as the machine cycle, is the sequence of steps executed by the CPU to fetch, decode, execute, and potentially write back an instruction from memory. • It represents the fundamental process through which instructions are processed and executed within the CPU.
  • 16. CPU instruction cycle • Fetch: Obtain the next instruction from memory, transferring it to the CPU for further processing and execution. • Decode: Interpret the fetched instruction to understand its intended operation or action within the CPU. • Execute: Perform the operation or action specified by the decoded instruction, manipulating data or controlling processes. • Write back: Store the result of the executed instruction, updating memory or CPU registers with the outcome of the operation.
  • 17. Understanding the instruction cycle • Scenario: • Imagine you have a simple calculator with a display screen. You press the number "5" followed by the addition sign "+" and then the number "3". Afterward, you hit the "equals" button "=" to get the result. • Question: • Explain how the CPU instruction cycle works using the scenario of using the calculator. Identify the steps involved in the CPU instruction cycle.
  • 18. Solution to above problem • Fetch: Imagine you press the number "5". The CPU fetches the instruction related to the number "5" from memory. • Decode: The CPU interprets the fetched instruction as "display the number 5". • Execute: The CPU performs the operation, displaying the number "5" on the calculator screen. • Fetch: When you press the addition sign "+", the CPU fetches the instruction related to addition. • Decode: The CPU interprets the fetched instruction as "perform addition". • Execute: The CPU adds the numbers "5" and "3". • Fetch: The CPU fetches the instruction for displaying the result. • Decode: The CPU interprets the fetched instruction as "display the result". • Execute: The CPU displays the result, which is "8", on the calculator screen.
  • 19. Another example • Scenario: • Consider a simple computer program that adds two numbers: 10 and 20. The program is stored in the computer's memory. The CPU fetches the instructions, executes the addition, and writes back the result to memory. • Question: • Describe the CPU instruction cycle involved in executing the addition of 10 and 20, including the "write back" step.
  • 20. Solution • Fetch: The CPU fetches the instruction to add two numbers from memory. • Decode: The CPU deciphers the fetched instruction as an addition operation. • Execute: The CPU performs the addition of 10 and 20, resulting in 30. • Write back: The CPU writes back the result (30) to the specified memory location for storage or further processing.