Let's look at a more complex truth table. To do this, we will add more columns instead of immediately jumping to the answer.


Table 1 shows the truth table for Q = (A XOR B) AND NOT(C).

Table 1

A (in) B (in) C (in) A XOR B NOT(C) Q (out)
0 0 0 0 1 0
0 0 1 0 0 0
0 1 0 1 1 1
0 1 1 1 0 0
1 0 0 1 1 1
1 0 1 1 0 0
1 1 0 0 1 0
1 1 1 0 0 0


Note that the input columns still count up in binary (000, 001, 010, ...) even though we have three of them instead of two.



How many rows will a truth table with n inputs have?

2n (because we're effectively counting in binary with the inputs)