In: Computer Science
Given the following memory values and address instruction with an accumulator. Determine the values with the following instructions load into accumulator.
Word 16 contains 22
Word 18 contains 24
Word 20 contains 26
Word 22 contains 28
Word 24 contains 30
Word 26 contains 32
Word 28 contains 34
i. LOAD IMMEDIATE 16
ii. LOAD DIRECT 16
iii. LOAD INDIRECT 16
iv. LOAD IMMEDIATE 18
v. LOAD DIRECT 18
vi. LOAD INDIRECT 20
vii. LOAD IMMEDIATE 24
viii. LOAD DIRECT 26
ix. LOAD INDIRECT 22
x. LOAD DIRECT 28
[10 Marks]
Values in accumulator are:-
i. 16 (load value in instruction into accumulator i.e. 16)
ii. 22 (load value at memory address 16 into accumulator i.e. 22)
iii. 28 (load value at memory address 22 that is present at memory address 16 into acc i.e. address 16 has value 22 and then address 22 has value 28)
iv. 18(load value in instruction into accumulator i.e. 18)
v. 24(load value at memory address 18 into accumulator i.e. 24)
vi. 32(load value at memory address 26 that is present at memory address 20 into acc i.e. address 20 has value 26 and then address 26 has value 32)
vii. 24(load value in instruction into accumulator i.e. 24)
viii. 32(load value at memory address 26 into accumulator i.e. 32)
ix. 34(load value at memory address 28 that is present at memory address 22 into acc i.e. address 22 has value 28 and then address 28 has value 34)
x. 34(load value at memory address 28 into accumulator i.e. 34)
Summary-->
Load Immediate -: This command is used to load the given value in the instruction directly into accumulator.
Load Direct -: This command is used to load the value that is located at the memory address given in instruction.
Load Indirect -: This command is used to load the value from memory address that is given in value of memory address given in instruction.