Equivalent Boolean Expressions & FRQ Practice

Part of: Boolean Expressions & if Statements

Recognizing Equivalence Two boolean expressions are equivalent if they produce the same result for every possible combination of inputs. Recognizing equivalence lets you simplify conditions, fix bugs, and answer AP multiple-choice questions that ask which expression is the same as another. Tools for Proving Equivalence - Truth tables : enumerate all input combinations and compare outputs. - De Morgan's Laws : rewrite negated AND/OR expressions. - Algebraic identities : a && true is a; a false is a; a true is true; a && false is false; !!a is a. Putting It All Together This capstone combines relational operators, &&/ /!, if/else if/else, nesting, short-circuiting, and De Morgan's reasoning. Consider classifying a number: Each branch is mutually exclusive , and the order ensures 0 is handled before sign checks. The compound condition n 0 && n % 2 == 0 short-circuits: if n is not positive, the modulo test is skipped. Simplification Example The condition !(a) a is always true (a tautology), and a && !a is always false (a contradiction). Spotting these saves work: FRQ Strategy On free-response questions: read the specification carefully, identify the distinct cases, order conditions so

Challenge: Classify the Integer