logo

Study on Fundamentals of Computing

5 Pages1038 Words118 Views
   

Added on  2020-05-16

Study on Fundamentals of Computing

   Added on 2020-05-16

ShareRelated Documents
4CS015 Fundamentals of Computing – Workshop #6This is a marked workshop. It forms the Fourth part of your portfolio. You will need to complete the workshop and then submit a copy of this document with a title that follows the following format (“DENNETT 1234567 wsp3.docx”), via CANVAS, before 11.59pm, Sunday, 26th November 2017The Von Neumann simulator can be found on CANVAS.Workshop tasks:1.Von Neumann Simulator. This program simulates a very simple computer with the von Neumannarchitecture.a.Download the von Neumann Simulator (VonNeumann.exe) program from WOLF in the Week 5 folder. Save it in your Documents folder and run it. You will see a window similarto 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. This simulator understands only the following ten instructions:
Study on Fundamentals of Computing_1
NOPNo Operation, i.e. do nothing.LOADTEMPGet a number from the keypad, completed by the Enter key, into the Temporary Register.LOADLOOPGet a number from the keypad, completed by the Enter key, into the Loop Register.CLRDISPClear the Display.ADDAdd the Temporary Register to the Accumulator SUBSubtract the Temporary Register from the Accumulator DISPACCDisplay the contents of the AccumulatorSTRTBLKStart of Loop BlockENDBLKEnd of Loop BlockHALTHalt. Stop Programb.Load the following program into the memory:LOADTEMPADDDISPACCHALTTo do this, first click on the “LOADTEMP” in the list of instructions on the right of simulator window. Then click on Memory location with “Address 0 Contains NOP”. This will then change into “Address 0 Contains LOADTEMP”. Repeat the process with “Address 1” and so on until the whole program is loaded.c.Run the program by clicking on the “Run” button. The simulator would highlight the Address 0 location and then pause. It is executing the instruction “LOADTEMP” which requires you to input a number into the keypad. Click 2 or 3 numbers on the keypad and then click the “Enter” button. The simulator will then resume running the program and execute the instruction “ADD”. This adds the number that you just entered, to the zero in the accumulator. The next instruction is “DISPACC” which stands for “Display Accumulator”, and it does exactly that. After than the simulator stops running the program when it executes the instruction “HALT”.d.Load the following program into the simulator:LOADTEMPADD
Study on Fundamentals of Computing_2

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Computer Science Exam Questions
|10
|980
|384

put all your answers in the accompanying Word document
|2
|399
|378