Skip to content
Marlbridge

AP® Computer Science A · Unit 2 · Topic 2.5

Compound Boolean Expressions: Topic Checklist (Computer Science A 2.5)

Specific I can statements for compound Boolean expressions with !, && and ||, each linked to the guide section or practice question that tests it.

Work through the list without notes. If you cannot do a statement, follow its link, then come back. Guide = study guide; Practice = practice questions.

Understanding

  • I can state when !a, a && b and a || b are true. (Guide: “Combining true and false”; Practice question 1)
  • I can state the precedence of !, && and ||. (Guide: “Precedence”; Practice question 2)
  • I can explain short-circuit evaluation for && and for ||. (Guide: “Short-circuit evaluation”; Practice questions 4 and 5)
  • I can explain why x == 1 || 2 does not compile and why x > 3 || x < 8 is always true. (Guide: “Writing ranges”; Practice question 6)

Skills

  • I can evaluate a compound Boolean expression for given values, showing each part. (Guide: Worked example 1; Practice questions 2 and 7)
  • I can write a range test and an outside-the-range test. (Guide: “Writing ranges”; Practice questions 3 and 8)
  • I can complete a truth table for an expression with three variables. (Practice question 9)
  • I can translate rules with “and”, “or”, “unless” and “not” into one Boolean expression. (Guide: Worked example 2; Practice questions 8 and 10)

Reasoning

  • I can use a guard on the left of && to make the right side safe. (Guide: “Short-circuit evaluation”; Practice question 5)
  • I can say which method calls in a compound condition are actually executed. (Practice question 4)
  • I can explain how adding brackets changes the result of a condition. (Guide: Worked example 1, items 4 and 5; Practice question 10)

All ticked? Move on to the Topic 2.6 study guide, Comparing Boolean Expressions.

AP® and Advanced Placement® are trademarks registered by the College Board, which is not affiliated with, and does not endorse, this website. Marlbridge is an independent tuition provider. It is not an authorized AP course provider, an AP school or an exam centre, and these resources are not official College Board materials. Reading them or doing simulations does not meet the laboratory requirement of an AP science course.