Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The Hypothetical Machine instructions 0001 Load AC from memory 0010 Store AC to memory 0101 Add to AC from memor Assume that instructions begin in
The Hypothetical Machine instructions 0001 Load AC from memory 0010 Store AC to memory 0101 Add to AC from memor Assume that instructions begin in memory at location 300 and data is stored in memory beginning at location 940 (see textbook). Assume instructions are in hexadecimal. 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 mmories 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 memory location 300 PC 300 AC = 0 IR 1 940 Step 2 Execute the Instruction and increment the PC: load AC from memory location 940 PC = 301 AC 0003 IR 1 940 Step 3 Fetch instruction from memory 1 PC 301 AC 0003 IR 5941 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. The Hypothetical Machine instructions 0001 Load AC from memory 0010 Store AC to memory 0101 Add to AC from memor Assume that instructions begin in memory at location 300 and data is stored in memory beginning at location 940 (see textbook). Assume instructions are in hexadecimal. 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 mmories 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 memory location 300 PC 300 AC = 0 IR 1 940 Step 2 Execute the Instruction and increment the PC: load AC from memory location 940 PC = 301 AC 0003 IR 1 940 Step 3 Fetch instruction from memory 1 PC 301 AC 0003 IR 5941 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
Step 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