Learn AP Comp Sci

☰

Problem of the Day

Wednesday, October 14, 2026


Problem:

Boolean expressions can be analyzed using a truth table, which summarizes all the possible values for the inputs to an expression, along with their corresponding outputs. Here, for example, is the truth table for the && operation:

ABA && B
falsefalsefalse
falsetruefalse
truefalsefalse
truetruetrue

In the example above, the outputs in the last column are listed from top-to-bottom as false, false, false, true. Which would be the outputs of the truth table for the boolean expression A || !B ?

  1. true, false, false, true
  2. false, true, false, true
  3. true, false, true, true
  4. true, true, false, false

Show solution:

The correct answer is c. The truth table for this expression is given here:

AB!BA || !B
falsefalsetruetrue
falsetruefalsefalse
truefalsetruetrue
truetruefalsetrue