A. Notes

Boolean expressions such as !A && !(B && !C) are called compound boolean expressions since !, && or || are used to connect multiple boolean variables.

We can build a truth table to find out what ordered pairs or triples will make a compound boolean expression true (or false).

When evaluating a compound boolean expression, it's a good practice to evaluate one part at a time.

B. HWs

1. What ordered pair(s) will make the following boolean expressions false?

A || ! B

!(A&&B) || A

2. What ordered triple(s) will make the following boolean expressions true?

!A || !B || !C

!(A || B || C)

!(A && B && C)

3. Assume that both a and b are integers. Will "a > b and b < 0" make the following boolean expression always true?

!(a <= b) && (a * b > 0)

4. Given that a, b, and c are integers, consider the boolean expression

(a < b) || !((c == a * b) && (c < a))

which of the following will guarantee that the expression is true?

(A) c < a is false.

(B) c < a is true.

(C) a < b is false.

(D) c == a * b is true.

(E) c == a * b is true, and c < a is true.

1. A=0, B=1 A=1, B=1 A=0, B=0

2. A=1, B=1

3. A=0, B=0, C=0 A=1, B=0, C=0 A=1, B=1, C=0 A=1, B=0, C=1 A=0, B=1, C=0 A=0, B=1, C=1 A=0, B=0, C=1

4. [A=1, B=0, C=0], [A=1, B=1, C=0], [A=1, B=0, C=1], [A=0, B=1, C=0], [A=0, B=1, C=1], [A=0, B=0, C=1], [A=1, B=1, C=1]

5. A=1, B=1, C=1

6. yes

7.

B