Question: The following experiment will acquaint you with the simulation program. Experiment 4.1 Familiarize yourself with SimpSim by following the steps below to enter and execute
The following experiment will acquaint you with the simulation program.
Experiment 4.1
Familiarize yourself with SimpSim by following the steps below to enter and execute the following
machine language program.
Address Content
10 23
11 FF
12 12
13 10
14 50
15 23
16 30
17 40
18 C0
19 00
Step 1. Start SimpSim and enter the program by typing the following
data in the Main Memory window.
[10] 23 FF 12 10 50 23 30 40 C0 00
Step 2. Set the program counter to 10 by typing the following line in the Program Counter window.
[PC] 10
Step 3. Inspect the Main Memory display to confirm that the program has been properly
placed in memory starting at location 10 and that the program counter is set at 10.
Then, execute a single machine cycle by clicking the Step button
. What is the value of the program counter at this point? _______
What is the value in register 3 at this point? _______
Step 4. Click the Run button to continue executing the program until a halt instruction is reached.
What is the value of the program counter when the simulation halts? __________
What is the value in memory cell 40 when the simulation halts? _________
Step 5. Translate the program in this experiment into English and confirm that the simulator
performed the appropriate actions.
Step 6. Change the contents of the memory cell at address 14 to the hexadecimal value 60.
Then, execute this modified program by changing the program counter back to 10 and
clicking the Run button. Explain the difference in the actions of this program from those of
the original program.
< Finish explanation on back if necessary. >
Machine-Level Instructions
In the following experiments, you will examine some of the instructions found in a traditional
machine language.
Experiment 4.2
In this experiment you will investigate the various arithmetic and logic operations available on
the machine simulated by the application SimpSim.
Step 1. Clear the simulator's main memory and registers. Then, place the value 5C in register 1
and the value 3F in register 2. Finally, place the values 50 and 12 at memory locations A0
and A1, put the value A0 in the program counter, and execute a single machine cycle. Record
the value left in register 0 and explain this result.
Step 2. Place the value 60 at memory location A0, reset program counter at A0, and execute a
single machine cycle. Repeat this process using the values 70, 80, and 90. In each case record
the value that is placed in register R0 and explain the result.
Experiment 4.3
In this experiment you will investigate an application of masking.
Step 1. Start SimpSim and clear the simulated machine's main memory. Place the program below in the
memory cells from address 00 to 1D. Then, place the values 6F, 87, D0, 5E, 29, and 90 in the cells from
address A0 to A5.
Address Contents Address Contents
00,01 20,80 10,11 54,34
02,03 11,A0 12,13 34,03
04,05 81,10 14,15 34,0B
06,07 B1,0C 16,17 20,A6
08,09 22,00 18,19 B4,1C
0A,0B 32,A0 1A,1B B0,00
0C,0D 23,01 1C,1D C0,00
0E,0F 14,0B
Step 2. Run the program and record the changes in the values stored from address A0 through
A5. Assuming that the patterns represent values stored in floating-point notation, state a
general rule for determining which patterns are replaced by zeros. (Look at the sign bit of the
original patterns.)
Step 3. Alter the program so that it replaces only the negative values with zeros and test your
program. Record the changes you made below.
Experiment 4.4
In this experiment you will investigate the branch instruction found in the machine language
for the machine simulated by SimpSim.
Step 1. Start SimpSim and clear the simulated machine's main memory. Then, place the program
below in the memory cells from address F0 to FD.
Address Contents Address Contents
F0 20 F7 FC
F1 00 F8 50
F2 21 F9 01
F3 01 FA B0
F4 23 FB F6
F5 05 FC C0
F6 B3 FD 00
Step 2. Execute the program one step at a time by clicking the Single Step button. Record the
values of the program counter after each step.
Step 3. Explain the results obtained in Step 2.
Step 4. What changes should be made to the program in Step 1 if it were to be placed in
memory starting at location A0? Explain your answer.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
