header

Truth Table Examples

Example 1

The art show was enjoyable but the room was hot.

Step 1: Use a variable to represent each basic statement.

P: The art show was enjoyable.
Q: The room was hot.

Step 2: Write the compound statement in symbolic form.

P ^ Q

Notice that even though the original sentence had the word "but" instead of "and" the meaning is the same.

Step 3: Determine the order in which the logic operations are to  be performed.

In this case, only one logic operation is being performed.

Step 4: Set up the truth table.

Since there are two variables, there are four rows in the table (two raised to the power of two). There are three columns; two for the variables and one for the conjunction.

Example 1, Step 4

Step 5: Complete the table from left to right.

There is only one column to complete. The exceptional case for conjunction has been highlighted.

Example 1, Step 5

 

Example 2

If the tire is flat then I will have to remove it and take it to the gas station.

Step 1: Use a variable to represent each basic statement.

P: The tire is flat.
Q: I have to remove the tire.
R: I have to take the tire to the gas station.

Step 2: Write the compound statement in symbolic form.

P -> (Q ^ R)

The parentheses are included for the sake of clarity. They are not needed here since conjunction has a higher precedence than the conditional.

Step 3: Determine the order in which the logic operations are to  be performed.

There are two logical operations in this expression. Conjunction has a higher precedence than the conditional so the operations will be performed in this order:

        And: Q ^ R
Conditional: P -> (Q ^ R)

Step 4: Set up the truth table.

Since there are three variables, the table will have eight rows (two to the power of three). There are five columns: three for the variables, one for the "and" operation and one for the conditional.

Example 2, Step 4

Step 5: Complete the table from left to right.

First, complete the column for the conjunction of Q and R. The exceptional case for the conjunction has been highlighted.

Example 2, Step 5a

The values found in the first and fourth columns are used to determine the correct values in the last column. Again, the exceptional cases (for the conditional, this time) have been highlighted.

Example 2, Step 5b

 

Example 3

If the boss doesn't like me or thinks I am lazy then she will not give me a raise and I will have to find another apartment.

Step 1: Use a variable to represent each basic statement.

A: The boss likes me.
B: The boss thinks I am lazy.
C: The boss will give me a raise.
D: I will have to find another apartment.

Notice that statements A and C are worded as positive statements. Remember that basic statements, as a rule, don't use the word "not".

Step 2: Write the compound statement in symbolic form.

(~A v B) -> (~C ^ D)

Step 3: Determine the order in which the logic operations are to  be performed.

There are five logical operators used in this statement. The leftmost parenthetical expression (~A v B) will be evaluated first. Within this expression, negation has a higher precedence than disjunction. In the second parenthetical expression the negation operation will be performed first and then the conjunction. Finally the conditional will be applied to the results. Here is the order in which the logic operations will be performed:

        Not: ~A
         Or: ~A v B
        Not: ~C
        And: ~C ^ D
Conditional: (~A v B) -> (~C ^ D)

Step 4: Set up the truth table.

This truth table will have sixteen rows since there are four variables (two raised to the fourth power is sixteen). There will be nine columns: four for the variables, and one for each logical operation arranged left to right in the order of precedence.

Example 3, Step 4

Step 5: Complete the table from left to right.

The first operation is the negation of A.

Example 3, Step 5a

The next operation is the logical Or applied to ~A and B.

Example 3, Step 5b

The values in the ~C column are simply the opposite of the corresponding values in the C column.

Example 3, Step 5c

The fourth operation is a conjunction (~C ^ D). The rows in which the exceptional case applies have been highlighted.

Example 3, Step 5d

Finally, the truth values of the conditional are determined using the ~A v B column and the ~C ^ D column. Remember that the exceptional case for the conditional is False when the premise is True but the conclusion is False.

Example 3, Step 5e