Homework 6, A few short programs.
Short Description:
Write the following programs to run on the simulator presented in class.
Goals
When you finish this homework, you should have:
- Have written programs in a simple machine language.
- Gained an understanding of the fetch decode execute cycle.
Formal Description
Please write the following programs in machine language for the 8 bit simulated computer presented in class.
- Three numbers are stored in memory (location your choice). Write a program the finds the sum of these numbers.
- Write a program that will compute and print the positive powers of two between 20 and 27. Hint: 2n+1 = 2n+2 n.
- Three positive numbers are stored in memory locations 13, 14, and 15. Write a program that will find and store the largest in the accumulator. I used every memory location to perform this task, so you are not required to output the value, just store it in the ACC.
Required Files
A word document that contains
- Identifying information (name, ...)
- The names of any collaborators, including AI systems.
- An algorithm or c/c++ code for each program.
- Assembly code for each program.
- Machine code for each program.
Submission
Submit the assignment to the D2L folder Homework 6 by the due date.