Question: Please try to explain the answer so I can learn too. thanks! Question 2 (25 marks) Figure Q2 shows the characteristics of a hypothetical machine,

 Please try to explain the answer so I can learn too.

Please try to explain the answer so I can learn too. thanks!

Question 2 (25 marks) Figure Q2 shows the characteristics of a hypothetical machine, relevant portions of memory, processor registers and some I/O devices. For the instruction format shown in Figure Q2(i), if it is an 1/0 instruction, bits 4 to 15 identifies a particular 1/0 device, else a memory address. Bit 0 15 Opcode Memory address or I/O device number (i) Instruction format 1 IS Bit o Sign Magnitude (ii) Integer format Program counter (PC) = Address of instruction Accumulator (AC) - Temporary storage Instruction register (IR) = Instruction being executed (iii) Internal CPU registers 0010 Store AC to memory 0011 = Load AC from 10 0101 = Add to AC from memory (iv) Partial list of opcodes 600 601 602 Memory 3009 5888 2889 CPU registers 600 PC AC IR 888 889 0008 10 Devices 000B Dev 9 (All numbers are in hexadecimal) (1) Contents of memory, registers and I/O devices at start of program Figure 02 SINGAPORE UNIVERSITY OF SOCIAL SCIENCES (SUSS) Page 3 of 6 3/6 ICT114 Tutor-Marked Assignment (a) How many memory locations can this processor address? (1 mark) (b) This hypothetical machine is to execute the following program: 1. 2. 3. Load AC from device 9. Add contents of memory location 888. Store AC to memory location 889. There are three fetch and three execute cycles. The process can be divided into six steps or cycles. For each step or cycle, demonstrate what happens and list the contents of the following registers: (ii) PC at the start of each cycle, AC at the end of each cycle and IR at the end of each cycle. (iii) Assume the initial values are as given in Figure Q2(v). Summarise your answer using the format given in Table Q2. Step 1 Fetch PC at start of cycle ? Description AC at end of cycle ? IR at end of cycle ? ? ? 2 ? Execute Description

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!