COS2621 – COMPUTER ORGANIZATION
ASSIGNMENT 2 SOLUTIONS
2022
, Discussion of assignment 02
All the questions were not marked in detail. You received credit for the questions for which you
submitted a reasonable effort.
Question 1
(a) The following table reflects the memory contents of a part of memory in a one-
address machine with an accumulator:
Address Contents
300 320
305 310
310 310
315 325
320 305
325 300
What values do the following instructions load into the accumulator?
LOAD IMMEDIATE 300: Load immediate means that the operand is part of the
instruction. The value 300 will be loaded into the accumulator.
LOAD DIRECT 320: Load direct means that the instruction contains the address of the
operand: The value 300 is stored in address 320, so the value 300 will be stored in the
accumulator.
LOAD INDIRECT 325: Load indirect means that the address that contains the address of the
Operand forms part of the instruction. Therefore, address 325 contains the address of the
operand, ie the address of the operand is 300. Address 300 contains 320, thus the value
320 will be stored in the accumulator.
2
ASSIGNMENT 2 SOLUTIONS
2022
, Discussion of assignment 02
All the questions were not marked in detail. You received credit for the questions for which you
submitted a reasonable effort.
Question 1
(a) The following table reflects the memory contents of a part of memory in a one-
address machine with an accumulator:
Address Contents
300 320
305 310
310 310
315 325
320 305
325 300
What values do the following instructions load into the accumulator?
LOAD IMMEDIATE 300: Load immediate means that the operand is part of the
instruction. The value 300 will be loaded into the accumulator.
LOAD DIRECT 320: Load direct means that the instruction contains the address of the
operand: The value 300 is stored in address 320, so the value 300 will be stored in the
accumulator.
LOAD INDIRECT 325: Load indirect means that the address that contains the address of the
Operand forms part of the instruction. Therefore, address 325 contains the address of the
operand, ie the address of the operand is 300. Address 300 contains 320, thus the value
320 will be stored in the accumulator.
2