SlideShare a Scribd company logo
COMPUTER ARCHITECTURE 2:
VON NEUMANN & MACHINE CYCLE
NANJING FOREIGN LANGUAGE SCHOOL
MR.KEMPERMAN
COMPUTER SCIENCE IB - SL
REVIEW: VON NEUMANN COMPUTER ARCHITECTURE
HOW EXACTLY DOES THIS WORK?
✓ Software is a set of
instructions that is executed in
a certain order
✓ Instruction can be arithmetic:
✓ 1 + 1 = 2
✓ Instruction can be logic:
✓ 1 > 2 → FALSE
✓ Both instructions are
EXECUTED by the ALU.
✓ In both cases the ALU needs
✓ Two parts :
✓ - Instruction to execute
✓ - Data to act one
✓ Data = input and output
✓ Instruction = what to do with
the data
HOW EXACTLY DOES THIS WORK?
- Software is stored in secondary memory,
usually a hard drive.
- When you run software, the instructions are
copied to primary memory, RAM. The OS
manages RAM and decides where the
instructions will be stored. Why?
- The CPU will execute in instructions is a
certain order. As we know the CPU has two
parts: CU and ALU.
- First, the Control Unit (CU) fetches the next
instruction from RAM for execution by the
ALU.
- Next, the Arithmetic Logic Unit (ALU) executes
the instruction.
- In the meantime the CU fetches the next
instruction for the ALU to execute next!
A SIMPLE EXAMPLE
• We want to run the following very simple
program:
• Instruction 1: 3 + 4 (arithmetic)
• Instruction 2: 3 > 9 (logic)
• Instruction 3: 3 / 2 (arithmetic)
• Instructions need to be executed in this order. CU
is in charge of execution order.
• Instructions are comprised of
• Input data (3, 4) called Operands
• The instruction itself (+, >, /) called Operator
• Output data (result, e.g. 7)
• Input, instruction and output are all stored in a
different memory locations in RAM (identified by a
memory address)
• So how would this work when you execute this program?
• All instructions copied from HDD to RAM (OS)
• CU fetches instruction 1 from RAM (both operands and operator)
• ALU executes instruction 1
• In the meantime CU fetches instruction 2
• ALU executes instruction 2
• In the meantime CU fetches instruction 3
• And so on! This is called the machine instruction cycle!
Two important comments to keep in mind:
ALU is a 4 year old boy and can only
execute 1 instruction at a time!
Its instruction set is limited!
CU has to tell him exactly what to do!
CU is his big sister!
Remember
me? I am the
ALU, a
toddler!
I can only
understand
basic
instructions.
I speak
ASSEMBLY !
All you do has
to be
translated to
MY language!
HUMANS VS COMPUTERS: DIFFERENT LANGUAGES
• We know that computers (a Von Neumann architecture!) can only understand binary. Every
ALU has a basic (different per processor!) set of instructions that it can execute. These
instructions are at the level of computer memory:
• Take value X from memory address FF0AB99F and value Y from memory address BBFF9012,
add them together and store result in memory address BBAFFABF. This language is called
assembly is native to a processor. This is called a low-level language (close to the machine!)
• Human beings (including programmers) use English and math based notation to write
programs, because it’s a language that humans can understand. Examples are Java, C#,C++,
Python and SQL. These are called high level languages.
• There is a translation necessary from high level to low level so the computer can execute
software!
What does RAM memory actually look like?
VON NEUMANN ARCHITECTURE IN MORE DEPTH:
FOUR LAYERS OF MEMORY:
- REGISTERS → CACHE → RAM → HDD
CACHE MEMORY: WHY?
• RAM is slow (means: read/write processing time to and
from this memory) compared to registers like MAR and
MDR. This is called READ/WRITE IO (stand for
Input/Output)
• To speed up the IO data and instructions are loaded from
RAM into Cache (L3,L2,L1) and than into registers.
• This speeds up the overall processing time of instructions
and data by the CPU.
• Cache is comprised of SRAM (Static RAM) modules.
• This is faster and more expensive than regular RAM that
uses DRAM (Dynamic RAM) modules.
• Three levels of cache
• L1 CACHE can be found within the CPU and is close to
the registers.
• L2 and L3 CACHES can be found near RAM memory
(primary memory that holds the data and instructions to
be processed)
• CACHE memory loads data and instructions that are
multiple times by the CPU and therefor doesn’t have to
be read from the slower RAM.
Registers involved in the execution of the Machine Instruction Cycle

