Drexel dragonThe Math ForumDonate to the Math Forum

Ask Dr. Math - Questions and Answers from our Archives

Truth Tables: And, Or, Implies, Not

Date: 06/10/2001 at 22:08:15
From: Lisa
Subject: Truth Tables

I have looked in the textbook about how to do truth tables, and it 
really doesn't explain or show how to do it. Can you please email 
me an explanation and some examples?

Thank you for your time.


Date: 06/11/2001 at 17:39:13
From: Doctor Tony
Subject: Re: Truth Tables

Hi Lisa,

Thanks for writing to Ask Dr. Math.  

Essentially, truth tables allow you to evaluate every possibility for 
a given logic statement. Each of the basic operations (and, or, 
implies, not) has a truth table associated with it. 

The easiest way to explain is through examples. Let's form the truth 
tables for the set of operations I listed above, and then build a 
truth table for an example logic statement.

Example 1: ~p  (not p)

We only have one logic variable, p, which can either be true or false.  
The first column of the truth table will contain all possible values 
of p.  The second column will give the appropriate value for ~p.

     p  |  ~p
     T  |   F
     F  |   T

That is the truth table. This was a pretty simple one, since it only 
involved one logic variable.

Example 2: p^q  (p and q)

Now there are two logic variables, p and q; therefore, our truth table 
will have 4 rows, since there are four possible arrangements of p and 
q. In general, if there are n logic statements involved, there will be 
2^n rows in the truth table.

    p  q  |  p^q
    T  T  |   T
    T  F  |   F
    F  T  |   F
    F  F  |   F

So we see that p^q is only T if both p and q are T - it makes sense.

Example 3: p\/q  (p or q)

    p  q  |  p\/q
    T  T  |   T
    T  F  |   T
    F  T  |   T
    F  F  |   F

We see that p\/q is only F if both p and q are F.

Example 4: p->q  (p implies q)

    p  q  |  p->q
    T  T  |   T
    T  F  |   F
    F  T  |   T
    F  F  |   T

Now let's do a more complicated example. Let's make a truth table for 
the logic statement ~p^(q\/r):

    p  q  r | ~p | q\/r | ~p^(q\/r)
    T  T  T |  F |  T   |     F
    T  T  F |  F |  T   |     F
    T  F  T |  F |  T   |     F
    T  F  F |  F |  F   |     F
    F  T  T |  T |  T   |     T
    F  T  F |  T |  T   |     T
    F  F  T |  T |  T   |     T
    F  F  F |  T |  F   |     F

As the last column shows, this statement is true for three out of the 
eight possible truth states of the logic variables.

I hope this helps. If you're still stuck, please feel free to write 

- Doctor Tony, The Math Forum
Associated Topics:
High School Logic

Search the Dr. Math Library:

Find items containing (put spaces between keywords):
Click only once for faster results:


parts of words whole words

Submit your own question to Dr. Math

[Privacy Policy] [Terms of Use]


Ask Dr. MathTM