The goal of this assignment is to get a deeper understanding of number representations and bit manipulations.

  1. Exercise #2, page 69 from the textbook.

  2. Exercises #9, #10 and #12, page 70 from the textbook.

  3. Programming exercise #15, page 71 from the textbook. It is easier to trace the correctness of your code by manipulating bits in a one-byte variable (instead of a 4-byte variable, as mentioned in the textbook), so you may do so. The variable should be of type char.

    In your csc2400 directory, create another directory called bits. Your program should be named bitchange.c and should be located in the directory csc2400/bits. Do not make changes to your progam after the deadline for this assignment.

Turn in your written solutions to the textbook problems, along with a printout copy and a sample execution of your code (copy and paste from the Unix terminal into a Word document, then print).

Good luck, and have fun!