More Related Content

Similar to Computer Architecture Machine Cycle (1).pdf

CPU
CPUCPU
fundamentals of digital communication unit 2 notes.pdf
fundamentals of digital communication  unit 2 notes.pdffundamentals of digital communication  unit 2 notes.pdf
fundamentals of digital communication unit 2 notes.pdf
shubhangisonawane6
 
Cpu & its execution of instruction
Cpu & its execution of instructionCpu & its execution of instruction
Cpu & its execution of instruction
baabtra.com - No. 1 supplier of quality freshers
 
3. basic organization of a computer
3. basic organization of a computer3. basic organization of a computer
3. basic organization of a computer
SHIKHA GAUTAM
 
Week3 v2 (1)
Week3 v2 (1)Week3 v2 (1)
Week3 v2 (1)
Irfan Ali Memon
 
CH - 4 central processing unit & memory devices.pptx
CH - 4 central processing unit & memory devices.pptxCH - 4 central processing unit & memory devices.pptx
CH - 4 central processing unit & memory devices.pptx
PragatiKachhi1
 
Week 01.pdf
Week 01.pdfWeek 01.pdf
Week 01.pdf
ChuadaryUsamaGujjar
 
Memory & the fetch decode-execute cycle
Memory & the fetch decode-execute cycleMemory & the fetch decode-execute cycle
Memory & the fetch decode-execute cycle
chantellemallia
 
Program execution
Program executionProgram execution
Program execution
peoplesmagnet
 
F453 computer science everything
F453 computer science everythingF453 computer science everything
F453 computer science everything
Mark Gibbs
 
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
shubhangisonawane6
 
Introduction to computers and programming languages
Introduction to computers and programming languages Introduction to computers and programming languages
Introduction to computers and programming languages
binoysatheesh
 
B.sc cs-ii -u-1.2 digital logic circuits, digital component
B.sc cs-ii -u-1.2 digital logic circuits, digital componentB.sc cs-ii -u-1.2 digital logic circuits, digital component
B.sc cs-ii -u-1.2 digital logic circuits, digital component
Rai University
 
digital logic circuits, digital component
digital logic circuits, digital componentdigital logic circuits, digital component
digital logic circuits, digital component
Rai University
 
Assembly Langauge Assembly Langauge Assembly Langauge
Assembly Langauge Assembly Langauge Assembly LangaugeAssembly Langauge Assembly Langauge Assembly Langauge
Assembly Langauge Assembly Langauge Assembly Langauge
mustafkhalid
 
Bca 2nd sem-u-1.2 digital logic circuits, digital component
Bca 2nd sem-u-1.2 digital logic circuits, digital componentBca 2nd sem-u-1.2 digital logic circuits, digital component
Bca 2nd sem-u-1.2 digital logic circuits, digital component
Rai University
 
Unix and its Components
Unix and its ComponentsUnix and its Components
Unix and its Components
SHUBHA CHATURVEDI
 
Software and Hardwew
Software and HardwewSoftware and Hardwew
Software and Hardwew
sbpatel199688
 
2 the computer system hardware
2  the computer system hardware2  the computer system hardware
2 the computer system hardware
arslanzafar13162
 
System Unit
System UnitSystem Unit
System Unit
chrispaul8676
 

Similar to Computer Architecture Machine Cycle (1).pdf (20)

CPU
CPUCPU
CPU
 
