SlideShare a Scribd company logo
12/14/2014
1
Computer Organization
Instructors :
Dr. Abdul Raouf Khan
Mr.Marwan El-Haj
Instruction Formats
The common fields found in an instruction format
are:
1. An operation code field that specifies the
operation to be performed.
2. An address field that designates memory
address or a processor register
3. A mode field that specifies the way the operand
or the effective address is determined
12/14/2014
2
CPU organization
Three types of Computer Organization
1. Single accumulator
2. General register organization
3. Stack organization
Single accumulator
Basic computer is an example of single
accumulator type
Instruction formats eg. ADD X
where X is the address of the operand
12/14/2014
3
General register organization
Instruction formats
ADD R1, R2, R3 means R1 R2 + R3
Or ADD R1, R2 means R1 R1+R2
Computers with multiple register organization
use MOV instruction for transfer
MOV R1, R2 means R1 R2
General register type computers use two or
three address fields in the instruction format
Stack organization
Computers with stack organization use
PUSH & POP instructions
PUSH x will push the word at address X to
the top of the stack.
The insdtruction ADD consists of an
operation code only with no address field.
The instruction will pop two top numbers &
will add them and push the sum in the stack.
12/14/2014
4
Three address instruction
X= (A+B)*(C+D)
ADD R1, A, B R1 M[A] + M[B]
ADD R2, C, D R2 M[C] + M[D]
MUL X, R1, R2 M[X] R1 * R2
Two address instruction
X= (A+B)*(C+D)
MOV R1, A R1 M[A]
ADD R1, B R1 R1+M[B]
MOV R2, C R2 M[C]
ADD R2, D R2 R2+M[D]
MUL R1, R2 R1 R1*R2
MOV X, R1 M[X] R1
12/14/2014
5
One address instruction
X= (A+B)*(C+D)
LOAD A AC M[A]
ADD B AC AC+M[B]
STORE T M[T] AC
LOAD C AC M[C]
ADD D AC AC+M[D]
MUL T AC AC * M[T]
STORE X M[X] AC
Zero address instruction
X= (A+B)*(C+D)
PUSH A TOS A
PUSH B TOS B
ADD TOS A+B
PUSH C TOS C
PUSH D TOS D
ADD TOS C+D
MUL TOS (C+D)*(A+B)
POP X M[X] TOS
TOS means TOP OF STACK
12/14/2014
6
RISC Instruction
RISC (Reduced Instruction Set Computer)
The instruction set of a typical RISC processor is
restricted to the use of load and store instructions
when communicating between memory and CPU. All
other instructions are executed within the registers
without referring to memory. A program for a RISC
type CPU consists of LOAD & STORE instructions
that have one memory and one register address and
computational type instructions that have 3 address
with all 3 specifying processor registers.
RISC Instruction
X= (A+B)*(C+D)
LOAD R1, A R1 M[A]
LOAD R2, B R2 M[B]
LOAD R3, C R3 M[C]
LOAD R4, D R4 M[D]
ADD R1, R1, R2 R1 R1+ R2
ADD R3, R3, R4 R3 R3+ R4
MUL R1, R1, R3 R1 R1* R3
STORE X, R1 M[X] R1

More Related Content

PPT
CO by Rakesh Roshan
PPTX
Memory Reference Instructions
PPTX
Memory reference
PPTX
microcomputer architecture-Instruction formats
PPT
0015.register allocation-graph-coloring
PPTX
Broad-sense Synchronous Circuits on Partially Ordered Time
PPTX
microcomputer architecture - Arithmetic instruction
PPT
Memory reference instruction
CO by Rakesh Roshan
Memory Reference Instructions
Memory reference
microcomputer architecture-Instruction formats
0015.register allocation-graph-coloring
Broad-sense Synchronous Circuits on Partially Ordered Time
microcomputer architecture - Arithmetic instruction
Memory reference instruction

What's hot (20)

