Download presentation
Presentation is loading. Please wait.
1
Program Execution
2
Preparation The assembly language version is assembled into a machine language executable The executable is copied into main memory The Program Counter Register is loaded with the address of the first instruction in the program
3
Woody's instruction cycle
Copy the word referred to by the Program Counter into the Instruction Register Add 1 to the address in the Program Counter Decode and execute the contents of the Instruction Register Also called "Fetch-execute cycle
4
Initial state of memory after loading program and setting PC to 00000
1 CPU Main Memory 00000 10000 00001 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00000 Data Register Input Unit Output Unit Initial state of memory after loading program and setting PC to 00000
5
1. Copy word referred to by PC into Instruction register
2 CPU Main Memory 00000 10000 00001 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00000 Data Register Input Unit Output Unit 1. Copy word referred to by PC into Instruction register
6
1. Copy word referred to by PC into Instruction register
3 CPU Main Memory 00000 10000 00001 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00000 Data Register Input Unit Output Unit 1. Copy word referred to by PC into Instruction register
7
1. Copy word referred to by PC into Instruction register
4 CPU Main Memory 00000 10000 00001 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00000 Data Register Input Unit Output Unit 1. Copy word referred to by PC into Instruction register
8
2. Add 1 to the Program Counter
5 CPU Main Memory 00000 10000 00001 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00001 Data Register Input Unit Output Unit 2. Add 1 to the Program Counter
9
3. Decode and Execute instruction
6 CPU Main Memory 00000 10000 00001 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00001 Data Register Input Unit Output Unit 3. Decode and Execute instruction
10
3. Decode and Execute instruction – 000 is op code for CopyFrom
7 CPU Main Memory 00000 CopyFrom 10000 00001 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00001 Data Register Input Unit Output Unit 3. Decode and Execute instruction – 000 is op code for CopyFrom
11
3. Decode and Execute instruction – 01001 is address to copy from
8 CPU Main Memory 00000 CopyFrom 10000 00001 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00001 Data Register Input Unit Output Unit 3. Decode and Execute instruction – is address to copy from
12
3. Decode and Execute instruction – 01001 is address to copy from
9 CPU Main Memory 00000 CopyFrom 10000 00001 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00001 Data Register Input Unit Output Unit 3. Decode and Execute instruction – is address to copy from
13
3. Decode and Execute instruction – Instruction execution is complete
10 CPU Main Memory 00000 CopyFrom 10000 00001 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00001 Data Register Input Unit Output Unit 3. Decode and Execute instruction – Instruction execution is complete
14
Repeat: 1. Copy word referred to by PC to IR
11 CPU Main Memory 00000 CopyFrom 10000 00001 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00001 Data Register Input Unit Output Unit Repeat: 1. Copy word referred to by PC to IR
15
Repeat: 1. Copy word referred to by PC to IR
12 CPU Main Memory 00000 CopyFrom 10000 00001 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00001 Data Register Input Unit Output Unit Repeat: 1. Copy word referred to by PC to IR
16
13 CPU Main Memory Instruction Register Program Counter Data Register
00000 CopyFrom 10000 00001 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00010 Data Register Input Unit Output Unit 2. Add 1 to PC
17
3. Decode and execute instruction
14 CPU Main Memory 00000 CopyFrom 10000 00001 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00010 Data Register Input Unit Output Unit 3. Decode and execute instruction
18
3. Decode and execute instruction – 110 is the op code for IfNegGoTo
15 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00010 Data Register Input Unit Output Unit 3. Decode and execute instruction – 110 is the op code for IfNegGoTo
19
3. Decode and execute instruction – Check value in data register
16 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00010 Data Register Input Unit Output Unit 3. Decode and execute instruction – Check value in data register
20
3. Decode and execute instruction – DR value is -1
17 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00010 Data Register Input Unit Output Unit 3. Decode and execute instruction – DR value is -1
21
3. Decode and execute instruction – Copy rightmost 5 bits of IR to PC
18 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00010 Data Register Input Unit Output Unit 3. Decode and execute instruction – Copy rightmost 5 bits of IR to PC
22
3. Decode and execute instruction – execution is complete
19 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00101 Data Register Input Unit Output Unit 3. Decode and execute instruction – execution is complete
23
1. Copy word referred to by PC to IR
20 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00101 Data Register Input Unit Output Unit 1. Copy word referred to by PC to IR
24
1. Copy word referred to by PC to IR
21 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00101 Data Register Input Unit Output Unit 1. Copy word referred to by PC to IR
25
22 CPU Main Memory Instruction Register Program Counter Data Register
00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00110 Data Register Input Unit Output Unit 2. Add 1 to PC
26
3. Decode and execute instruction
23 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00110 Data Register Input Unit Output Unit 3. Decode and execute instruction
27
3. Decode and execute instruction – 000 is op code for CopyFrom
24 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00110 Data Register Input Unit Output Unit 3. Decode and execute instruction – 000 is op code for CopyFrom
28
3. Decode and execute instruction
25 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00110 Data Register Input Unit Output Unit 3. Decode and execute instruction
29
26 CPU Main Memory Instruction Register Program Counter Data Register
00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00110 Data Register Input Unit Output Unit 3. Decode and execute instruction – copy value to DR. Execution complete.
30
1. Copy word referred to by PC to IR.
27 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00110 Data Register Input Unit Output Unit 1. Copy word referred to by PC to IR.
31
1. Copy word referred to by PC to IR.
28 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00110 Data Register Input Unit Output Unit 1. Copy word referred to by PC to IR.
32
29 CPU Main Memory Instruction Register Program Counter Data Register
00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00111 Data Register Input Unit Output Unit 2. Add 1 to PC
33
3. Decode and execute instruction
30 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00111 Data Register Input Unit Output Unit 3. Decode and execute instruction
34
3. Decode and execute instruction – 011 is Subtract
31 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 Subtract 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00111 Data Register Input Unit Output Unit 3. Decode and execute instruction – 011 is Subtract
35
3. Decode and execute instruction – data register is first operand
32 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 Subtract 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00111 Data Register Input Unit Output Unit 3. Decode and execute instruction – data register is first operand
36
3. Decode and execute instruction – data register is first operand
33 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 Subtract 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00111 Data Register Input Unit Output Unit 3. Decode and execute instruction – data register is first operand
37
3. Decode and execute instruction – word at 01100 is second operand
34 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 Subtract 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00111 Data Register Input Unit Output Unit 3. Decode and execute instruction – word at is second operand
38
3. Decode and execute instruction – word at 01100 is second operand
35 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 Subtract 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00111 Data Register Input Unit Output Unit 3. Decode and execute instruction – word at is second operand
39
36 CPU Main Memory Instruction Register Program Counter Data Register
00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 Subtract 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00111 Data Register Input Unit Output Unit 3. Decode and execute instruction: (6 – 1) = 5. Result is stored in DR.
40
37 CPU Main Memory Instruction Register Program Counter Data Register
00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 Subtract 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00111 Data Register Input Unit Output Unit 3. Decode and execute instruction: (6 – 1) = 5. Result is stored in DR.
41
38 CPU Main Memory Instruction Register Program Counter Data Register
00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 Subtract 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00111 Data Register Input Unit Output Unit 3. Decode and execute instruction: (6 – 1) = 5. Result is stored in DR.
42
1. Copy word referred to by PC to IR.
39 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 Subtract 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00111 Data Register Input Unit Output Unit 1. Copy word referred to by PC to IR.
43
1. Copy word referred to by PC to IR.
40 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 Subtract 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00111 Data Register Input Unit Output Unit 1. Copy word referred to by PC to IR.
44
41 CPU Main Memory Instruction Register Program Counter Data Register
00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 Subtract 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 01000 Data Register Input Unit Output Unit 2. Add 1 to PC
45
3. Decode and execute instruction
42 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 Subtract 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 01000 Data Register Input Unit Output Unit 3. Decode and execute instruction
46
3. Decode and execute instruction – 001 is CopyTo
43 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 Subtract 10110 00111 CopyTo 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 01000 Data Register Input Unit Output Unit 3. Decode and execute instruction – 001 is CopyTo
47
3. Decode and execute instruction – 01010 is target location
44 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 Subtract 10110 00111 CopyTo 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 01000 Data Register Input Unit Output Unit 3. Decode and execute instruction – is target location
48
3. Decode and execute instruction – value in DR copied to memory
45 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 Subtract 10110 00111 CopyTo 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 01000 Data Register Input Unit Output Unit 3. Decode and execute instruction – value in DR copied to memory
49
1. Copy word referred to by PC to IR
46 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 Subtract 10110 00111 CopyTo 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 01000 Data Register Input Unit Output Unit 1. Copy word referred to by PC to IR
50
1. Copy word referred to by PC to IR
47 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 Subtract 10110 00111 CopyTo 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 01000 Data Register Input Unit Output Unit 1. Copy word referred to by PC to IR
51
48 CPU Main Memory Instruction Register Program Counter Data Register
00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 Subtract 10110 00111 CopyTo 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 01001 Data Register Input Unit Output Unit 2. Add 1 to PC
52
3. Decode and execute instruction
49 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 Subtract 10110 00111 CopyTo 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 01001 Data Register Input Unit Output Unit 3. Decode and execute instruction
53
3. Decode and execute instruction – 111 is op code for Stop
50 CPU Main Memory 00000 CopyFrom 10000 00001 IfNegGoTo 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 Subtract 10110 00111 CopyTo 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 01001 Data Register Input Unit Output Unit What type of value does PC refer to now? Why did we bother to add 1 to PC in this last instance? 3. Decode and execute instruction – 111 is op code for Stop
54
Key points Only programs for which the instructions and data are in the appropriate machine language format can be executed by a computer. Assembly language substitutes meaningful names for instructions and conventional notation for numeric values Assembly language programs can be mechanically translated to machine language
55
Is Assembly Language a "real" language?
56
Is Assembly Language a "real" language?
Computers don't understand the instructions or data used in AL programs
57
Is Assembly Language a "real" language?
Computers don't understand the instructions or data used in AL programs Assembly language is a useful abstraction that helps humans interact with the computer.
58
Is Assembly Language a "real" language?
Computers don't understand the instructions or data used in AL programs Assembly language is a useful abstraction that helps humans interact with the computer. The concept of memory locations is a useful abstraction for grids of transistors
59
Is Assembly Language a "real" language?
Computers don't understand the instructions or data used in AL programs Assembly language is a useful abstraction that helps humans interact with the computer. The concept of memory locations is a useful abstraction for grids of transistors Maps are useful abstractions of the physical world.
60
The usefulness of computers is a direct result of the usefulness of the abstractions we have created for them.
61
Exercise: trace the execution of this program.
CPU Main Memory 00000 10000 00001 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 01011 11011 01100 11100 01101 11101 01110 11110 01111 11111 Instruction Register Program Counter 00000 Data Register Input Unit Output Unit This is in fact the same program, the only change is that location now contains a positive number. Exercise: trace the execution of this program.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.