I am having trouble with question 22 part (2):

Here is the solution:

How did the author know that there are 256 distinct equivalence classes? Where did they get $2^8$ from?
I am having trouble with question 22 part (2):

Here is the solution:

How did the author know that there are 256 distinct equivalence classes? Where did they get $2^8$ from?
If you leave out any intermediate working, a truth table for some statement involving $p,q,r$ is simply a list of the truth values of the statement for all possible truth values of $p,q,r$. Now $p,q,r$ can each be true or false so overall there are $2^3=8$ options (that is, $8$ rows in the truth table), and to specify the truth values of your statement you have to make $8$ choices from $\{T,F\}$. You can make the same choice more than once (in fact you have to), and the order is important, so the number of choices is $2^8$.