Boolean Expressions - AP Computer Science Principles
Card 1 of 30
Identify the result: $false \text{ AND } (true \text{ OR } false)$
Identify the result: $false \text{ AND } (true \text{ OR } false)$
Tap to reveal answer
false. Parentheses evaluate first: $(true \text{ OR } false) = true$, then $false \text{ AND } true = false$.
false. Parentheses evaluate first: $(true \text{ OR } false) = true$, then $false \text{ AND } true = false$.
← Didn't Know|Knew It →
What is the result of the Boolean expression: $true \text{ AND } false$?
What is the result of the Boolean expression: $true \text{ AND } false$?
Tap to reveal answer
false. AND requires both operands to be true.
false. AND requires both operands to be true.
← Didn't Know|Knew It →
What is the result of the Boolean expression: $true \text{ OR } false$?
What is the result of the Boolean expression: $true \text{ OR } false$?
Tap to reveal answer
true. OR returns true if at least one operand is true.
true. OR returns true if at least one operand is true.
← Didn't Know|Knew It →
What is the result of the Boolean expression: $false \text{ OR } false$?
What is the result of the Boolean expression: $false \text{ OR } false$?
Tap to reveal answer
false. OR returns false only when both operands are false.
false. OR returns false only when both operands are false.
← Didn't Know|Knew It →
What is the result of the Boolean expression: $\text{NOT } true$?
What is the result of the Boolean expression: $\text{NOT } true$?
Tap to reveal answer
false. NOT reverses the Boolean value.
false. NOT reverses the Boolean value.
← Didn't Know|Knew It →
What is the result of the Boolean expression: $\text{NOT } false$?
What is the result of the Boolean expression: $\text{NOT } false$?
Tap to reveal answer
true. NOT reverses the Boolean value.
true. NOT reverses the Boolean value.
← Didn't Know|Knew It →
What is the precedence order of Boolean operators NOT, AND, OR?
What is the precedence order of Boolean operators NOT, AND, OR?
Tap to reveal answer
NOT, AND, OR. NOT has highest precedence, then AND, then OR.
NOT, AND, OR. NOT has highest precedence, then AND, then OR.
← Didn't Know|Knew It →
What is the result of the expression: $true \text{ AND } false \text{ OR } true$?
What is the result of the expression: $true \text{ AND } false \text{ OR } true$?
Tap to reveal answer
true. AND evaluates first: $(true \text{ AND } false) \text{ OR } true = false \text{ OR } true = true$.
true. AND evaluates first: $(true \text{ AND } false) \text{ OR } true = false \text{ OR } true = true$.
← Didn't Know|Knew It →
What is the result of the expression: $\text{NOT } (true \text{ OR } false)$?
What is the result of the expression: $\text{NOT } (true \text{ OR } false)$?
Tap to reveal answer
false. Parentheses force OR first, then NOT: $\text{NOT } true = false$.
false. Parentheses force OR first, then NOT: $\text{NOT } true = false$.
← Didn't Know|Knew It →
What does the Boolean expression $x \text{ AND } y$ evaluate if $x = false$?
What does the Boolean expression $x \text{ AND } y$ evaluate if $x = false$?
Tap to reveal answer
false. AND returns false when either operand is false.
false. AND returns false when either operand is false.
← Didn't Know|Knew It →
What does the Boolean expression $x \text{ OR } y$ evaluate if $x = true$?
What does the Boolean expression $x \text{ OR } y$ evaluate if $x = true$?
Tap to reveal answer
true. OR returns true when either operand is true.
true. OR returns true when either operand is true.
← Didn't Know|Knew It →
Identify the result: $\text{NOT } (false \text{ AND } true)$
Identify the result: $\text{NOT } (false \text{ AND } true)$
Tap to reveal answer
true. Parentheses evaluate first: $(false \text{ AND } true) = false$, then $\text{NOT } false = true$.
true. Parentheses evaluate first: $(false \text{ AND } true) = false$, then $\text{NOT } false = true$.
← Didn't Know|Knew It →
State De Morgan's Law for NOT (A AND B).
State De Morgan's Law for NOT (A AND B).
Tap to reveal answer
NOT A OR NOT B. De Morgan's Law distributes NOT over AND.
NOT A OR NOT B. De Morgan's Law distributes NOT over AND.
← Didn't Know|Knew It →
State De Morgan's Law for NOT (A OR B).
State De Morgan's Law for NOT (A OR B).
Tap to reveal answer
NOT A AND NOT B. De Morgan's Law distributes NOT over OR.
NOT A AND NOT B. De Morgan's Law distributes NOT over OR.
← Didn't Know|Knew It →
What is the result of $false \text{ OR } (\text{NOT } false)$?
What is the result of $false \text{ OR } (\text{NOT } false)$?
Tap to reveal answer
true. $\text{NOT } false = true$, then $false \text{ OR } true = true$.
true. $\text{NOT } false = true$, then $false \text{ OR } true = true$.
← Didn't Know|Knew It →
Which Boolean operator is commutative: AND, OR, NOT?
Which Boolean operator is commutative: AND, OR, NOT?
Tap to reveal answer
AND, OR. Both AND and OR can switch operand order without changing result.
AND, OR. Both AND and OR can switch operand order without changing result.
← Didn't Know|Knew It →
Which Boolean operator is associative: AND, OR, NOT?
Which Boolean operator is associative: AND, OR, NOT?
Tap to reveal answer
AND, OR. Both AND and OR can group operands differently without changing result.
AND, OR. Both AND and OR can group operands differently without changing result.
← Didn't Know|Knew It →
What is the result of the expression: $true \text{ OR } (false \text{ AND } true)$?
What is the result of the expression: $true \text{ OR } (false \text{ AND } true)$?
Tap to reveal answer
true. Parentheses evaluate first: $(false \text{ AND } true) = false$, then $true \text{ OR } false = true$.
true. Parentheses evaluate first: $(false \text{ AND } true) = false$, then $true \text{ OR } false = true$.
← Didn't Know|Knew It →
Which Boolean operation is performed first: AND or OR?
Which Boolean operation is performed first: AND or OR?
Tap to reveal answer
AND. AND has higher precedence than OR in Boolean operations.
AND. AND has higher precedence than OR in Boolean operations.
← Didn't Know|Knew It →
What is the result of the expression: $(true \text{ AND } false) \text{ OR } false$?
What is the result of the expression: $(true \text{ AND } false) \text{ OR } false$?
Tap to reveal answer
false. Parentheses evaluate first: $(true \text{ AND } false) = false$, then $false \text{ OR } false = false$.
false. Parentheses evaluate first: $(true \text{ AND } false) = false$, then $false \text{ OR } false = false$.
← Didn't Know|Knew It →
What is the result of the expression: $true \text{ AND } (\text{NOT } false)$?
What is the result of the expression: $true \text{ AND } (\text{NOT } false)$?
Tap to reveal answer
true. $\text{NOT } false = true$, then $true \text{ AND } true = true$.
true. $\text{NOT } false = true$, then $true \text{ AND } true = true$.
← Didn't Know|Knew It →
What is the identity element for the AND operation?
What is the identity element for the AND operation?
Tap to reveal answer
true. AND with true leaves the other operand unchanged.
true. AND with true leaves the other operand unchanged.
← Didn't Know|Knew It →
What is the identity element for the OR operation?
What is the identity element for the OR operation?
Tap to reveal answer
false. OR with false leaves the other operand unchanged.
false. OR with false leaves the other operand unchanged.
← Didn't Know|Knew It →
What is the result of $false \text{ AND } (\text{NOT } true)$?
What is the result of $false \text{ AND } (\text{NOT } true)$?
Tap to reveal answer
false. $\text{NOT } true = false$, then $false \text{ AND } false = false$.
false. $\text{NOT } true = false$, then $false \text{ AND } false = false$.
← Didn't Know|Knew It →
What is the result of the expression: $\text{NOT } (false \text{ OR } false)$?
What is the result of the expression: $\text{NOT } (false \text{ OR } false)$?
Tap to reveal answer
true. Parentheses evaluate first: $(false \text{ OR } false) = false$, then $\text{NOT } false = true$.
true. Parentheses evaluate first: $(false \text{ OR } false) = false$, then $\text{NOT } false = true$.
← Didn't Know|Knew It →
What is the result of $true \text{ OR } (\text{NOT } true)$?
What is the result of $true \text{ OR } (\text{NOT } true)$?
Tap to reveal answer
true. $\text{NOT } true = false$, then $true \text{ OR } false = true$.
true. $\text{NOT } true = false$, then $true \text{ OR } false = true$.
← Didn't Know|Knew It →
What does the expression $x \text{ AND } x$ simplify to?
What does the expression $x \text{ AND } x$ simplify to?
Tap to reveal answer
x. Idempotent law: a variable AND with itself equals itself.
x. Idempotent law: a variable AND with itself equals itself.
← Didn't Know|Knew It →
What is the result of the expression: $\text{NOT } (true \text{ AND } false)$?
What is the result of the expression: $\text{NOT } (true \text{ AND } false)$?
Tap to reveal answer
true. Parentheses evaluate first: $(true \text{ AND } false) = false$, then $\text{NOT } false = true$.
true. Parentheses evaluate first: $(true \text{ AND } false) = false$, then $\text{NOT } false = true$.
← Didn't Know|Knew It →
What does the expression $x \text{ AND } \text{NOT } x$ simplify to?
What does the expression $x \text{ AND } \text{NOT } x$ simplify to?
Tap to reveal answer
false. Complement law: a variable AND its negation always equals false.
false. Complement law: a variable AND its negation always equals false.
← Didn't Know|Knew It →
What does the expression $x \text{ OR } \text{NOT } x$ simplify to?
What does the expression $x \text{ OR } \text{NOT } x$ simplify to?
Tap to reveal answer
true. Complement law: a variable OR its negation always equals true.
true. Complement law: a variable OR its negation always equals true.
← Didn't Know|Knew It →