Hi,
I'm going to have a 'easy' maths exam (it's meant to be easy, it's not easy for me at all) in which we are expected to write out truth tables...
Can someone please mention the basic rules that I can apply...
Thank you!
Hi,
I'm going to have a 'easy' maths exam (it's meant to be easy, it's not easy for me at all) in which we are expected to write out truth tables...
Can someone please mention the basic rules that I can apply...
Thank you!
A truth table will list some number of arguments and specify the corresponding truth value when a logical operation is performed, for all possible inputs. So, here's a truth table for AND
p AND q is only true when both p and q are true (this fits with our normal notion of what "and" means. For example, "I'm hungry and tired" is only true if both "I'm hungry" is true and "I'm tired" is true).Code:p q p AND q = = ======= F F F F T F T F F T T T
It is possible to take more than two arguments, for example
If you happen to know binary, it could help with listing out the possible argument combinations. So, for the above,Code:p q r (p AND q) OR r = = = ============== F F F F F F T T F T F F F T T T T F F F T F T T T T F T T T T T
F F F <--> 0 0 0
F F T <--> 0 0 1
F T F <--> 0 1 0
...
T T T <--> 1 1 1
where I'm using <--> to mean corresponds with.
Your truth table will have $\displaystyle 2^n$ rows, where n is the number of variables you have. Start on the last variable, and write out T, F, T, F on each row $\displaystyle 2^n$ times.
So for instance, if you have three variables:
A B C
You, want to write alternating T, F for C, 2^3 = 8 times.
Then, you write alternating T, T, F, F for B,
Then, you write alternating T, T, T, T, F, F, F, F for A
Hello, Student122!
There is no easy way to explain Truth Tables.
Perhaps an example will help.
I'll deliberately break this up into separate steps.
They can be combined in one truth table, of course.
Example .Construct the truth table for: .$\displaystyle \bigg[(p \vee q) \:\wedge \sim p\bigg] \;\to\; q$
. . $\displaystyle \begin{array}{c|c||ccccccc}
p & q & \bigg[(p & \vee & q) & \wedge & \sim p\bigg] & \to & q \\ \hline
T & T & T && T && F && T \\
T & F & T && F && F && F \\
F & T & F && T && T && T \\
F & F & F && F && T && F
\end{array}$
. . . . . . . . . $\displaystyle \searrow\;\; \swarrow$
. . $\displaystyle \begin{array}{c|c||ccccccc}
p & q & \bigg[(p & \vee & q) & \wedge & \sim p\bigg] & \to & q \\ \hline
T & T & & T & & & F & & T \\
T & F & & T & & & F & & F \\
F & T & & T & & & T & & T \\
F & F & & F & & & T & & F
\end{array}$
. . . . . . . . . . . . $\displaystyle \searrow\qquad\swarrow$
. . $\displaystyle \begin{array}{c|c||ccccccc}
p & q & \bigg[(p & \vee & q) & \wedge & \sim p\bigg] & \to & q \\ \hline
T & T & & & & F & & & T \\
T & F & & & & F & & & F \\
F & T & & & & T & & & T \\
F & F & & & & F & & & F
\end{array}$
. . . . . . . . . . . . . . . . . . $\displaystyle \searrow\quad\;\; \swarrow$
. . $\displaystyle \begin{array}{c|c||ccccccc}
p & q & \bigg[(p & \vee & q) & \wedge & \sim p\bigg] & \to & q \\ \hline
T & T & & & & & & T& \\
T & F & & & & & & T & \\
F & T & & & & & & T & \\
F & F & & & & & & T &
\end{array}$
Hope this helps . . .