Lab 1 - Manipulating bits
Lab 1 was handed out on Thursday, Aug. 21. It is due 11:59 pm, Wed.,
Sept. 13. All files needed for the assignment are in the directory
/afs/cs.cmu.edu/academic/class/15213-f00/L1.
Some Advice
- Be sure to read the coding rules found in the header of bits.c. There is a lot more information there than in the lab handout.
- Be sure to use the program c2c to check your code for compliance with the rules.
- The code in sum3 is a little bit different from the
rest. Your job is to write expressions for variables word1
and word2, such that when added together, the result is
x+y+z. This final addition is performed by the function
sum. Don't make any other calls to sum in your
code.
Notes
You may need to retrieve new copies of the files in L1.tar as the
assignment proceeds.
- Friday, Sept. 1, 13:15.
Modified files bits.c and tests.c. The problem was that the old
set of tests expected isPower2(TMin) to return 1. But a negative number
can't be a power of 2.
- Friday, Sept. 1, 15:30. Modified file bits.c.
Fixed example shown as comment in bitMask. [Mistake found by Casey Helfrich.]
- Tuesday, Sept. 5, 08:46. Modified file bits.c.
Fixed examples shown as comment in
isNonZero. [Mistake found by Stephen Hack.]
- Monday, Sept. 11, 09:50. Modified file bits.c.
Clarified comment in fitsBits.
Dave OHallaron
Last modified: Wed Oct 4 20:17:02 EDT 2000