Logic and Truth Tables: What Is A Truth Table?
Logic and Truth Tables: What Is A Truth Table?
Logic Operations
AND And Statements These statements are true only when both
(conjunction) p and q are true (as the rigorous definition of and implies.)
p q pq Example: I will bring both a pen AND a pencil to the tutoring
T T T session. Only if I bring both is this true.
T F F .
F T F
F F F
p q ~p Step 2:
T T F
p q ~p q
T F F
F T T
Write down values of ~p (or not p)
F F T
p q ~p pq Step 3:
T T F T
T F F F p q ~p q
F T T F
F F T F Left Side: Is (p q) true? Use values from p and q columns.
p q ~p pq ~p q Step 4:
T T F T T
T F F F F p q ~p q
F T T F T
F F T F T Right Side: Is (~p q) true? Use values from ~p and q columns.
p q ~p pq ~p q p q ~p q Step 5:
T T F T T T p q ~p q
T F F F F T
F T T F T F Is the entire statement true? No.
F F T F T F
The entire statement is true only when the last columns truth values are all True. In this
case, (p q) is not equivalent to (~p q) because they do not have the same truth values.
If every cell in the last column is True, then the entire statement is true.
This is called a tautology.
A logical argument is made up of two parts: the premises and the conclusion.
Arguments are usually written in the following form:
Arguments of this form can be turned into a logical statement. First, assign variables to each
premise and conclusion.
It is cold = p
If it is cold, then my motorcycle will not start.
It is not cold = ~p
My motorcycle started.
My motorcycle will start = q
It is not cold. My motorcycle will not start = ~q
You can now re-write the argument using logical operators. Look for keywords like if and
not.
Finally, the argument can be rewritten as a logical statement. Arguments can always be
written in the following form:
[ (p ~q) q ] ~p
This statement can then be proven valid or invalid using a truth table, as shown on the
following page.
Statement: [ (p ~q) q ] ~p
p q
T T Step 1:
T F Determine the number of variables and rows needed,
F T then write down all possible combinations of p and q.
F F
p q ~p
T T F Step 2:
T F F [ (p ~q) q ] ~p
F T T Write down values of ~p (or not p)
F F T
p q ~p ~q Step 3:
T T F F [ (p ~q) q ] ~p
T F F T Write down values of ~q (or not q)
F T T F
F F T T
Step 4:
p q ~p ~q (p ~q)
[ (p ~q) q ] ~p
T T F F F
T F F T T Left Side: Start within the inner most parentheses. Is (p ~q)
true? Use values from p and ~q columns.
F T T F T
F F T T T
Step 5:
p q ~p ~q (p ~q) (p ~q) q [ (p ~q) q ] ~p
T T F F F F Left Side: Work outwards towards the outer
T F F T T F most parentheses. Is [ (p ~q) q ] true?
F T T F T T Use values from (p ~q) and q columns.
F F T T T F
p q ~p ~q (p ~q) (p ~q) q [ (p ~q) q ] Step 6:
~p [ (p ~q) q ]
T T F F F F T
T F F T T F T ~p
F T T F T T T Is the entire statement true?
Yes. This is a tautology
F F T T T F T