fundamentals of digital communication unit 2 notes.pdf
fundamentals of digital communication  unit 2 notes.pdffundamentals of digital communication  unit 2 notes.pdf
fundamentals of digital communication unit 2 notes.pdf
 
Cpu & its execution of instruction
Cpu & its execution of instructionCpu & its execution of instruction
Cpu & its execution of instruction
 
3. basic organization of a computer
3. basic organization of a computer3. basic organization of a computer
3. basic organization of a computer
 
Week3 v2 (1)
Week3 v2 (1)Week3 v2 (1)
Week3 v2 (1)
 
CH - 4 central processing unit & memory devices.pptx
CH - 4 central processing unit & memory devices.pptxCH - 4 central processing unit & memory devices.pptx
CH - 4 central processing unit & memory devices.pptx
 
Week 01.pdf
Week 01.pdfWeek 01.pdf
Week 01.pdf
 
Memory & the fetch decode-execute cycle
Memory & the fetch decode-execute cycleMemory & the fetch decode-execute cycle
Memory & the fetch decode-execute cycle
 
Program execution
Program executionProgram execution
Program execution
 
F453 computer science everything
F453 computer science everythingF453 computer science everything
F453 computer science everything
 
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 computers and programming languages
Introduction to computers and programming languages Introduction to computers and programming languages
Introduction to computers and programming languages
 
B.sc cs-ii -u-1.2 digital logic circuits, digital component
B.sc cs-ii -u-1.2 digital logic circuits, digital componentB.sc cs-ii -u-1.2 digital logic circuits, digital component
B.sc cs-ii -u-1.2 digital logic circuits, digital component
 
digital logic circuits, digital component
digital logic circuits, digital componentdigital logic circuits, digital component
digital logic circuits, digital component
 
Assembly Langauge Assembly Langauge Assembly Langauge
Assembly Langauge Assembly Langauge Assembly LangaugeAssembly Langauge Assembly Langauge Assembly Langauge
Assembly Langauge Assembly Langauge Assembly Langauge
 
Bca 2nd sem-u-1.2 digital logic circuits, digital component
Bca 2nd sem-u-1.2 digital logic circuits, digital componentBca 2nd sem-u-1.2 digital logic circuits, digital component
Bca 2nd sem-u-1.2 digital logic circuits, digital component
 
Unix and its Components
Unix and its ComponentsUnix and its Components
Unix and its Components
 
Software and Hardwew
Software and HardwewSoftware and Hardwew
Software and Hardwew
 
2 the computer system hardware
2  the computer system hardware2  the computer system hardware
2 the computer system hardware
 
System Unit
System UnitSystem Unit
System Unit
 

More from FerryKemperman

Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
FerryKemperman
 
Working with files (concepts/pseudocode/python)
Working with files (concepts/pseudocode/python)Working with files (concepts/pseudocode/python)
Working with files (concepts/pseudocode/python)
FerryKemperman
 
Top_down_programming..............................
Top_down_programming..............................Top_down_programming..............................
Top_down_programming..............................
FerryKemperman
 
OOP in Python, a beginners guide..........
OOP in Python, a beginners guide..........OOP in Python, a beginners guide..........
OOP in Python, a beginners guide..........
FerryKemperman
 
Search and Sort algorithms. Bubble, Insertion, Selection.
Search and Sort algorithms. Bubble, Insertion, Selection.Search and Sort algorithms. Bubble, Insertion, Selection.
Search and Sort algorithms. Bubble, Insertion, Selection.
FerryKemperman
 
Structured Query Language introduction..
Structured Query Language introduction..Structured Query Language introduction..
Structured Query Language introduction..
FerryKemperman
 
SDT introduction as given at MKIS, KL, 2023
SDT introduction as given at MKIS, KL, 2023SDT introduction as given at MKIS, KL, 2023
SDT introduction as given at MKIS, KL, 2023
FerryKemperman
 
Referential integrity in databases.pptx
Referential integrity in databases.pptxReferential integrity in databases.pptx
Referential integrity in databases.pptx
FerryKemperman
 

