SlideShare a Scribd company logo
John Jose
Associate Professor
Department of Computer Science & Engineering
Indian Institute of Technology Guwahati
Instruction Execution Principles
CS223 Computer Architecture & Organization
Computer Organization vs Architecture
❖ Computer Organization
❖The actual implementation of a computer in hardware
❖Transparent to programmer
❖How to do? (Implementation, Interaction between units)
❖ Computer Architecture
❖The view of a computer to software designers
❖Programmer needs architectural details
❖What to do? (Instruction Set, Addressing Modes, Data Types..)
Inside a Computer System
Computer
Memory Hard disk
Keyboard
Mouse
Monitor
Printer
Functional Units of a Computer
Von Neumann Architecture
❖ The program instructions are stored
in memory and are fetched upon
requirement to the CPU for
executing.
❖ Memory is a collection of locations
for storing instructions and data.
❖ Each location has a unique address
which is used to access the
location.
Execution Cycle
Obtain instruction from memory
Determine required actions and instruction size
Locate and obtain operand data
Compute result value or status
Deposit results in memory for later use
Determine successor instruction
Instruction Fetch
Instruction Decode
Operand Fetch
Execute
Result Store
Next Instruction
Processor Memory Interaction
Instruction Execution
Control
Unit ALU
Memory
DECODE EXECUTE
Inside the CPU
memory
address
register
Inside the CPU
memory
address
register
memory
data
register
Inside the CPU
memory
address
register
memory
data
register
program
counter
Inside the CPU
memory
address
register
instruction
register
memory
data
register
program
counter
Inside the CPU
memory
address
register
instruction
register
memory
data
register
program
counter
arithmetic
logic unit
Inside the CPU
memory
address
register
instruction
register
memory
data
register
program
counter
accumulator
arithmetic
logic unit
Inside the CPU
memory
address
register
instruction
register
memory
data
register
program
counter
accumulator
arithmetic
logic unit
system
clock
Inside the CPU
1. Address of the next instruction is
transferred from PC to MAR
2. The instruction is located in memory
FETCH the instruction
❖ Address generated by the CPU
comes out to address bus through
MAR.
❖ Address bus is connected to Address
decoder.
FETCH the instruction
1. Address of the next instruction is
transferred from PC to MAR
2. The instruction is located in memory
3. Instruction is copied from to MDR
DECODE the instruction
1. Address of the next instruction is
transferred from PC to MAR
2. The instruction is located in memory
3. Instruction is copied from to MDR
4. Instruction is moved to IR for decoding
EXECUTE the instruction
1. Address of the next instruction is
transferred from PC to MAR
2. The instruction is located in memory
3. Instruction is copied from to MDR
4. Instruction is moved to IR for decoding
5. Control unit sends signals to appropriate
devices to cause execution of the instruction
How memory works?
Address Decoders
❖ One memory location is a collection of 8 bits
❖ Each unique address maps to a Byte
Address Bits and Addressability
❖ Memory consist of collection of locations
❖ 1 location is generally 1 Byte
❖ Each location has a unique address
❖ 1 bit can uniquely address 2 Bytes [0, 1]
❖ 2 bits can uniquely address 4 Bytes
00, 01, 10, 11 are the 4 unique addresses
❖ As number of bits in address increases
physical address space also increases.
8 bits = 1 Byte
1024 Bytes = 1 Kilobyte (KB)
1024 Kilobyte = 1 Megabyte (MB)
1024 Megabyte = 1 Gigabyte (GB)
1024 Gigabyte = 1 Terabyte (TB)
Larger Memory Naming Conventions
❖ Kilobyte, megabyte, gigabyte
❖ How many bytes can be addressed using 8-bit address? : 28=256 Bytes
❖ 64KB→26.210 Bytes → 216 Bytes → 16 bit address
❖ 4GB, 4GB→22.230 Bytes → 232 Bytes → 32 bit address
How to make large memory?
8 KB = 8 x 1 KB chips
512 B = 4 x 128 B chips
❖ Given a 128 B memory units, how will you create 512 B memory?
❖ 512 B → 9 bits for address, memory units are 128 B, →7 bit address.
Byte Ordering
Byte Ordering
A 32-bit number 0x23456789 has to be written to memory (collection of
bytes) from location 2000 onwards. What is the value stored in location
2001, if the system follows, (a) big endian format and (b) little endian format?
Address Contents
2000 0x23
2001 0x45
2002 0x67
2003 0x89
2004
Address Contents
2000 0x89
2001 0x67
2002 0x45
2003 0x23
2004
Big Endian Little Endian
johnjose@iitg.ac.in
http://www.iitg.ac.in/johnjose/
johnjose@iitg.ac.in
http://www.iitg.ac.in/johnjose/

