Assignment 7, due October 17

Part of the homework for 22C:60, Fall 2005
by Douglas W. Jones
THE UNIVERSITY OF IOWA Department of Computer Science

Always, on every assignment, please write your name legibly as it appears on your University ID and on the class list! All assignments will be due at the start of class on the day indicated, and unless there is what insurance companies call "an act of God" - something outside your control; the only exceptions to this rule will be by advance arrangement.

  1. Consider this C (or C++ or Java) if statement, where A and B are Boolean variables:
       if ((A && !B) || (B && !A)) { ... }
    
    (1/5 point each)

    a) Apply DeMorgan's Laws to the Boolean expression in this if statement to produce an equivalent if statement that uses or operators, and no and operators. (There will still, of course, be not operators scattered about.)

    b) Apply DeMorgan's laws as above, to produce an equivalent if statement that uses no or operators at all.

    c) Rewrite the original Boolean expression using a notation closer to Boole's original notation instead of the bizarre syntax of C.

    d) Draw a logic diagram for this Boolean expression, using the standard symbols for logic gates.

    e) Simplify the original if statement by making effective use of other Boolean operators. Hint: One operator suffices if you use the right one. If it doesn't pop into mind, try writing out the truth table for the expression.

  2. Do exercises i and j in Chapter 8 of the notes. (1/2 point each)

  3. Do exercise q from Chapter 8 of the notes. (1 point)