Homework 1
Please answer the following questions in a document. Sloppy or unreadable documents will receive a credit deduction.
- [12 points] Draw a diagram of a typical CPU.
- Label each component.
- Briefly describe the purpose/function of each unit.
- [4 points] Draw a diagram of a SIMD architecture label each component.
- [4 points] State the transistor variation of Moore's Law.
- [6 points] Give the algorithm for the fetch-decode-execute cycle. Describe the components of a CPU primarily involved with each step.
- [4 points] Describe the difference between a special purpose register and a general purpose register.
- [10 points] Use the simple assembly language discussed in the notes. Assume memory contains the following
Address | Value |
0 | load R0, 9 |
1 | load R1, 9 |
2 | load R2, 8 |
3 | sub R1, R1, R2 |
4 | jumpz R1, 7 |
5 | add R0, R0, R1 |
6 | jump 3 |
7 | halt |
8 | 1 |
9 | 5 |
- What are the contents of register 0 when this program is finshed executing?
- What does this program do? Provide equivalent C/C++ code.