CS 213 Fall '99
Notes on Assignments and Exams

In the following, $coursedir refers to directory /afs/cs.cmu.edu/academic/class/15213-f99/

Final exam ( ps, pdf, solutions )

To help prepare for your final, here are the past year finals:

Lab 5 - Designing a Chat Client (ps, pdf)

L5 Important Facts

Errata

Exam 2 ( ps, pdf, solutions )

Exam 2 will be held in Dougherty Hall, Room 2210 from 7:30--9:00 pm, Tuesday November 16. There will be no class during the regularly scheduled time that day. Coverage will include all of the lecture material, up through (and including) class 22 (Nov. 4). In addition, you will be expected to have really done all of the work required for homeworks H1a through H4, as well as labs L1 through L4.

Here are some logistical issues:

To help you get started, you will find some useful practice problems on last year's Exam 2 postscript or Adobe Acrobat, with solutions. Only the following problems overlap the material we've covered in the course so far: 3, 4 (already covered by Exam 1), 5, 6, 7. Also, there are some topics that you can expect to see on the exam that aren't covered by the old exam:

We don't have any practice problems in these areas, but the questions will all be related to material covered in the labs and homeworks.

Homework H4 - Address translation (No handin, for exam practice only) (ps, pdf)

The purpose of this homework is to give you some practice with address translation. It won't be graded and there is no handin.

Lab 4 - Optimizing Matrix Transpose (ps, pdf)

L4 Important Facts

Lab 3 - Implementing a Dynamic Storage Allocator (ps, pdf)

L3 Important Facts

Homework Assignment H3 (ps, pdf)

H3 Important Facts

Exam 1 ( ps, pdf, solutions )

Note: The average score on exam 1 was 47/67 (70%). Max score was 64/67

Exam 1 will be held in class on Tuesday, October 5. Coverage will include all of the lecture material, up through (and including) class 10 (Sept. 23). Floating point will be covered. In addition, you will be expected to have really done all of the work required for homeworks H1a, H1b, and H2, as well as labs L1 and L2.

Here are some logistical issues:

To help you get started, we have created a practice exam available in postscript, with solutions. This exam was created by adapting problems from last Fall's version of the course, converting code to IA32. They are fairly representative of the styles of problems you will encounter. These problems, and their answers, will be covered in recitations on Monday, October 4. Note also that we don't guarantee that these practice problems cover the entire scope of the problems you'll encounter on the exam. Be sure to study the lecture notes and to review the homework and lab material.

Homework Assignment H2 (ps, pdf)

H2 Important Facts

Lab Assignment L2 (ps, pdf)

L2 Important Facts

Homework Assignment H1b (ps, pdf)

H1b Important Facts

Homework Assignment H1a (ps, pdf)

Solutions

H1a Important Facts

Lab Assignment L1 (ps, pdf)

9/1/99:I fixed a bug in c2c that caused it to miscount operators like "+=" and "|=". I also added a "-e" option to emit the operator count for each function. The new version of c2c is in $coursedir/L1/c2c. [droh]

L1 Frequently Asked Questions

Q1: Are we allowed to do X or assume Y?
A1: First check the CODING RULES section of bits.c or use c2c (see below). If you're still not sure, post or send mail to droh@cs.

Q2: Are we allowed to create local variables in our functions?
A2: Yes.

Q3: What is c2c?
A3: c2c is a modified ANSI C front-end that we'll use to check your Lab 1 handins for compliance with the coding rules that are documented in bits.c. It is available to you in $coursedir/L1/c2c. It runs on RedHat 5.2 Linux systems such as our Intel Cluster machines. c2c checks for illegal operators (e.g., "-"), illegal constructs (e.g., "if"), and illegal constants (e.g., "0x1ff") and prints error messages for each use. It also counts the number of operators used in each function and prints a warning if this number exceeds the legal limit for that function. If you call it with the "-e" options, it will also print the number of operators used by each function.

Example:
% ./c2c bits.c
cs213:bits.c:43:bitOr: Illegal operator (!)
cs213:bits.c:153:negate: Warning: 7 operators exceeds max of 6
cs213:bits.c:165:logicalShift: Warning: 27 operators exceeds max of 24
%

In this example, c2c found an illegal "!" operator in function bitOr, and it warned us that we were using too many operators for the negate and logicalShift functions.

Q4:For leastBitPos, the handout says 18 maxops, and bits.c says 45 maxops. Which is it?
A4: 45 is the maximum number of operators allowed for leastBitPos.