AP Computer Science a Flashcards: Boolean Expressions

Study 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

Boolean Expressions

0 mastered0 still learning

0% Complete

QUESTION
1/ 76

What is the result of true && false?

Tap card or press Space to flip

ANSWER

false. AND requires both operands to be true.

How well did you know it?

Card 1 / 76

What this deck covers

This deck focuses on 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: What is the result of true && false?

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

Flashcard 2: Identify the result of true && (true || false).

Answer: true. Parentheses force OR evaluation before AND.

Flashcard 3: Evaluate: !(false && true).

Answer: true. NOT inverts the false result of AND to true.

Flashcard 4: Evaluate the expression: !(true && false) || false.

Answer: true. NOT inverts false to true, OR with false stays true.

Flashcard 5: What is the value of !true?

Answer: false. NOT operator flips the boolean value.

Flashcard 6: What does the expression (false && !false) evaluate to?

Answer: false. AND with false always produces false.

Flashcard 7: What is the result of !false || false?

Answer: true. NOT false is true, then OR with false gives true.

Flashcard 8: What is a compound Boolean expression?

Answer: An expression using multiple Boolean operators. Combines multiple boolean operations together.

Flashcard 9: Identify the result of true && true.

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

Flashcard 10: What is the result of true || false && false?

Answer: true. AND has higher precedence than OR.

Flashcard 11: What is the result of !(true && true)?

Answer: false. NOT inverts the true result of AND to false.

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

Answer: true. Parentheses force NOT evaluation before AND.

Flashcard 13: What is the result of true && false?

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

Flashcard 14: What is the value of !true?

Answer: false. NOT operator flips the boolean value.

Flashcard 15: Find the result of !(false || false).

Answer: true. NOT inverts the false result of OR to true.

Flashcard 16: What is the value of !true && !false?

Answer: false. NOT true is false, NOT false is true, AND gives false.

Flashcard 17: What is a short-circuit evaluation in Booleans?

Answer: Evaluation stops as soon as result is determined. Prevents unnecessary computation for efficiency.

Flashcard 18: Find the result of true || true && false.

Answer: true. AND has higher precedence than OR.

Flashcard 19: Evaluate the expression: true && (false || true).

Answer: true. Parentheses force OR evaluation before AND.

Flashcard 20: Find the result of true || true && false.

Answer: true. AND has higher precedence than OR.

Flashcard 21: What is the result of !(true && false)?

Answer: true. NOT inverts the false result of AND to true.

Flashcard 22: Find the result of !(false || false).

Answer: true. NOT inverts the false result of OR to true.

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

Answer: true. NOT inverts false to true, OR with false stays true.

Flashcard 24: What is a truth table?

Answer: A table showing all possible truth values of a Boolean expression. Lists all input combinations and their outputs.

Flashcard 25: What is the result of !true || false?

Answer: false. NOT true is false, then OR with false stays false.

Flashcard 26: Evaluate the expression: false || false.

Answer: false. OR requires at least one operand to be true.

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

Answer: true. Parentheses force NOT evaluation before AND.

Flashcard 28: Identify the result of !(false || true).

Answer: false. NOT inverts the true result of OR to false.

Flashcard 29: What is the result of true || false?

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

Flashcard 30: What is the result of !false && true?

Answer: true. NOT false is true, AND with true gives true.

Flashcard 31: What is the result of !(true || true)?

Answer: false. NOT inverts the true result of OR to false.

Flashcard 32: Evaluate the expression: !(true || false).

Answer: false. NOT inverts the true result of OR to false.

Flashcard 33: What does the && operator do?

Answer: Returns true if both operands are true. Logical conjunction requires both conditions.

Flashcard 34: What does the expression (true && !false) evaluate to?

Answer: true. AND of true and NOT false equals true.

Flashcard 35: What is the value of false && true || true?

Answer: true. OR has lower precedence than AND.

Flashcard 36: What is the result of false && false?

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

Flashcard 37: What is the precedence order of logical operators?

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

Flashcard 38: What does the expression (true && !false) evaluate to?

