AP Computer Science A Flashcards: Comparing Boolean Expressions
Written by AP Content Team, Verified for 2026 AP Exams, Last updated: May 2026
Review key ideas with interactive flashcards. This set includes 10 cards to help you master important concepts.
Apply De Morgan's Law to create an equivalent expression for !(isLoggedIn && isAdmin).
An equivalent expression is !isLoggedIn || !isAdmin.
Card 1 of 10
All Flashcards (10)
Apply De Morgan's Law to create an equivalent expression for !(isLoggedIn && isAdmin).
An equivalent expression is !isLoggedIn || !isAdmin.
According to De Morgan's Law, what is the equivalent expression for !(a || b)?
The expression !(a || b) is equivalent to !a && !b.
When are two Boolean expressions considered equivalent?
Two Boolean expressions are considered equivalent if they evaluate to the same value in all cases.
Write a Boolean expression to check if two object references, 'refA' and 'refB', do NOT point to the same object.
The expression to check if they do not point to the same object is refA != refB.
What is the primary outcome of applying De Morgan's Law to a Boolean expression?
Applying De Morgan's Law to a Boolean expression creates a new, equivalent Boolean expression.
Apply De Morgan's Law to create an equivalent expression for !(isWeekend || isHoliday).
An equivalent expression is !isWeekend && !isHoliday.
What method can be used to prove that two Boolean expressions are equivalent?
Truth tables can be used to prove Boolean expressions are equivalent by showing they result in the same value for all possible inputs.
According to De Morgan's Law, what is the equivalent expression for !(a && b)?
The expression !(a && b) is equivalent to !a || !b.
Write a Boolean expression to determine if two object references, 'obj1' and 'obj2', refer to the exact same object.
The expression to determine if they refer to the same object is obj1 == obj2.
Which operators are used to compare object references?
Object references can be compared using the == and != operators.