PPTX
addressing mode 1
PDF
Dataflow Analysis
PDF
Code generation in Compiler Design
PDF
8085 stack & machine control instruction
PDF
Register Allocation
PPTX
Basic blocks - compiler design
DOCX
A high performance fir filter architecture for fixed and reconfigurable appli...
PPTX
Compiler optimization techniques
PPTX
Block diagram, Transfer Function from block diagram reduction, (8 Rules to re...
PDF
A Multidimensional Distributed Array Abstraction for PGAS (HPCC'16)
DOCX
High performance nb-ldpc decoder with reduction of message exchange
DOCX
Flexible dsp accelerator architecture exploiting carry save arithmetic
PDF
Lec 04 - Gate-level Minimization
DOCX
High performance pipelined architecture of elliptic curve scalar multiplicati...
DOCX
Graph based transistor network generation method for supergate design
PPT
Dialations
PDF
8085 data transfer instruction set
PDF
Mcs 10 104 compiler design dec 2014
DOCX
Floating point butterfly architecture based on binary signed-digit representa...
addressing mode 1
Dataflow Analysis
Code generation in Compiler Design
8085 stack & machine control instruction
Register Allocation
Basic blocks - compiler design
A high performance fir filter architecture for fixed and reconfigurable appli...
Compiler optimization techniques
Block diagram, Transfer Function from block diagram reduction, (8 Rules to re...
A Multidimensional Distributed Array Abstraction for PGAS (HPCC'16)
High performance nb-ldpc decoder with reduction of message exchange
Flexible dsp accelerator architecture exploiting carry save arithmetic
Lec 04 - Gate-level Minimization
High performance pipelined architecture of elliptic curve scalar multiplicati...
Graph based transistor network generation method for supergate design
Dialations
8085 data transfer instruction set
Mcs 10 104 compiler design dec 2014
Floating point butterfly architecture based on binary signed-digit representa...
Ad

Viewers also liked (20)

PPTX
Topological sort
PPTX
Minimum spanning trees
PDF
Lect11 organization
PDF
Lect6 organization
PDF
Lect9 organization
PPTX
Activity selection 2
PPTX
Greedy algorithm
PDF
Lect7 organization
PPTX
Lecture02
PPTX
Bfs and dfs
PPTX
Graph theory
PPTX
Chain matrix multiplication
PPTX
Dijekstra
PPTX
Complexity theory 2
PPTX
Floyd warshal 2
PPTX
PDF
Lect14 organization
PDF
Lect5 organization
PPT
Lecture01
PPTX
Topological sort
Minimum spanning trees
Lect11 organization
Lect6 organization
Lect9 organization
Activity selection 2
Greedy algorithm
Lect7 organization
Lecture02
Bfs and dfs
Graph theory
Chain matrix multiplication
Dijekstra
Complexity theory 2
Floyd warshal 2
Lect14 organization
Lect5 organization
Lecture01
Ad

Similar to Lect13 organization (20)

PPT
Computer Organisation and Architecture
PPT
unit-3-L1.ppt
PPTX
Central processing unit pptx for computer engineering
PPTX
Types of Instruction Format
PPT
CAO_Unit-3.ppt
PPT
Mca i-u-4 central processing unit and pipeline
PPT
central processing unit and pipeline
PPTX
CS304PC:Computer Organization and Architecture Session 12 Instruction Format...
PPT
central processing unit.ppt
PPT
B.sc cs-ii-u-4 central processing unit and pipeline
PDF
UNIT-3-COrtertertertertertertertertr.pdf
PPT
Bca 2nd sem-u-4 central processing unit and pipeline
PPT
CH-3 CPU Computer architecture and organization.ppt
PDF
7. CPU_Unit3 (1).pdf
PDF
Central processor organization
PPTX
2024_lecture11__come321.pptx.......................
PPTX
instruction format.pptx
PPTX
UNIT-3.pptx
PPTX
instruction format in computer organisation .pptx
PPT
CPU Design CA notes.pJKKKKKKKKKKKKKKKKKKKKKKKKKKpt
Computer Organisation and Architecture
unit-3-L1.ppt
Central processing unit pptx for computer engineering
Types of Instruction Format
CAO_Unit-3.ppt
Mca i-u-4 central processing unit and pipeline
central processing unit and pipeline
CS304PC:Computer Organization and Architecture Session 12 Instruction Format...
central processing unit.ppt
B.sc cs-ii-u-4 central processing unit and pipeline
UNIT-3-COrtertertertertertertertertr.pdf
Bca 2nd sem-u-4 central processing unit and pipeline
CH-3 CPU Computer architecture and organization.ppt
7. CPU_Unit3 (1).pdf
Central processor organization
2024_lecture11__come321.pptx.......................
instruction format.pptx
UNIT-3.pptx
instruction format in computer organisation .pptx
CPU Design CA notes.pJKKKKKKKKKKKKKKKKKKKKKKKKKKpt

More from Maher Alshammari (17)

PDF
Cis cvs risc
PDF
Lect10 organization
PDF
Lect12 organization
PDF
Lect15 organization
PDF
Lect8 organization
PDF
Lect1 organization 2
PDF
Lect4 organization
PDF
Lect2 organization 2
PDF
Lect3 organization 2
PPTX
Matrix chain multiplication 2
PPTX
Edit distance problem
PPTX
Merge sort
PPTX
Matrix chain multiplication
PPTX
Bellman ford and floyd warshal
PPTX
Dijekstra algorithm
PPTX
Greedy algorithm huffman encoding
PPTX
Complexity theory 3
Cis cvs risc
Lect10 organization
Lect12 organization
Lect15 organization
Lect8 organization
Lect1 organization 2
Lect4 organization
Lect2 organization 2
Lect3 organization 2
Matrix chain multiplication 2
Edit distance problem
Merge sort
Matrix chain multiplication
Bellman ford and floyd warshal
Dijekstra algorithm
Greedy algorithm huffman encoding
Complexity theory 3

Recently uploaded (20)

PPTX
400kV_Switchyard_Training_with_Diagrams.pptx
PPTX
Slide_Egg-81850-About Us PowerPoint Template Free.pptx
PPTX
White Green Simple and Professional Business Pitch Deck Presentation.pptx
PPTX
Presentation on tradtional textiles of kutch
PDF
TUTI FRUTI RECETA RÁPIDA Y DIVERTIDA PARA TODOS
PPTX
Green and Blue Illustrative Earth Day Presentation.pptx
PPTX
A slideshow about aesthetic value in arts
PPTX
573393963-choose-your-own-adventure(2).pptx
PDF
Chapter 3 about The site of the first mass
PPTX
CPAR7 ARTS GRADE 112 LITERARY ARTS OR LI
PPTX
4277547e-f8e2-414e-8962-bf501ea91259.pptx
PDF
Close Enough S3 E7 "Bridgette the Brain"
PPTX
EJ Wedding 520 It's official! We went to Xinyi District to do the documents
PPTX
22 Bindushree Sahu.pptxmadam curie life and achievements
PPTX
Art Appreciation-Lesson-1-1.pptx College
PDF
waiting, Queuing, best time an event cab be done at a time .pdf
PPTX
Military history & Evolution of Armed Forces of the Philippines
PPTX
MUSIC-W1-Q1-1.pptxL;ML;MLNL;NL;NL;N;LNL;NL;N
PPTX
Visual-Arts.pptx power point elements of art the line, shape, form
PPTX
Brown and Beige Vintage Scrapbook Idea Board Presentation.pptx.pptx
400kV_Switchyard_Training_with_Diagrams.pptx
Slide_Egg-81850-About Us PowerPoint Template Free.pptx
White Green Simple and Professional Business Pitch Deck Presentation.pptx
Presentation on tradtional textiles of kutch
TUTI FRUTI RECETA RÁPIDA Y DIVERTIDA PARA TODOS
Green and Blue Illustrative Earth Day Presentation.pptx
A slideshow about aesthetic value in arts
573393963-choose-your-own-adventure(2).pptx
Chapter 3 about The site of the first mass
CPAR7 ARTS GRADE 112 LITERARY ARTS OR LI
4277547e-f8e2-414e-8962-bf501ea91259.pptx
Close Enough S3 E7 "Bridgette the Brain"
EJ Wedding 520 It's official! We went to Xinyi District to do the documents
22 Bindushree Sahu.pptxmadam curie life and achievements
Art Appreciation-Lesson-1-1.pptx College
waiting, Queuing, best time an event cab be done at a time .pdf
Military history & Evolution of Armed Forces of the Philippines
MUSIC-W1-Q1-1.pptxL;ML;MLNL;NL;NL;N;LNL;NL;N
Visual-Arts.pptx power point elements of art the line, shape, form
Brown and Beige Vintage Scrapbook Idea Board Presentation.pptx.pptx

Lect13 organization

  • 1. 12/14/2014 1 Computer Organization Instructors : Dr. Abdul Raouf Khan Mr.Marwan El-Haj Instruction Formats The common fields found in an instruction format are: 1. An operation code field that specifies the operation to be performed. 2. An address field that designates memory address or a processor register 3. A mode field that specifies the way the operand or the effective address is determined
  • 2. 12/14/2014 2 CPU organization Three types of Computer Organization 1. Single accumulator 2. General register organization 3. Stack organization Single accumulator Basic computer is an example of single accumulator type Instruction formats eg. ADD X where X is the address of the operand
  • 3. 12/14/2014 3 General register organization Instruction formats ADD R1, R2, R3 means R1 R2 + R3 Or ADD R1, R2 means R1 R1+R2 Computers with multiple register organization use MOV instruction for transfer MOV R1, R2 means R1 R2 General register type computers use two or three address fields in the instruction format Stack organization Computers with stack organization use PUSH & POP instructions PUSH x will push the word at address X to the top of the stack. The insdtruction ADD consists of an operation code only with no address field. The instruction will pop two top numbers & will add them and push the sum in the stack.
  • 4. 12/14/2014 4 Three address instruction X= (A+B)*(C+D) ADD R1, A, B R1 M[A] + M[B] ADD R2, C, D R2 M[C] + M[D] MUL X, R1, R2 M[X] R1 * R2 Two address instruction X= (A+B)*(C+D) MOV R1, A R1 M[A] ADD R1, B R1 R1+M[B] MOV R2, C R2 M[C] ADD R2, D R2 R2+M[D] MUL R1, R2 R1 R1*R2 MOV X, R1 M[X] R1
  • 5. 12/14/2014 5 One address instruction X= (A+B)*(C+D) LOAD A AC M[A] ADD B AC AC+M[B] STORE T M[T] AC LOAD C AC M[C] ADD D AC AC+M[D] MUL T AC AC * M[T] STORE X M[X] AC Zero address instruction X= (A+B)*(C+D) PUSH A TOS A PUSH B TOS B ADD TOS A+B PUSH C TOS C PUSH D TOS D ADD TOS C+D MUL TOS (C+D)*(A+B) POP X M[X] TOS TOS means TOP OF STACK
  • 6. 12/14/2014 6 RISC Instruction RISC (Reduced Instruction Set Computer) The instruction set of a typical RISC processor is restricted to the use of load and store instructions when communicating between memory and CPU. All other instructions are executed within the registers without referring to memory. A program for a RISC type CPU consists of LOAD & STORE instructions that have one memory and one register address and computational type instructions that have 3 address with all 3 specifying processor registers. RISC Instruction X= (A+B)*(C+D) LOAD R1, A R1 M[A] LOAD R2, B R2 M[B] LOAD R3, C R3 M[C] LOAD R4, D R4 M[D] ADD R1, R1, R2 R1 R1+ R2 ADD R3, R3, R4 R3 R3+ R4 MUL R1, R1, R3 R1 R1* R3 STORE X, R1 M[X] R1