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