Conversion and
Power Systems
Universidad
de Oviedo
Presentation:
Ignacio lvarez Garca
ISA-Uniovi 2004
Outline
Introduction
Blocks in a Computer
Instructions execution
A computer
Address
000..00
000..01
000..10
Program=sequence of instructions
Memory organized in addresses
Read instruction
from memory
Fetch next
instruction
Inst1:
Inst2:
Inst3:
11101100
MOV X,3
01101101
MOV Z,X
Decode
instruction
Store result
X:
Y:
Z:
00000000
0
00000111
7
00000010
2
Get
operands
Calculate
result
11101011
ADD Z,Y
...
...
Parts of a computer
Control Unit (CU): organizes the
operation of the computer
CU
ALU
CPU
registers
Memory
Execution of Instructions
Prog. Count.
Inst1
CPU
Instruction:
Operand 1:
Operand 2:
ALU
Result:
Address
000..00
000..01
000..10
Content
01101100
00101110
11111100
...
Inst1:
Inst2:
Inst3:
11101100
11101011
01101101
...
MOV X,3
MOV Z,X
X:
Y:
Z:
00000000
00000111
00000010
0
7
2
...
Read instruction
from memory
Fetch next
instruction
Decode
instruction
Store result
Get
operands
Calculate
result
ADD Z,Y
Execution of Instructions
Prog. Count.
Inst1
Instruction:
11101100
CPU
Operand 1:
Operand 2:
ALU
Result:
Address
000..00
000..01
000..10
Content
01101100
00101110
11111100
...
Inst1:
Inst2:
Inst3:
11101100
11101011
01101101
...
MOV X,3
MOV Z,X
X:
Y:
Z:
00000000
00000111
00000010
0
7
2
...
Read instruction
from memory
Fetch next
instruction
Decode
instruction
Store result
Get
operands
Calculate
result
ADD Z,Y
Execution of Instructions
Prog. Count.
Inst1
Instruction:
11101100
MOV X,3
CPU
Operand 1:
Operand 2:
ALU
Result:
Address
000..00
000..01
000..10
Content
01101100
00101110
11111100
...
Inst1:
Inst2:
Inst3:
11101100
11101011
01101101
...
MOV X,3
MOV Z,X
X:
Y:
Z:
00000000
00000111
00000010
0
7
2
...
Read instruction
from memory
Fetch next
instruction
Decode
instruction
Store result
Get
operands
Calculate
result
ADD Z,Y
Execution of Instructions
Prog. Count.
Inst1
Instruction:
MOV X,3
Operand 1:
00000011
CPU
Operand 2:
ALU
Result:
Address
000..00
000..01
000..10
Content
01101100
00101110
11111100
...
Inst1:
Inst2:
Inst3:
11101100
11101011
01101101
...
MOV X,3
MOV Z,X
X:
Y:
Z:
00000000
00000111
00000010
0
7
2
...
Read instruction
from memory
Fetch next
instruction
Decode
instruction
Store result
Get
operands
Calculate
result
ADD Z,Y
Execution of Instructions
Prog. Count.
Inst1
Instruction:
MOV X,3
Operand 1:
00000011
CPU
Operand 2:
ALU
Result:
Address
000..00
000..01
000..10
00000011
Content
01101100
00101110
11111100
...
Inst1:
Inst2:
Inst3:
11101100
11101011
01101101
...
MOV X,3
MOV Z,X
X:
Y:
Z:
00000000
00000111
00000010
0
7
2
...
Read instruction
from memory
Fetch next
instruction
Decode
instruction
Store result
Get
operands
Calculate
result
ADD Z,Y
Execution of Instructions
Prog. Count.
Inst1
Instruction:
MOV X,3
Operand 1:
00000011
CPU
Operand 2:
ALU
Result:
Address
000..00
000..01
000..10
00000011
Content
01101100
00101110
11111100
...
Inst1:
Inst2:
Inst3:
11101100
11101011
01101101
...
MOV X,3
MOV Z,X
X:
Y:
Z:
00000011
00000000
00000111
00000010
3
0
7
2
...
Read instruction
from memory
Fetch next
instruction
Decode
instruction
Store result
Get
operands
Calculate
result
ADD Z,Y
Execution of Instructions
Prog. Count.
Inst2
Inst1
Instruction:
MOV X,3
Operand 1:
00000011
+1
CPU
Operand 2:
ALU
Result:
Address
000..00
000..01
000..10
00000011
Content
01101100
00101110
11111100
...
Inst1:
Inst2:
Inst3:
11101100
11101011
01101101
...
MOV X,3
MOV Z,X
X:
Y:
Z:
00000011
00000111
00000010
3
7
2
...
Read instruction
from memory
Fetch next
instruction
Decode
instruction
Store result
Get
operands
Calculate
result
ADD Z,Y
Execution of Instructions
Prog. Count.
Inst2
Inst2
Instruction:
MOV X,3
Operand 1:
00000011
CPU
Operand 2:
ALU
Result:
Address
000..00
000..01
000..10
00000011
Content
01101100
00101110
11111100
...
Inst1:
Inst2:
Inst3:
11101100
11101011
01101101
...
MOV X,3
MOV Z,X
X:
Y:
Z:
00000011
00000111
00000010
3
7
2
...
Read instruction
from memory
Fetch next
instruction
Decode
instruction
Store result
Get
operands
Calculate
result
ADD Z,Y
Execution of Instructions
Prog. Count.
Inst2
Instruction:
11101011
Operand 1:
00000011
CPU
Operand 2:
ALU
Result:
Address
000..00
000..01
000..10
00000011
Content
01101100
00101110
11111100
...
Inst1:
Inst2:
Inst3:
11101100
11101011
01101101
...
MOV X,3
MOV Z,X
X:
Y:
Z:
00000011
00000111
00000010
3
7
2
...
Read instruction
from memory
Fetch next
instruction
Decode
instruction
Store result
Get
operands
Calculate
result
ADD Z,Y
Execution of Instructions
Prog. Count.
Inst2
Instruction:
MOV Z,X
11101011
Operand 1:
00000011
CPU
Operand 2:
ALU
Result:
Address
000..00
000..01
000..10
00000011
Content
01101100
00101110
11111100
...
Inst1:
Inst2:
Inst3:
11101100
11101011
01101101
...
MOV X,3
MOV Z,X
X:
Y:
Z:
00000011
00000111
00000010
3
7
2
...
Read instruction
from memory
Fetch next
instruction
Decode
instruction
Store result
Get
operands
Calculate
result
ADD Z,Y
Execution of Instructions
Prog. Count.
Inst2
Instruction:
MOV Z,X
Operand 1:
00000011
00000011
CPU
Operand 2:
ALU
Result:
Address
000..00
000..01
000..10
00000011
Content
01101100
00101110
11111100
...
Inst1:
Inst2:
Inst3:
11101100
11101011
01101101
...
MOV X,3
MOV Z,X
X:
Y:
Z:
00000011
00000111
00000010
3
7
2
...
Read instruction
from memory
Fetch next
instruction
Decode
instruction
Store result
Get
operands
Calculate
result
ADD Z,Y
Execution of Instructions
Prog. Count.
Inst2
Instruction:
MOV Z,X
Operand 1:
00000011
CPU
Operand 2:
ALU
Result:
Address
000..00
000..01
000..10
00000011
00000011
Content
01101100
00101110
11111100
...
Inst1:
Inst2:
Inst3:
11101100
11101011
01101101
...
MOV X,3
MOV Z,X
X:
Y:
Z:
00000011
00000111
00000010
3
7
2
...
Read instruction
from memory
Fetch next
instruction
Decode
instruction
Store result
Get
operands
Calculate
result
ADD Z,Y
Execution of Instructions
Prog. Count.
Inst2
Instruction:
MOV Z,X
Operand 1:
00000011
CPU
Operand 2:
ALU
Result:
Address
000..00
000..01
000..10
00000011
Content
01101100
00101110
11111100
...
Inst1:
Inst2:
Inst3:
11101100
11101011
01101101
...
MOV X,3
MOV Z,X
X:
Y:
Z:
00000011
00000111
00000010
00000011
3
7
2
3
...
Read instruction
from memory
Fetch next
instruction
Decode
instruction
Store result
Get
operands
Calculate
result
ADD Z,Y
Execution of Instructions
Prog. Count.
Inst3
Inst2
Instruction:
MOV Z,X
Operand 1:
00000011
+1
CPU
Operand 2:
ALU
Result:
Address
000..00
000..01
000..10
00000011
Content
01101100
00101110
11111100
...
Inst1:
Inst2:
Inst3:
11101100
11101011
01101101
...
MOV X,3
MOV Z,X
X:
Y:
Z:
00000011
00000111
00000011
3
7
3
...
Read instruction
from memory
Fetch next
instruction
Decode
instruction
Store result
Get
operands
Calculate
result
ADD Z,Y
Execution of Instructions
Prog. Count.
Inst3
Inst2
Instruction:
11101011
MOV Z,X
Operand 1:
00000011
CPU
Operand 2:
ALU
Result:
Address
000..00
000..01
000..10
00000011
Content
01101100
00101110
11111100
...
Inst1:
Inst2:
Inst3:
11101100
11101011
01101101
...
MOV X,3
MOV Z,X
X:
Y:
Z:
00000011
00000111
00000011
3
7
3
...
Read instruction
from memory
Fetch next
instruction
Decode
instruction
Store result
Get
operands
Calculate
result
ADD Z,Y
Execution of Instructions
Prog. Count.
Inst3
Inst2
Instruction:
11101011
ADD Z,Y
Operand 1:
00000011
CPU
Operand 2:
ALU
Result:
Address
000..00
000..01
000..10
00000011
Content
01101100
00101110
11111100
...
Inst1:
Inst2:
Inst3:
11101100
11101011
01101101
...
MOV X,3
MOV Z,X
X:
Y:
Z:
00000011
00000111
00000011
3
7
3
...
Read instruction
from memory
Fetch next
instruction
Decode
instruction
Store result
Get
operands
Calculate
result
ADD Z,Y
Execution of Instructions
Prog. Count.
Inst3
Inst2
Instruction:
11101011
ADD Z,Y
Operand 1:
00000011
00000111
CPU
Operand 2:
ALU
Result:
Address
000..00
000..01
000..10
00000011
Content
01101100
00101110
11111100
...
Inst1:
Inst2:
Inst3:
11101100
11101011
01101101
...
MOV X,3
MOV Z,X
X:
Y:
Z:
00000011
00000111
00000011
3
7
3
...
Read instruction
from memory
Fetch next
instruction
Decode
instruction
Store result
Get
operands
Calculate
result
ADD Z,Y
Execution of Instructions
Prog. Count.
Inst3
Inst2
Instruction:
11101011
ADD Z,Y
Operand 1:
00000111
Operand 2:
00000011
CPU
ALU
Result:
Address
000..00
000..01
000..10
00000011
Content
01101100
00101110
11111100
...
Inst1:
Inst2:
Inst3:
11101100
11101011
01101101
...
MOV X,3
MOV Z,X
X:
Y:
Z:
00000011
00000111
00000011
3
7
3
...
Read instruction
from memory
Fetch next
instruction
Decode
instruction
Store result
Get
operands
Calculate
result
ADD Z,Y
Execution of Instructions
Prog. Count.
Inst3
Inst2
Instruction:
11101011
ADD Z,Y
Operand 1:
00000111
Operand 2:
00000011
CPU
ALU
Result:
Address
000..00
000..01
000..10
00001010
00000011
Content
01101100
00101110
11111100
...
Inst1:
Inst2:
Inst3:
11101100
11101011
01101101
...
MOV X,3
MOV Z,X
X:
Y:
Z:
00000011
00000111
00000011
3
7
3
...
Read instruction
from memory
Fetch next
instruction
Decode
instruction
Store result
Get
operands
Calculate
result
ADD Z,Y
Execution of Instructions
Prog. Count.
Inst3
Inst2
Instruction:
11101011
ADD Z,Y
Operand 1:
00000111
Operand 2:
00000011
CPU
ALU
Result:
Address
000..00
000..01
000..10
00001010
Content
01101100
00101110
11111100
...
Inst1:
Inst2:
Inst3:
11101100
11101011
01101101
...
MOV X,3
MOV Z,X
X:
Y:
Z:
00000011
00000111
00000011
00001010
3
7
10
3
...
Read instruction
from memory
Fetch next
instruction
Decode
instruction
Store result
Get
operands
Calculate
result
ADD Z,Y
Execution of Instructions
Prog. Count.
???
Inst2
Instruction:
11101011
ADD Z,Y
Operand 1:
00000111
Operand 2:
00000011
CPU
ALU
Result:
Address
000..00
000..01
000..10
00001010
Content
01101100
00101110
11111100
...
Inst1:
Inst2:
Inst3:
11101100
11101011
01101101
...
MOV X,3
MOV Z,X
X:
Y:
Z:
00000011
00000111
00000011
00001010
3
7
10
3
...
Read instruction
from memory
Fetch next
instruction
Decode
instruction
Store result
Get
operands
Calculate
result
ADD Z,Y
Execution of Instructions
Repeat
Address
000..00
000..01
000..10
Prog. Count.
???
Inst2
Instruction:
11101011
ADD Z,Y
Operand 1:
00000111
Operand 2:
00000011
CPU
ALU
Result:
00001010
Content
01101100
00101110
11111100
...
Inst1:
Inst2:
Inst3:
11101100
11101011
01101101
...
MOV X,3
MOV Z,X
X:
Y:
Z:
00000011
00000111
00000011
00001010
3
7
10
3
...
Read instruction
from memory
Fetch next
instruction
Decode
instruction
Store result
Get
operands
Calculate
result
ADD Z,Y