Now that we know the behavior of each of the $6$ logical operators, we can build truth tables for any statement / expression as wanted. Let's for example, build the truth table for the expression $(p \vee q) \wedge \neg r \vee p$ that we got on slide 7:
$p$ | $q$ | $r$ | $p \vee q$ | $\neg r$ | $(p \vee q) \wedge \neg r$ | $\boldsymbol{(p \vee q) \wedge \neg r \vee p}$ |
---|---|---|---|---|---|---|
$0$ | $0$ | $0$ | $0$ | $1$ | $0$ | $0$ |
$0$ | $0$ | $1$ | $0$ | $0$ | $0$ | $0$ |
$0$ | $1$ | $0$ | $1$ | $1$ | $1$ | $1$ |
$0$ | $1$ | $1$ | $1$ | $0$ | $0$ | $0$ |
$1$ | $0$ | $0$ | $1$ | $1$ | $1$ | $1$ |
$1$ | $0$ | $1$ | $1$ | $0$ | $0$ | $1$ |
$1$ | $1$ | $0$ | $1$ | $1$ | $1$ | $1$ |
$1$ | $1$ | $1$ | $1$ | $0$ | $0$ | $1$ |