Practice Boolean Logic in CS Thinking
Use these practice problems to test your method after reviewing the concept explanation and worked examples.
Quick Recap
A system of logic that works with only two possible values: true and false, combined with AND, OR, NOT.
Yes/no thinking. You combine simple true/false conditions into complex decisions with AND, OR, NOT.
Example 1
mediumEvaluate: (TRUE AND FALSE) OR (NOT FALSE).
Example 2
mediumComplete the truth table for A AND (NOT B) where A and B can each be TRUE or FALSE.
Example 3
mediumEvaluate: NOT (TRUE OR FALSE) AND TRUE.
Example 4
mediumEvaluate the condition `(loggedIn AND NOT suspended) OR teacherOverride` when loggedIn = TRUE, suspended = TRUE, and teacherOverride = FALSE.