Skip to content

Truth table exercises with answers: 2 variables

Ten formulas over two inputs, A and B. For each one, fill in the four rows of the truth table and list the rows on which the formula is TRUE. The table under every problem is computed by the engine, so you can check your column row by row before reading the solution.

The row order is fixed. A is the first column and the most significant bit, so row 0 is A = FALSE, B = FALSE, row 1 is A = FALSE, B = TRUE, row 2 is A = TRUE, B = FALSE and row 3 has both TRUE. The TRUE rows, written as a list of row numbers, are the formula's minterms, and every solution names them in this order. Two formulas with the same TRUE rows are equivalent, however different they look.

The set covers the shapes a two-input formula usually takes: a literal and a negated literal joined by AND or OR, the implication with its inverse, NAND and NOR, XOR and the biconditional, and the biconditional written as two implications. Evaluate the inner connective first and the outer one last, and compare your column with the engine's before opening the solution.

1. Build the truth table of A AND NOT B and list the rows on which it is TRUE. A AND NOT B
#ABf
0FALSEFALSEFALSE
1FALSETRUEFALSE
2TRUEFALSETRUE
3TRUETRUEFALSE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

A AND NOT B

Classification: contingent

Only one row: A = TRUE, B = FALSE. AND needs both operands TRUE, and NOT B is TRUE exactly when B is FALSE.

2. Build the truth table of A OR NOT B and list the TRUE rows. A OR NOT B
#ABf
0FALSEFALSETRUE
1FALSETRUEFALSE
2TRUEFALSETRUE
3TRUETRUETRUE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

A OR NOT B

Classification: contingent

TRUE on three rows: A = FALSE, B = FALSE, A = TRUE, B = FALSE and A = TRUE, B = TRUE. The only FALSE row is A = FALSE, B = TRUE, where neither A nor NOT B holds.

3. Build the truth table of the implication A -> B and list the TRUE rows. A -> B
#ABf
0FALSEFALSETRUE
1FALSETRUETRUE
2TRUEFALSEFALSE
3TRUETRUETRUE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

A -> B

Classification: contingent

FALSE only on A = TRUE, B = FALSE; TRUE on the other three rows, including the two with A FALSE (the vacuous rows). An implication fails only when its antecedent holds and its consequent does not.

4. Build the truth table of NOT A -> NOT B and compare its TRUE rows with those of problem 2. NOT A -> NOT B
#ABf
0FALSEFALSETRUE
1FALSETRUEFALSE
2TRUEFALSETRUE
3TRUETRUETRUE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

NOT A -> NOT B

Classification: contingent

This is the inverse of A -> B, and it is FALSE only on A = FALSE, B = TRUE. Its TRUE rows are those of A OR NOT B (problem 2), so the two formulas are equivalent; it is also the contrapositive of B -> A.

5. Build the truth table of NAND(A, B) and list the TRUE rows. NAND(A, B)
#ABf
0FALSEFALSETRUE
1FALSETRUETRUE
2TRUEFALSETRUE
3TRUETRUEFALSE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

NAND(A, B)

Classification: contingent

NAND is NOT (A AND B): FALSE only on A = TRUE, B = TRUE and TRUE on the other three rows.

6. Build the truth table of the biconditional A <-> B and list the TRUE rows. A <-> B
#ABf
0FALSEFALSETRUE
1FALSETRUEFALSE
2TRUEFALSEFALSE
3TRUETRUETRUE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

A <-> B

Classification: contingent

TRUE exactly when the two inputs agree: A = FALSE, B = FALSE and A = TRUE, B = TRUE.

7. Build the truth table of A XOR B and list the TRUE rows. A XOR B
#ABf
0FALSEFALSEFALSE
1FALSETRUETRUE
2TRUEFALSETRUE
3TRUETRUEFALSE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

A XOR B

Classification: contingent

TRUE exactly when the inputs differ: A = FALSE, B = TRUE and A = TRUE, B = FALSE. Its column is the complement of the biconditional's.

8. Build the truth table of NOR(A, B) and list the TRUE rows. NOR(A, B)
#ABf
0FALSEFALSETRUE
1FALSETRUEFALSE
2TRUEFALSEFALSE
3TRUETRUEFALSE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

NOR(A, B)

Classification: contingent

NOR is NOT (A OR B), TRUE on a single row: A = FALSE, B = FALSE.

9. Build the truth table of NOT A -> B and say which familiar formula has the same column. NOT A -> B
#ABf
0FALSEFALSEFALSE
1FALSETRUETRUE
2TRUEFALSETRUE
3TRUETRUETRUE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

NOT A -> B

Classification: contingent

FALSE only when NOT A holds and B does not, that is on A = FALSE, B = FALSE; the TRUE rows are those of A OR B, as implication elimination predicts.

10. Build the truth table of (A -> B) AND (B -> A) and list the TRUE rows. (A -> B) AND (B -> A)
#ABf
0FALSEFALSETRUE
1FALSETRUEFALSE
2TRUEFALSEFALSE
3TRUETRUETRUE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

(A -> B) AND (B -> A)

Classification: contingent

Each conjunct removes one row: A -> B removes A = TRUE, B = FALSE and B -> A removes A = FALSE, B = TRUE. What remains is the two rows on which the inputs agree, the table of A <-> B.

Questions

Why does the step list under most problems say that no law applied?

Because these formulas are already as short as the simplifier's rewriting laws can make them, so the list is empty and the result repeats the input. The truth table is the artefact to check here. The classification line says contingent for every problem, since each formula is TRUE on some rows and FALSE on others.

Related

Guides

See also

Practice

Generated from the Tangibool engine, semantics tangibool-semantics/1, engine 1.0.0, build . Every table, map, simplification and verdict on these pages was computed by the Tangibool engine when the site was built, and every claim was re-checked by the same exact checker the app uses. Limits are stated where they apply. © 2026 Foreranger LTD.