April
1999 QUESTION 5 Total Marks: 20 Marks |
Click here to access other
questions
GRADE A
|
(a) | List two possible trade-offs we must take when employing various addressing methods in the design of an instruction set. | [2] | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||
(b) | With the aid of a diagram, briefly explain how the effective address is determined using the displacement addressing. | [4] | ||||||||||||||||||||||||||||||||||||||||||||||
There are 2 fields
contain addressing information:
Information is added into special
purpose register to give effective address. Base addressing is one of the
example of displacement addressing.
|
||||||||||||||||||||||||||||||||||||||||||||||||
(c) | If the memory locations have contents as shown
below before execution of the program. What values will they hold afterwards? Show your
workings noting the value held in the accumulator and the addresses where a value is
possibly changed. |
[8] | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||
(d) | Although the following scenarios refer to
people, money, buildings, etc., they can be regarded as examples of various addressing
modes. For each one, explain which addressing mode it corresponds to. State clearly the
reasons for your choice.
|
[6] | ||||||||||||||||||||||||||||||||||||||||||||||
(i) A husband and wide have saved a considerable amount of money over a number of years. Not ones for trusting banks, they decide to deposit their money straight to a safe. | ||||||||||||||||||||||||||||||||||||||||||||||||
(ii) A young woman finds herself lost upon arriving in a new town applying for a job. To find the way, she first asks an old lady, who points her in the direction of an information board. The woman reads the board, and finds the location of the building she is looking for. She goes to the building and visits the company. | ||||||||||||||||||||||||||||||||||||||||||||||||
(iii) An old man searching for buried treasure
has recently discovered the second half of the map which shows where the location of the
gold is hidden. By taking his half and the newly discovered part of the map, a path to the
location of the treasure is revealed to him.
|
||||||||||||||||||||||||||||||||||||||||||||||||
(i) Immediate
Addressing When they kept the deposit by themselves, they can use the money straight away. They no need to contact the bank to take money. This is same as immediate addressing, where operand (a husband and wife) contain actual data (keep money themselves). (ii) Indirect Addressing (iii)Displacement Addressing |