CSE 321 Assignment #1
Autumn 1998
Due: Friday, October 2, 1998 at the beginning of class.
Reading assignment: Read the text, Discrete Mathematics and Its Applications, sections 1.1 - 1.3.
The following problems are from the Third Edition of the text.
Practice Problems: Section 1.1, problems 7, 15, 27.
Problems:
- We'd like to quickly learn who you are: Attach a picture containing
your current face to the upper right corner of an index card. Write your name
in the upper left corner. On the rest of the card write anything else about
yourself that you like, especially those things that might make it easier for
us to remember you.
- Section 1.1, Problem 8, all parts except (d).
- Section 1.1, Problem 18 (f)
- Section 1.1, Problem 22 (a), (c).
- Section 1.1, Problem 28.
- (Bonus) Section 1.1, Problem 26.
- (Bonus) Show how to swap the contents of two n-bit registers
using no extra storage and only the bit operators AND, OR, and XOR. For
example, if register 1 contains X and register 2 contains Y, then you can
perform the bitwise XOR of X and Y and store the result in register 1.
After this, the contents of register 1 is X XOR Y
and the contents of register 2 is Y.