This assignment will use the PIN machine simulator and the PIPPIN assembly language based on the Decker/Hirshfield text. The practice problems will include an introduction to this information (see Lab 6.1 or 7.5). An important reference page is the User's Guide on page 260 which gives a list of all available operations.
When you are satisfied, save your circuit in a file named "HalfAdd" for submission.
When you are satisfied, save your circuit in a file named "FullAdd" for submission.
0 LOD X 2 SUB Y 4 STO T4 6 CPL T4 8 JMZ 14 10 LOD Y 12 JMP 16 14 LOD X 16 STO W 18 HLTPlease try to save the above program, Mystery to your computer, and then load the file from disk when running PIP. For instance, to save the program if you are using Internet Explorer as your browser, click the right mouse button on the Mystery link, and select "Save Target As...". If you have trouble saving this file, you can instead start PIP form scratch and type the assembly instructions into PIP yourself.
This program considers locations X and Y as input, and W as the result. Our goal is to examine the behavior of the program. To do so, we will ask you to execute the program, step-by-step, recording many key values after each individual step. To begin, initialize the memory locations so that X=5 and Y=8. Execute the program one step at a time. After each step, record each of the following values in a table: {PC, ACC, W, X, Y, T4}. Continue until the program halts.
Reset the values so that {PC=0, W=0, X=12, Y=3, T4=0}. Now begin executing the program again, step-by-step, creating a second table which contains the values of these five locations after each step.
Hint: You can draw your conclusions based on examining the instructions, considering the executions above, or considering additional executions.
When complete, save your PIP configuration to a file named "Average" for submission.
Save your PIP program to a file named "Absolute" for submission.
Save your solution in a file named "Median".
Warning: When creating this problem, it seemed a reasonable challenge. Conceptually, it is straightforward. I will admit that by the time I sat and wrote such a program, it involved over 30 instructions.