You are on page 1of 1

THE UNIVERSITY OF ZAMBIA

Computer Science
CSC 2111: Programme Execution Assignment

Consider a simple computer in which both instructions and data are 16 bits long: (Opcode = 4
bits and memory location or I/O device = 12 bits). Its opcodes are as follows:

Using the format below to keep track of the state of the registers
Operation Codes
while the programme loaded into memory is executing,
2 = Store AC to memory SIMULATE the fetch/execute process.

7 = Store AC to I/O

5 = Add to AC from memory


Fetch Execute
1 = Load AC from memory
Step 1 PC:300 PC:
3 = Load AC from I/O
IR:1941 IR:
Memory AC: AC:
300 0001100101000001 MAR: MAR:
1941 MBR: MBR:
301 0101100101000000 I/O AR: I/O AR:
302 0010100100111001 I/O BR: I/O BR:

303 0011000000000110

304 0101100100111001

305 0111000000000101

306

939 ?

940 0002

941 0003

I/O Devices

005 ?

006 007

You might also like