CSE 141L
Sample Files For Lab 2
Fall 2003
The following files are filled with the sample data given in the Lab 1 Project Specification and may be used in testing of your ISS for Lab 2.
These files will not be used in actual grading of Lab 2 and are available only to help you evaluate the correctness of your ISS.
- sample_mode.dmi: Sample data memory image for use with the Mode program.
Answer (value in DMem[2] at termination of program) is 04 (Decimal value: 4).
- sample_median.dmi: Sample data memory image for use with the Median program.
Answer (value in DMem[2] at termination of program) is 65 (Decimal value: 101).
- sample_mean.dmi: Sample data memory image for use with the Mean program.
Answer (value in DMem[2] at termination of program) is 72 (Decimal value: 114).
The following files are those that were used to grade the electronic turnin portion of Lab 2. Please use these files to test the correctness of your ISS before requesting a regrade.
Mean Files
- mean_normal.dmi: Data memory image where all values to be averaged are less than or equal to 16 to prevent overflowing.
Answer (value in DMem[2] at termination of program) is 0A (Decimal value: 10).
- mean_overflow.dmi: Data memory image where all values to be averaged are greater than 16 to intentionally test the case that the value of the sum need overflow handling.
Answer (value in DMem[2] at termination of program) is 8B (Decimal value: 139).
- mean_rounding.dmi: Data memory image where all values to be averaged range from 0 to 255. This instance tests overflow handling of the sum, as well as rounding up the final answer.
Answer (value in DMem[2] at termination of program) is A0 (Decimal value: 160).
Median Files
- median_rev.dmi: Data memory image where values are sorted in descending order (worst case for bubble sorting). The length of the array is even, which requires that the two "middle" numbers be averaged together. Furthermore, the result of the average must be rounded up.
Answer (value in DMem[2] at termination of program) is 0F (Decimal value: 15).
- median_half.dmi: Data memory image where half the values are sorted in reverse order (worst case for bubble sorting) and half the values are sorted in ascending order (best case for bubble sorting). The length of the array is even, which requires that the two "middle" numbers be averaged together. Furthermore, the result of the average must be rounded up.
Answer (value in DMem[2] at termination of program) is 0F (Decimal value: 15).
- median_full.dmi: Data memory image where values are sorted in ascendingorder (best case for bubble sorting). The length of the array is even, which requires that the two "middle" numbers be averaged together. Furthermore, the result of the average must be rounded up.
Answer (value in DMem[2] at termination of program) is 0F (Decimal value: 15).
Mode Files
- mode_short.dmi: "Short" data memory image, containing an array of 25 values, starting at memory address 26.
Answer (value in DMem[2] at termination of program) is 04 (Decimal value: 4).
- mode_medium.dmi: "Medium" data memory image, containing an array of 50 values, starting at memory address 51.
Answer (value in DMem[2] at termination of program) is 03 (Decimal value: 3).
- mode_long.dmi: "Long" data memory image, containing an array of 100 values, starting at memory address 101.
Answer (value in DMem[2] at termination of program) is 06 (Decimal value: 6).
Last Modified: November 16, 2003