More from FerryKemperman (8)

Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Working with files (concepts/pseudocode/python)
Working with files (concepts/pseudocode/python)Working with files (concepts/pseudocode/python)
Working with files (concepts/pseudocode/python)
 
Top_down_programming..............................
Top_down_programming..............................Top_down_programming..............................
Top_down_programming..............................
 
OOP in Python, a beginners guide..........
OOP in Python, a beginners guide..........OOP in Python, a beginners guide..........
OOP in Python, a beginners guide..........
 
Search and Sort algorithms. Bubble, Insertion, Selection.
Search and Sort algorithms. Bubble, Insertion, Selection.Search and Sort algorithms. Bubble, Insertion, Selection.
Search and Sort algorithms. Bubble, Insertion, Selection.
 
Structured Query Language introduction..
Structured Query Language introduction..Structured Query Language introduction..
Structured Query Language introduction..
 
SDT introduction as given at MKIS, KL, 2023
SDT introduction as given at MKIS, KL, 2023SDT introduction as given at MKIS, KL, 2023
SDT introduction as given at MKIS, KL, 2023
 
Referential integrity in databases.pptx
Referential integrity in databases.pptxReferential integrity in databases.pptx
Referential integrity in databases.pptx
 

Recently uploaded

一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
74nqk8xf
 
DSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelinesDSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelines
Timothy Spann
 
一比一原版(Harvard毕业证书)哈佛大学毕业证如何办理
一比一原版(Harvard毕业证书)哈佛大学毕业证如何办理一比一原版(Harvard毕业证书)哈佛大学毕业证如何办理
一比一原版(Harvard毕业证书)哈佛大学毕业证如何办理
zsjl4mimo
 
Global Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headedGlobal Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headed
vikram sood
 
Challenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more importantChallenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more important
Sm321
 
The Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series DatabaseThe Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series Database
javier ramirez
 
一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理
一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理
一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理
74nqk8xf
 
Intelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicineIntelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicine
AndrzejJarynowski
 
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
Timothy Spann
 
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Aggregage
 
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging DataPredictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
Kiwi Creative
 
Experts live - Improving user adoption with AI
Experts live - Improving user adoption with AIExperts live - Improving user adoption with AI
Experts live - Improving user adoption with AI
jitskeb
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
nyfuhyz
 
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
nuttdpt
 
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
sameer shah
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
Roger Valdez
 
State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023
kuntobimo2016
 
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data LakeViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
Walaa Eldin Moustafa
 
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
nuttdpt
 

Recently uploaded (20)

一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
 
DSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelinesDSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelines
 
一比一原版(Harvard毕业证书)哈佛大学毕业证如何办理
一比一原版(Harvard毕业证书)哈佛大学毕业证如何办理一比一原版(Harvard毕业证书)哈佛大学毕业证如何办理
一比一原版(Harvard毕业证书)哈佛大学毕业证如何办理
 
Global Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headedGlobal Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headed
 
Challenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more importantChallenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more important
 
The Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series DatabaseThe Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series Database
 
一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理
一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理
一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理
 
Intelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicineIntelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicine
 
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
 
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
 
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging DataPredictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
 
Experts live - Improving user adoption with AI
Experts live - Improving user adoption with AIExperts live - Improving user adoption with AI
Experts live - Improving user adoption with AI
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
 
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
 
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
 
State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023
 
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data LakeViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
 
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
 

