This assignment introduces some basic ideas about computer organization with programming and algorithm design. The key question addressed here is, "How does a computer carry out the steps of an algorithm?" The readings and exercises for this assignment are taken from portions of chapters 5 and 6 of your text.
This window has two columns. On the left is a listing of the original assembly language program and on the right is a copy of that listing that is checked for errors and has been translated into machine code. The actual machine code doesn't appear until you select Execute in the Assembler menu. At that point, the following additional window will open.
This is a simulator for the machine that is introduced and discussed in Chapter 5. In the right-hand window is the original Assembly language program and in the center is the (binary) representation of the machine instructions that correspond to each instruction in that program. You should refer to Chapter 5 for more details about the role of the PC, IR, etc in the left-hand column and the structure of the machine instructions themselves.
To run this program, select the Run button and observe that a binary number appears in the Output window on the left. You should get the same result that appears above.
1. Describe in pseudocode what this program does.
At the machine level, everything is done in binary, including input
and output. Running some programs, such as EXAMPLE2.ASM,
requires binary input, which is prompted by the following "Cell
Editor" window where you can enter the 0s and 1s that make up a binary
Run the program EXAMPLE2.ASM by entering the binary input requested
and observing the Output window's contents when the program halts.
2. Describe in pseudocode or in English what this program
Now run the program EXAMPLE3.ASM in the same fashion.
3. Describe in pseudocode or in English what this program
Be sure to justify your answers! You may do these exercises (except the last one) either by hand or with a word processor (e.g. MS Word). Also, you may choose to do this assignment either by yourself or in a group. However, solutions should be written up individually and handed in on the due date.
To submit a file electronically, you should first rename it so that you are identified as the author (e.g., give it a name like lab-x-ltoma). Then drag the file to the csci107 -> Drop Box folder. Be careful not to drag an entire folder into the Drop Box; only a single file at a time can be submitted.