All files you need are in the directory
/afs/cs/academic/class/15213-s02/labs/
Start by copying the file datalab-handout.tar from that directory to a
(protected) directory in which you plan to do your work. Then give
the command: "tar xvf datalab-handout.tar". This will cause 8 files to be
unpacked into the directory: README, Makefile, bits.h,
btest.h, bits.c, btest.c, decl.c, and
test.c. The only file you will be modifying and turning in is
bits.c. The file btest.c allows you to evaluate the
functional correctness of your code. The file README contains
additional documentation about btest. Use the command
make btest to generate the test code and run it with the command
./btest.
Looking at the file bits.c you'll notice a C structure
team into which you should insert the requested identifying
information about the one or two individuals comprising your
programming team. Do this right away so you don't forget.
The bits.c file also contains a skeleton for each of
the 15 programming puzzles. Your assignment is to complete each
function skeleton using only straightline code (i.e., no loops
or conditionals) and a limited number of C arithmetic and logical
operators. Specifically, you are only allowed to use the
following eight operators:
! ~ & ^ | + << >>
A few of the functions further restrict this list.
See bits.c for the detailed rules.