Professional Documents
Culture Documents
Instruction:
Complete all questions in 2 hours.
1. Von Neumann Simulator. This program simulates a very simple computer with the von Neumann
architecture.
a. Download the von Neumann Simulator (VonNeumann.exe) program from google classroom
in the Week-7 folder. Save it in your Documents folder and run it. You will see a window
similar to this:
The simulator has a small program memory area which is available for programming. To
enter your program instructions simply click on the “Available” instruction on the list on the
right and then click on the “Memory” location you wish to put it in.
Fundamentals of Computing (4CS015) Workshop: Week 6
b. Load the following program in the memory and explain what does the program does?
LOADTEMP
ADD
LOADTEMP
ADD
DISPAAC
HALT
At first, program use loadtemp to load the input number and store it in the
temporary register sending it to accumulator for further calculation. Again, the
next number is entered to perform addition with previous number added already.
Finally, the added numbers output will be displayed and program is halted.
Fundamentals of Computing (4CS015) Workshop: Week 6
c. Write the program to add three numbers together and explain how does your code works?
Fundamentals of Computing (4CS015) Workshop: Week 6
At first, entered number is loaded and stored in temporary register and sent it to
accumulator for the calculation. Similarly, again the two more numbers will be performed in
the same way. During the program, program counter gives the number of lines of code
performed and output is displayed in output through accumulator.
-9+3-7
Fundamentals of Computing (4CS015) Workshop: Week 6
13-7+19
7+(7*3)
3+(3*7)