More Related Content

PPT
Memory & the fetch decode-execute cycle
PDF
1. Microcomputer Systems AIUB COA COURSE SLIDES
PPT
CO_Chapter2.ppt
PPTX
02-OS-review.pptx
PPTX
MODULE- 3-CO-Instructions and Programs.pptx
DOCX
Assembly Language
PPTX
CSe_Cumilla Bangladesh_Country CSE CSE213_5.ppt
Memory & the fetch decode-execute cycle
1. Microcomputer Systems AIUB COA COURSE SLIDES
CO_Chapter2.ppt
02-OS-review.pptx
MODULE- 3-CO-Instructions and Programs.pptx
Assembly Language
CSe_Cumilla Bangladesh_Country CSE CSE213_5.ppt

Similar to computer architecture and organization uni (20)

PPT
ITBIS105 6
PPT
SYSTEM CONCEPT
PDF
Microprocessors and memory concepts
DOC
Learning Area 2
DOC
Learning Area 2
DOCX
Differents Classes of CPU Registers.docx
PDF
Computer Architecture | Computer Fundamental and Organization
PPTX
PPT
Computer System.ppt
PPTX
computer organisation and architecture Module 2.pptx
PPTX
Chapter 2
PPTX
Computer Organization and Architecture presentation
PPTX
1.1.2 Processor and primary storage components.pptx
PPT
Cache memory
PPT
Cache memory
PDF
DLCA-UNIT-5-Memory Organization-Cache.pdf
PPTX
computer organization and architecture notes
PPTX
Virtual memory
PPTX
C++ Advanced Memory Management With Allocators
PPTX
Computer Organization and Design.pptx
ITBIS105 6
SYSTEM CONCEPT
Microprocessors and memory concepts
Learning Area 2
Learning Area 2
Differents Classes of CPU Registers.docx
Computer Architecture | Computer Fundamental and Organization
Computer System.ppt
computer organisation and architecture Module 2.pptx
Chapter 2
Computer Organization and Architecture presentation
1.1.2 Processor and primary storage components.pptx
Cache memory
Cache memory
DLCA-UNIT-5-Memory Organization-Cache.pdf
computer organization and architecture notes
Virtual memory
C++ Advanced Memory Management With Allocators
Computer Organization and Design.pptx
Ad

Recently uploaded (20)

PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
Well-logging-methods_new................
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
Construction Project Organization Group 2.pptx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
Geodesy 1.pptx...............................................
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
composite construction of structures.pdf
PPTX
bas. eng. economics group 4 presentation 1.pptx
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Automation-in-Manufacturing-Chapter-Introduction.pdf
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Well-logging-methods_new................
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Construction Project Organization Group 2.pptx
Foundation to blockchain - A guide to Blockchain Tech
OOP with Java - Java Introduction (Basics)
Geodesy 1.pptx...............................................
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Operating System & Kernel Study Guide-1 - converted.pdf
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
UNIT 4 Total Quality Management .pptx
Internet of Things (IOT) - A guide to understanding
composite construction of structures.pdf
bas. eng. economics group 4 presentation 1.pptx
Ad

computer architecture and organization uni