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 using the operators AND, OR, and NOT. Boolean logic provides the mathematical foundation for all decision-making in computing, from simple if-statements to complex database queries and digital circuit design.

Yes/no thinking. You combine simple true/false conditions into complex decisions with AND, OR, NOT.

Example 1

medium
Evaluate: (TRUE AND FALSE) OR (NOT FALSE).

Example 2

medium
Complete the truth table for A AND (NOT B) where A and B can each be TRUE or FALSE.

Example 3

medium
Evaluate: NOT (TRUE OR FALSE) AND TRUE.

Example 4

medium
Evaluate the condition `(loggedIn AND NOT suspended) OR teacherOverride` when loggedIn = TRUE, suspended = TRUE, and teacherOverride = FALSE.