Hello Spawn,

To construct a truth table for an expression, means to evaluate the value of the expression for all values of the input

So the first step is to know what are the different values of the input,

in this problem, we have two inputs, namely p and q

p can be either T (1) or F(0)

the same for q, it can be either T (1) or F(0)

so p has 2 possibilities and q has also 2 possibilities

so the total number of possibilities for the input would be 2*2 = 4

The possibilities are

p q

0 0

0 1

1 0

1 1

if you have more than 2 inputs, say 4 for ex: there 2*2*2*2 = 2^4 = 16 possibilities

and to construct the possibilities, let's say the inputs are p,q, m, n

- we make 1 input ,say n, change each time (2^0), so n would be 0101010101010101

- then the following input, say m, would change each 2 times (2^1), so m would be 0011001100110011
- then the following input, say q, would change each 4 times (2^2), so q would be

0000111100001111

- then the following input p, would change each 8 times (2^3), so p would be

0000000011111111

so the possibilities for the input will be

p q m n

0 0 0 0

0 0 0 1

0 0 1 0

0 0 1 1

0 1 0 0

0 1 0 1

0 1 1 0

0 1 1 1

1 0 0 0

1 0 0 1

1 0 1 0

1 0 1 1

1 1 0 0

1 1 0 1

1 1 1 0

1 1 1 1

now, let's return to the original problem, we want to calculate

(p v q) v (~p ^ q) --> q

but this expression is complex to calculate it at once, so we divide it to smaller expressions, we can easily calculate, then merge the solutions

so we get the following expressions

1) p v q

2) ~p

3) ~p ^ q (Note: ~ operator has higher precedence than ^, that's why we calculated

((~p) ^ q), and not (~(p ^ q))

- we merge 1) v 3)

5) compute the expression

so here is the solution:

p q pvq ~p ~p^q (p v q) v (~p ^ q) (p v q) v (~p ^ q) ---> q

0 0 0 1 0 0 1

0 1 1 1 1 1 1

1 0 1 0 0 1 0

1 1 1 0 0 1 1

Hope this helps