Answer: true. AND of true and NOT false equals true.

Flashcard 39: Identify the logical operator for 'or'.

Answer: ||. Double pipe symbol represents logical OR operation.

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

Answer: true. OR short-circuits when first operand is true.

Flashcard 41: What is the result of !(true && false)?

Answer: true. NOT inverts the false result of AND to true.

Flashcard 42: What is De Morgan's Law for !(A && B)?

Answer: !A || !B. Distributes NOT over AND to become OR of NOTs.

Flashcard 43: Identify the result of !(false || true).

Answer: false. NOT inverts the true result of OR to false.

Flashcard 44: What is De Morgan's Law for !(A && B)?

Answer: !A || !B. Distributes NOT over AND to become OR of NOTs.

Flashcard 45: Evaluate the expression: !(true || false).

Answer: false. NOT inverts the true result of OR to false.

Flashcard 46: What does the expression (false && !false) evaluate to?

Answer: false. AND with false always produces false.

Flashcard 47: What is the result of false && false?

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

Flashcard 48: What is the precedence order of logical operators?

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

Flashcard 49: What is the result of false || true?

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

Flashcard 50: What is the result of true || false?

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

Flashcard 51: Identify the result of true && (true || false).

Answer: true. Parentheses force OR evaluation before AND.

Flashcard 52: Evaluate: !(false && true).

Answer: true. NOT inverts the false result of AND to true.

Flashcard 53: What is a compound Boolean expression?

Answer: An expression using multiple Boolean operators. Combines multiple boolean operations together.

Flashcard 54: What is a Boolean expression?

Answer: An expression that evaluates to true or false. Boolean data type has only two possible values.

Flashcard 55: What does the || operator do?

Answer: Returns true if either operand is true. Inclusive OR operation for logical disjunction.

Flashcard 56: Identify the logical operator for 'or'.

Answer: ||. Double pipe symbol represents logical OR operation.

Flashcard 57: What does the && operator do?

Answer: Returns true if both operands are true. Logical conjunction requires both conditions.

Flashcard 58: What is the result of true || false && false?

Answer: true. AND has higher precedence than OR.

Flashcard 59: What is the result of !false && true?

Answer: true. NOT false is true, AND with true gives true.

Flashcard 60: What is the result of false || true?

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

Flashcard 61: What does the || operator do?

Answer: Returns true if either operand is true. Inclusive OR operation for logical disjunction.

Flashcard 62: Evaluate the logic: !true && true.

Answer: false. NOT true is false, AND with true gives false.

Flashcard 63: Evaluate the expression: false || false.

Answer: false. OR requires at least one operand to be true.

Flashcard 64: What is the value of false && true || true?

Answer: true. OR has lower precedence than AND.

Flashcard 65: What is a Boolean expression?

Answer: An expression that evaluates to true or false. Boolean data type has only two possible values.

Flashcard 66: What is the result of !(true || true)?

Answer: false. NOT inverts the true result of OR to false.

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

Answer: true. OR short-circuits when first operand is true.

Flashcard 68: What is the value of !true && !false?

Answer: false. NOT true is false, NOT false is true, AND gives false.

Flashcard 69: What is a short-circuit evaluation in Booleans?

Answer: Evaluation stops as soon as result is determined. Prevents unnecessary computation for efficiency.

Flashcard 70: Evaluate the logic: !true && true.

Answer: false. NOT true is false, AND with true gives false.

Flashcard 71: What is the result of !true || false?

Answer: false. NOT true is false, then OR with false stays false.

Flashcard 72: What is the result of !false || false?

Answer: true. NOT false is true, then OR with false gives true.

Flashcard 73: Identify the result of true && true.

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

Flashcard 74: What is the result of !(true && true)?

Answer: false. NOT inverts the true result of AND to false.

Flashcard 75: Evaluate the expression: true && (false || true).

Answer: true. Parentheses force OR evaluation before AND.

Flashcard 76: What is a truth table?

Answer: A table showing all possible truth values of a Boolean expression. Lists all input combinations and their outputs.