# Truth Table for discrete math logic

• Feb 13th 2007, 08:54 AM
chillerbros17
Truth Table for discrete math logic
mn
• Feb 13th 2007, 07:30 PM
Soroban
Hello, chillerbros17!

Quote:

The exclusive-or operation is defined by the following truth table:
Code:

```  p  q | p v q ------+-------  T  T |  F  T  F |  T  F  T |  T  F  F |  F```

Exclusive-or means "p or q but not both".

Quote:

a. Express p v q in terms of p, q, v, ^, ~
I would write: .(p ^ ~q) v (~p ^ q)

Quote:

b. Express p v q in terms of p, q, ^, ~, v
Tricky . . . the "or" is not in the list.

So I can't write: .p v q

But I can use DeMorgan's Law to write: .~(~p ^ ~q)

. . (This works: It says "It is not true that both are false".)

Quote:

c. Show that one of the distributive laws no longer holds when v is replaced by v.
Compare: . p v (q ^ r) .and ,(p v q) ^ (p v r)
Code:

```  p v (q ^ r)      (p v Q) ^ (P v R) ------------      -----------------  T F  T T T        T F T  F  T F T  T T  T F F        T F T  F  T T F  T T  F F T        T T F  F  T F T  T T  F F F        T T F  T  T T F  F T  T T T        F T T  T  F T T  F F  T F F        F T T  F  F F F  F F  F F T        F F F  F  F T T  F F  F F F        F F F  F  F F F   ↑      not equal      ↑```