haas/spring2026/comporg/projects/images/pnc0runtime.png
... ...
Binary files /dev/null and b/haas/spring2026/comporg/projects/images/pnc0runtime.png differ
haas/spring2026/comporg/projects/images/pnc0runtime_nocycles.png
... ...
Binary files /dev/null and b/haas/spring2026/comporg/projects/images/pnc0runtime_nocycles.png differ
haas/spring2026/comporg/projects/images/pnc1runtime.png
... ...
Binary files /dev/null and b/haas/spring2026/comporg/projects/images/pnc1runtime.png differ
haas/spring2026/comporg/projects/images/pnc1runtime_nocycles.png
... ...
Binary files /dev/null and b/haas/spring2026/comporg/projects/images/pnc1runtime_nocycles.png differ
haas/spring2026/comporg/projects/images/pnc2runtime.png
... ...
Binary files /dev/null and b/haas/spring2026/comporg/projects/images/pnc2runtime.png differ
haas/spring2026/comporg/projects/pnc0.md
... ...
@@ -0,0 +1,95 @@
1
+# CSCS2650 Computer Organization
2
+
3
+# PROJECT: PRIME NUMBER COMPUTATIONS (pnc0)
4
+
5
+## OBJECTIVE
6
+
7
+Start exploring algorithm/implementation comparison and optimization with
8
+respect to various approaches of computing prime numbers.
9
+
10
+## GRABIT
11
+
12
+There is a GRABIT available, containing some skeleton code, an XML file,
13
+and a Makefile, that will facilitate building the cartridge.
14
+
15
+## TASK
16
+
17
+Implement two separate, independent programs, one in Vircon32 C, and
18
+other in Vircon32 assembly, that:
19
+
20
+ * performs a brute force/"trial-by-division" process on a range of values, 2-N
21
+ * the values for N are some sufficient quantity still small enough to fit within an integer
22
+ * the values for N will have some relationship (powers of 2, powers of 10/magnitudes) that ideally can be computed via some loop/equation (ie 1024, 2048, 4098, 8192, 16384, etc.)
23
+ * the values for N have some sufficient quantity large enough where its upper set values will take some amount of time to compute (fast enough to have some relatable value, not to exceed 16 seconds)
24
+ * for each value of N:
25
+ * display that N/upper bound
26
+ * tally: display the number of primes identified (2-N)
27
+ * display the amount of time taken to do the total computation for that value of N, out to 3 decimal places
28
+ * display each N value and result in an arrangement on the screen that can be clearly identified and read by the viewer
29
+ * timing should go out, as reasonable, to a few decimal places, and should be consistent across all attempts.
30
+ * timing is on the computational process only, not the display of results.
31
+ * create a graph (using some external tool) that plots the performance of the C and assembly implementations working on identical workloads of this brute force algorithm according to the various N's and the time it took. Share your graph of your results on the class discord and on the project documentation page.
32
+ * a line graph is the suggested best candidate
33
+ * the assembly version is to be done entirely by hand, and make zero use of C API functions. Just the usual in/out stuff we've been doing.
34
+ * this will not be an interactive program: it starts up, does its thing, outputs it results, then halts.
35
+ * this brute force implementation is meant as our baseline. As such, it should not contain any optimizations or attempted improvements. As we progress through `pnc1` and `pnc2`, this base implementation should be the least efficient. This is important, to allow us to realize the impact of various improvements we will be making in those upcoming projects.
36
+
37
+## REFERENCE
38
+
39
+The following are reference screenshots of what your implementations
40
+should approximate:
41
+
42
+### PNC0 C IMPLEMENTATION
43
+
44
+![PNC0/C runtime](images/pnc0runtime.png)
45
+
46
+## SUBMISSION
47
+
48
+To be successful in this project, the following criteria (or their
49
+equivalent) must be met:
50
+
51
+ * Project must be submit on time, by the deadline.
52
+ * Late submissions will lose 33% credit per day, with the submission window closing on the 3rd day following the deadline.
53
+ * Processing must be correct based on input given and output requested
54
+ * Output, if applicable, must be correct based on values input
55
+ * Code must be nicely and consistently indented and aligned
56
+ * Code must be consistently written, to strive for readability from having a consistent style throughout
57
+ * Code must be commented
58
+ * Sufficient comments explaining the point of provided logic **MUST** be present
59
+ * Track/version the source code in your private semester repository
60
+ * Submit a copy of your source code to me using the **submit** tool by the deadline.
61
+
62
+## SUBMIT TOOL USAGE
63
+
64
+Let's say you have completed work on the project, and are ready to
65
+submit, you would do the following (once on LAB46, with all your data
66
+present):
67
+
68
+```
69
+lab46:~/src/SEMESTER/DESIG/pnc0$ make submit
70
+```
71
+
72
+You should get some sort of confirmation indicating successful submission
73
+if all went according to plan. If not, check for typos and or locational
74
+mismatches.
75
+
76
+### RUBRIC
77
+
78
+I'll be evaluating the project based on the following criteria:
79
+
80
+```
81
+156:pnc0:final tally of results (156/156)
82
+*:pnc0:submitted working C and assembly implementations [26/26]
83
+*:pnc0:post screenshots to class DISCORD channel [26/26]
84
+*:pnc0:processing is correct, and to specifications [26/26]
85
+*:pnc0:no optimizations or improvements on the process [26/26]
86
+*:pnc0:graph produced from timing data produced [26/26]
87
+*:pnc0:timing data is taken out to at least 3 decimal places [26/26]
88
+```
89
+
90
+### ADDITIONALLY
91
+
92
+ * Solutions not abiding by spirit of project will be subject to a 50% overall deduction
93
+ * Solutions not utilizing descriptive why and how comments will be subject to a 25% overall deduction
94
+ * Solutions not utilizing indentation to promote scope and clarity or otherwise maintaining consistency in code style and presentation will be subject to a 25% overall deduction
95
+ * Solutions not organized and easy to read (assume a terminal at least 90 characters wide, 40 characters tall) are subject to a 25% overall deduction