Truth Tables and Venn Diagrams 🌶️
Two ways to see exactly when a compound boolean expression is true: a truth table lists every combination of inputs and what the expression evaluates to for each one; a Venn diagram shows the same information as a picture, shading the region(s) where the expression is true. Start with two variables, then scale up to three.
1. Fill in the result of each expression for every combination of A and B.
Fill in T or F for each row.
2. Shade the region(s) where a && !b is true.
Click a region to shade it. Click a shaded region to unshade it.
3. Now try three variables. Fill in the result of each expression for every combination of A, B, and C.
Fill in T or F for each row.
4. Shade the region(s) where (a || b) && !c is true.
Click a region to shade it. Click a shaded region to unshade it.
Your score for your class is recorded when you click Submit all — checking individual questions doesn't save it. You can submit again to improve your score; your best one counts.