QUESTION 3 (30 marks)
Consider an hypothetical processor having a 16-bit instructions composed of two fields: the first four bits contains the opcode, and the remainder the immediate operand and/or operand address. Assume that the hypothetical machine has the following instructions:
0001 = Load AC from Memory location
0011 = Load AC from I/O
0010 = Store AC to memory location
0101 = Add AC to memory location
1100 = Subtract AC from memory location
1101 = Divide AC with memory location
1110 = Store AC to I/O
where AC is accumulator, and I/O is input/output.
3.1) - Write the code (in hexadecimal format) for each of the following instructions:
i. Load AC from memory location 941
ii. Add content of memory location 940
iii. Divide by content of location 941
iv. Store AC to device 245.
State any assumption that you make, if any.
3.2) - Use the format of Figure 1 to show program execution for the four instructions of above.
• A blank chart to be used for this question can be found on the next page of this question paper.
• For this question, assume that memory location 940 and 941 to contain 88 and 2 respectively.
• You are required to state any assumptions associated with your answer.