Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The things commented out on my code are what needs to be done I believe The Hypothetical Machine instructions 0001 Load AC from memory 0010
The things commented out on my code are what needs to be done I believe
The Hypothetical Machine instructions 0001 Load AC from memory 0010 Store AC to memory 0101 Add to AC from memory Assume that instructions begin in memory at location location 940 (see textbook). Assume instructions are in hexadecimal. 300 and da ta is stored in memory beginning at PART 1: the initial simulator In your simulator you will have an instruction memory, which contains the instructions to be executed, and a data memory which contains data for calculations, etc. Use a separate array for each of these Your instructions will start from index [0] and populate the array sequentially. When the simulation is written to the file the first memory location is displayed as 300. Similarly, your data will start from index [0] and populate the array sequentially. When the simulation is written to the file the first memory location is displayed as 940 When the simulator initializes, print BEGIN SIMULATION at the top of the screen and display the contents of both memories. Instruction Memory 300 1940 301 5941 302 2941 Data Memory 940 3 941 2 For each Step, give a description and the value of the PC, AC, and IR registers. For example: Step 1 Fetch instruction from PC 300 AC 0 IR- 1940 memory location 300 Step 2 Execute the Instruction and increment the PC: load AC from PC = 301 AC 0003. IR 1940 memory location 940 Step 3 Fetch instruction from PC 301 AC = 0003. IR= 5941 memory location 301 If memory is updated it should be described in the appropriate step Finally, display both memory contents and the print END SIMULATION Instruction Memory 300 1940 301 5941 302 2941 Data Memory 940 3 941 5 Pay attention to formatting each memory location is separated by a tab, each step is separated by an empty line, etc. #includeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started