AP Computer Science a Flashcards: Comparing Boolean Expressions

Study Comparing Boolean Expressions in AP Computer Science a with focused flashcards that help you recognize the idea, recall the key rule, and apply it in practice-style prompts.

AP Computer Science a

Comparing Boolean Expressions

0 mastered0 still learning

0% Complete

QUESTION
1/ 48

Determine the result of: !(false || (true && true)).

Tap card or press Space to flip

ANSWER

false. (true && true) is true, (false || true) is true, !(true) is false.

How well did you know it?

Card 1 / 48

What this deck covers

This deck focuses on Comparing Boolean Expressions, giving you a quick way to review the definitions, rules, and examples that matter most for AP Computer Science a.

How to use these flashcards

Work through these flashcards in short sessions. Try to answer each prompt before flipping the card, then revisit any cards you miss until the explanation feels automatic.

All flashcards

Flashcard 1: Determine the result of: !(false || (true && true)).

Answer: false. (true && true) is true, (false || true) is true, !(true) is false.

Flashcard 2: Which expression is equivalent to !(a || b)?

Answer: !a && !b. De Morgan's Law: negate OR, flip to AND, negate operands.

Flashcard 3: What is the result of the expression: !true?

Answer: false. NOT operator flips true to false.

Flashcard 4: What does the '!' operator do in a Boolean expression?

Answer: Negates the Boolean value. The NOT operator flips true to false and vice versa.

Flashcard 5: What Boolean operator is represented by '||'?

Answer: Logical OR. Returns true when at least one operand is true.

Flashcard 6: Which expression is equivalent to !(a && b)?

Answer: !a || !b. De Morgan's Law: negate AND, flip to OR, negate operands.

Flashcard 7: Evaluate: (false && false) || (true && false).

Answer: false. Both AND operations are false, so false OR false is false.

Flashcard 8: What is the result of: (true && true) || false?

Answer: true. (true && true) is true, and true OR false is true.

Flashcard 9: Determine the result of: true && (false || true).

Answer: true. Parentheses first: (false || true) is true, then true && true.

Flashcard 10: Determine the result of: (true && false) || true.

Answer: true. (true && false) is false, but false || true is true.

Flashcard 11: What is the precedence order of the operators: &&, ||, ! ?

Answer: !, &&, ||. NOT has highest precedence, then AND, then OR.

Flashcard 12: Determine the result of: (true || false) && false.

Answer: false. (true || false) is true, but true && false is false.

Flashcard 13: Which expression is equivalent to !(a && b)?

Answer: !a || !b. De Morgan's Law: negate AND, flip to OR, negate operands.

Flashcard 14: Evaluate: (false && false) || (true && false).

Answer: false. Both AND operations are false, so false OR false is false.

Flashcard 15: Determine the result of: true || (false && true).

Answer: true. true OR anything is always true.

Flashcard 16: What is the result of the expression: true || false?

Answer: true. OR returns true if at least one operand is true.

Flashcard 17: Evaluate: true && (!false || false).

Answer: true!false is true, (true || false) is true, true && true is true.

Flashcard 18: Determine the result of: !(true && (false || true)).

Answer: false. Inner expression is true, so !(true) is false.

Flashcard 19: Evaluate: true && (!false || false).

Answer: true!false is true, (true || false) is true, true && true is true.

Flashcard 20: What does the '!' operator do in a Boolean expression?

Answer: Negates the Boolean value. The NOT operator flips true to false and vice versa.

Flashcard 21: Determine the result of: (true || false) && !false.

Answer: true. (true || false) is true, and true && true is true.

Flashcard 22: What is the precedence order of the operators: &&, ||, ! ?

Answer: !, &&, ||. NOT has highest precedence, then AND, then OR.

Flashcard 23: Evaluate: false && (!false || true).

Answer: false. false AND anything is always false.

Flashcard 24: Determine the result of: !(false || (true && true)).

Answer: false. (true && true) is true, (false || true) is true, !(true) is false.

Flashcard 25: What is the result of the expression: true && false?

Answer: false. AND requires both operands to be true.

Flashcard 26: Determine the result of: (true || false) && false.

Answer: false. (true || false) is true, but true && false is false.

Flashcard 27: What is the result of the expression: !false?

Answer: true. NOT operator flips false to true.

Flashcard 28: Evaluate the expression: false || !true.

Answer: false. false OR !true becomes false OR false equals false.

Flashcard 29: Determine the result of: (true || false) && !false.

Answer: true. (true || false) is true, and true && true is true.

Flashcard 30: Determine the result of: !(true && (false || true)).

Answer: false. Inner expression is true, so !(true) is false.

Flashcard 31: What Boolean operator is represented by '&&'?

Answer: Logical AND. Returns true only when both operands are true.

Flashcard 32: What is the result of the expression: !true?

Answer: false. NOT operator flips true to false.

Flashcard 33: Evaluate: !(false && (true || false)).

Answer: true. (false && anything) is false, so !(false) is true.

Flashcard 34: Determine the result of: true || (false && true).

Answer: true. true OR anything is always true.

Flashcard 35: Evaluate: !(false && (true || false)).

Answer: true. (false && anything) is false, so !(false) is true.

Flashcard 36: Evaluate: true || (!false && false).

Answer: true. true OR anything is always true.

Flashcard 37: Which expression is equivalent to !(a || b)?

Answer: !a && !b. De Morgan's Law: negate OR, flip to AND, negate operands.

Flashcard 38: Evaluate the expression: false || !true.

Answer: false. false OR !true becomes false OR false equals false.

Flashcard 39: What is the result of: (true && true) || false?

Answer: true. (true && true) is true, and true OR false is true.

Flashcard 40: What Boolean operator is represented by '&&'?

Answer: Logical AND. Returns true only when both operands are true.

Flashcard 41: What is the result of the expression: true && false?

Answer: false. AND requires both operands to be true.

Flashcard 42: Evaluate: true || (!false && false).

Answer: true. true OR anything is always true.

Flashcard 43: Determine the result of: true && (false || true).

Answer: true. Parentheses first: (false || true) is true, then true && true.

Flashcard 44: Determine the result of: (true && false) || true.

Answer: true. (true && false) is false, but false || true is true.

Flashcard 45: What Boolean operator is represented by '||'?

Answer: Logical OR. Returns true when at least one operand is true.

Flashcard 46: What is the result of the expression: !false?

Answer: true. NOT operator flips false to true.

Flashcard 47: Evaluate: false && (!false || true).

Answer: false. false AND anything is always false.

Flashcard 48: What is the result of the expression: true || false?

Answer: true. OR returns true if at least one operand is true.