Study Circle Project
Computer Organization I, Spring 2007, Study Circle Project PR 1 (24 pp)
The project has three separate parts (A, B, and C). They all have the same weight (8pp).
For your own sake, it is smart to participate fully into all partial projects. Of course, division of work is necessary, but the goal is still for all students to learn all the material in the project. You have the responsibility for your own learning,
Report contents are defined in the Study Circle description and the report deadline is give in course schedule page. Project may be turned in late, but late penalty is 12.5% of project pp's per day. For example, if the project is 30 hours late, each student will lose 6 pp (25%) from their final project points. Start early, work on the project all the time, and finish it early!
The topics are selected in the following manner:
- Take the day part of each participants birth date (E.g., number 5, if you were born 5.3.1988).
- Add up all day parts. (E.g., 5+13+8+25 = 51).
- Divide the sum of days by five, take the remainder and add one. (E.g., "51 mod 5 " +1 = 1+1 = 2). Use the result as the lecture number for selecting the first topic in the subproject A (E.g., Lecture 2).
- Divide the sum of days by five, take the remainder and add six. (E.g., "51 mod 5 " +6 = 1+6 = 7). Use the result as the lecture number for selecting the second topic for subproject A (E.g., Lecture 7).
- Divide the sum of days by seven, take the remainder and add four. (E.g., "51 mod 7 " +4 = 2+4 = 6). Use the result as the lecture number for selecting the subproject C topic (E.g., Lecture 6). If Lecture 4 (Subroutine Implementation) was selected, then interprete it to mean all Lectures 2-4 with topic "Ttk-91 Assembly Language Programming".
Subprojects
- Design and implement two (2) practice problems, one for each topic selected earlier. Please notice, that even though implementing practice problems is relatively easy, coming up with a good practice problem is not. Use appropriate time for planning before you jump into implementation.
- Design and implement a ttk-91 program that includes the following parts:
- Function Init(T, n, x, y), that initializes an n-element vector (one-dimensional array) T so, that T[i] = x*i + y.
- T is call-by-reference parameter, the others are call-by-value
- Must have 1 < n ≤ 100, -20 000 000 ≤ x ≤ +20 000 000, -100 000 000 ≤ y ≤ +100 000 000
- Returns value 0, if everything OK, and value ≠ 0, if some error occurred
(You can encode the error type in return value, if you want to)
- Function Print(T, n, a, b), that prints values of the elements T[a], .., T[b] of an n-element vector T
- T is call-by-reference parameter, the others are call-by-value
- Must have 1 < n ≤ 100, 0 ≤ a ≤ b < n
- Returns value 0, if everything OK, and value ≠ 0, if some error occurred
- Function WAver (T, U, V, n, wU, wV), that returns in vector T the weighted average of corresponding elements of vectors U and V: T = (wU*U + wV*V) / (wU+wV), I.e., T[i] = (wU * U[i] + wV * V[i]) / (wU+wV).
- T, U and V are call-by-reference parameter, the others are call-by-value
- T, U, V are vectors with n elements
- Any pair of vectors T, U or V can be the same
- Must have 1 < n ≤ 100, wU ≥0 , wV≥0, wU+wV > 0
- Uses at least one local variable (E.g., to store sum wU+wV)
- Returns value 0, if everything OK, and value ≠ 0, if some error occurred
- Function MyGrade (T, U, V, n), that returns in vector T (in its elements) the weighted sum of vectors U and V, with fixed weights 1 and 3, I.e., T[i] = (U[i] + 3 * V[i])/4.
- T, U and V are call-by-reference parameter, n is call-by-value parameter
- T, U, V are vectors with n elements
- Any pair of vectors T, U or V can be the same
- Must have 1 < n ≤ 100
- The computation of weighted sum vector T is done with function WAver()
- Returns value 0, if everything OK, and value ≠ 0, if some error occurred
- Main program, which
- Defines 4-element vectors A and B, as well as 10-element vectors E, F and G
- Initializes vectors A and B with function Init() so that A[i] = 100*i+10 and B[i] = i
- Prints out the values of vectors A and B with routine Print()
- Computes with function WAver() the average of vectors A and B into vector B, B[i] = (A[i] + B[i]) / 2.
- Prints out the values of vector B with routine Print()
- Initializes vectors F and G with function Init() so that F[i] = 1000000i and G[i] = 10000i +100
- Initializes vector E with function MyGrade() into the weighted average of vectors F and G.
- Reads indexes i and j from the user
- Prints out the values of elements i-j in vectors G, F, and E with routine Print()
- Repeat previous two parts until i is given value -1
Follow the recommended subroutine (function) call mechanisms given in the lectures. Project evaluators may use a different main program with completely differerent vectors.
If you want, you may simplify error processing in the following manner. With any error, just print out error signal "-1111" and immediately end program execution. With this approach one need not return to calling routines with non-zero function values. However, all possible parameter and other errors need to checked.
- Write a 4-5 page article (good language, plain text, no picture, no graphs) on the topic given above. It must not be more than 6 pages long. In your article, consider the overall topic, including all essentials and leaving out all non-essentials.
In your presentation please notice:
- The target audience is other students in this course. So, you can not assume any more background knowledge than what is required for this course and that has been covered in this course before this topic. All concepts not in the background knowledge should be introduced and explained in the presentation. The presentation should be easy to read for the target audience.
- The goal is to give (within the article length limit given) an exhaustive, educating presentation, that could be used as study material for this course.
- A good article states its goals right at the beginning, has a clear structure with a final summary. All text is new - it does not have any direct quotes or translations. The references are given at the end. For web references please give the URL and the date of which that URL was checked.
- The presentation may be published in the course web pages and it can be used as study material for later courses (if it is good, and the permission for such use is granted in project report).
Teemu Kerola