Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider a hypothetical machine with the following characteristics: Instruction

ID: 3628365 • Letter: C

Question

Consider a hypothetical machine with the following characteristics: Instruction Format Integer Format Program Counter (PC) = Address of Instruction Instruction Register (IR) = Instruction being executed Accumulator (AC) = Temporary storage Internal CPU registers 0001 Load AC from memory (1 decimal) 0010 Store AC to memory (2 decimal) 0011 No operation (3 decimal) 0101 Add to AC from memory (5 decimal) Using the diagram of memory components shown below, present on the following page, the changes that occur step-by-step in memory and registers as the instructions (300-304) are executed. Execute all instructions from 300 to 304. = if them are necessary

Explanation / Answer

The addresses and memory contents are in hexidecimal. Step 1 - location 300 has 1930. The left most nibble is 0001. This corresponds to the opcode to load AC from memory. The address portion of the word is 930 corresponding to the location 930 in memory which contains the value 932. So after step one, AC = 932. Step 2 - location 301 has 5931, the opcode here 0101 means add AC from memory (which is location 931 having the value 1000). Thus after step 2, AC = 932 + 1000 = 1932. Step 3 - location 302 has 2303, the opcode 2 means store ac to memory. The location is 303, so AC which has value 1932 is stored to memory location 303. Step 4 - location 303 now has 1932 value in it. The opcode here is 1, load AC from memory. The address is 932, so AC gets 30 now. Step 5 - location 304 has 5930. The opcode is 5 which means add to AC from memory. The address is 930, so to AC we add 932 (the contents of memory location 932). At the end, AC = 962 At each step, make sure the PC = location in memory and the IR = the value loaded from the PC location. Step 1 - PC = 300, IR = 1930 etc. Hope this helps.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote