Professional Documents
Culture Documents
Bindu Agarwalla
CPU Organization
1.Single Accumulator Organization (One Address Instruction)
To understand the topic we will take an example and will discuss all the
organizations.
X=(A+B) * (C+D)
CPU Organization
1.Three Address Instruction:X=(A+B) * (C+D)
General format:
Opcode destination, src1, src2
Note: The order of operands vary from architecture to architecture.
General format:
Opcode src1/dest, src2
Note: The order of operands vary from architecture to architecture.
LOAD A //Acc←Mem[A]
LOAD C //Acc←[Mem[C]
ADD R1, P, Q
MUL R1, R1, R
DIV R1, R1, S
SUB R2, T, U
ADD X, R1, R2
CPU Organization
1.TWO Address Instruction: X:=(P+Q) * R / S + (T-U) / V
MOV R1, P
ADD R1, Q
MUL R1, R
DIV R1, S
MOV R2, T
SUB R2, U
DIV R2, V
ADD R1, R2
MOV X, R1
CPU Organization
1.One Address Instruction: X:=(P+Q) * R / S + (T-U) / V
LOAD P
ADD Q
MUL R
DIV S
STORE TEMP
LOAD T
SUB U
DIV V
ADD TEMP
STORE X
CPU Organization
1.ZERO Address Instruction: X:=(P+Q) * R / S + (T-U) / V
PUSH P
PUSH Q
ADD
PUSH R
MUL
PUSH S
DIV
PUSH T
PUSH U
SUB ADD
PUSH V POP X
DIV
CPU Organization
1RISC Instruction: X:=(P+Q) * R / S + (T-U) / V
LOAD R1, P
LOAD R2, Q
ADD R1, R1, R2
LOAD R2, R
LOAD R2, S
DIV R1, R1, R2
LOAD R2, T
LOAD R3, U
SUB R2, R2, R3 ADD R1, R1, R2
LOAD R3, V STORE X, R1
DIV R2, R2, R3
Organization Vs Architecture
Computer Architecture is the design of the system, visible to the
assembly language programmer
Implementation technology
All computers in the Intel Pentium series have the same architecture
but each version of Pentium has a different organization or
implementation
Von Neuman's Stored Program Concept
John Von Neumann has invented a m/c in Institute of Advanced Studies
in 1945 to 1952 which is named as stored program digital computer.
Harvard Architecture.
Basic Performance Equation
Program execution time (T) = (N X S)/R
Mode = 1 bits
Register = 6 bits
Total=25 bits
op code =32-25=7 bits
Problem
a)A computer has 64-bit instructions and 12 bit addresses. If
there are 352 three-address instructions, and 2256 no of two-
address instructions then how many one-address instructions can
be formulated?