Computer Architecture Machine Cycle (1).pdf

  • 1. COMPUTER ARCHITECTURE 2: VON NEUMANN & MACHINE CYCLE NANJING FOREIGN LANGUAGE SCHOOL MR.KEMPERMAN COMPUTER SCIENCE IB - SL
  • 2. REVIEW: VON NEUMANN COMPUTER ARCHITECTURE
  • 3. HOW EXACTLY DOES THIS WORK? ✓ Software is a set of instructions that is executed in a certain order ✓ Instruction can be arithmetic: ✓ 1 + 1 = 2 ✓ Instruction can be logic: ✓ 1 > 2 → FALSE ✓ Both instructions are EXECUTED by the ALU. ✓ In both cases the ALU needs ✓ Two parts : ✓ - Instruction to execute ✓ - Data to act one ✓ Data = input and output ✓ Instruction = what to do with the data
  • 4. HOW EXACTLY DOES THIS WORK? - Software is stored in secondary memory, usually a hard drive. - When you run software, the instructions are copied to primary memory, RAM. The OS manages RAM and decides where the instructions will be stored. Why? - The CPU will execute in instructions is a certain order. As we know the CPU has two parts: CU and ALU. - First, the Control Unit (CU) fetches the next instruction from RAM for execution by the ALU. - Next, the Arithmetic Logic Unit (ALU) executes the instruction. - In the meantime the CU fetches the next instruction for the ALU to execute next!
  • 5. A SIMPLE EXAMPLE • We want to run the following very simple program: • Instruction 1: 3 + 4 (arithmetic) • Instruction 2: 3 > 9 (logic) • Instruction 3: 3 / 2 (arithmetic) • Instructions need to be executed in this order. CU is in charge of execution order. • Instructions are comprised of • Input data (3, 4) called Operands • The instruction itself (+, >, /) called Operator • Output data (result, e.g. 7) • Input, instruction and output are all stored in a different memory locations in RAM (identified by a memory address) • So how would this work when you execute this program? • All instructions copied from HDD to RAM (OS) • CU fetches instruction 1 from RAM (both operands and operator) • ALU executes instruction 1 • In the meantime CU fetches instruction 2 • ALU executes instruction 2 • In the meantime CU fetches instruction 3 • And so on! This is called the machine instruction cycle! Two important comments to keep in mind: ALU is a 4 year old boy and can only execute 1 instruction at a time! Its instruction set is limited! CU has to tell him exactly what to do! CU is his big sister!
  • 6.
  • 7.
  • 8. Remember me? I am the ALU, a toddler! I can only understand basic instructions. I speak ASSEMBLY ! All you do has to be translated to MY language!
  • 9. HUMANS VS COMPUTERS: DIFFERENT LANGUAGES • We know that computers (a Von Neumann architecture!) can only understand binary. Every ALU has a basic (different per processor!) set of instructions that it can execute. These instructions are at the level of computer memory: • Take value X from memory address FF0AB99F and value Y from memory address BBFF9012, add them together and store result in memory address BBAFFABF. This language is called assembly is native to a processor. This is called a low-level language (close to the machine!) • Human beings (including programmers) use English and math based notation to write programs, because it’s a language that humans can understand. Examples are Java, C#,C++, Python and SQL. These are called high level languages. • There is a translation necessary from high level to low level so the computer can execute software!
  • 10.
  • 11.
  • 12.
  • 13. What does RAM memory actually look like?
  • 14. VON NEUMANN ARCHITECTURE IN MORE DEPTH: FOUR LAYERS OF MEMORY: - REGISTERS → CACHE → RAM → HDD
  • 15.
  • 16.
  • 17.
  • 18. CACHE MEMORY: WHY? • RAM is slow (means: read/write processing time to and from this memory) compared to registers like MAR and MDR. This is called READ/WRITE IO (stand for Input/Output) • To speed up the IO data and instructions are loaded from RAM into Cache (L3,L2,L1) and than into registers. • This speeds up the overall processing time of instructions and data by the CPU. • Cache is comprised of SRAM (Static RAM) modules. • This is faster and more expensive than regular RAM that uses DRAM (Dynamic RAM) modules. • Three levels of cache • L1 CACHE can be found within the CPU and is close to the registers. • L2 and L3 CACHES can be found near RAM memory (primary memory that holds the data and instructions to be processed) • CACHE memory loads data and instructions that are multiple times by the CPU and therefor doesn’t have to be read from the slower RAM.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24. Registers involved in the execution of the Machine Instruction Cycle