Skip to content

De Morgan's law exercises with answers

Ten negations to push inward until every NOT sits on a single variable: a negated AND, a negated OR, a three-operand chain, a negated implication, and nested cases with two levels. Write the result in negation normal form and compare it with the engine.

The two laws: NOT (X AND Y) is NOT X OR NOT Y, and NOT (X OR Y) is NOT X AND NOT Y. Each application flips the operator and negates the operands; with a chain of three it flips the whole chain at once. Double negation then removes NOT NOT. For an implication, first rewrite X -> Y as NOT X OR Y, so that NOT (X -> Y) becomes X AND NOT Y: the only way an implication fails is antecedent TRUE, consequent FALSE.

The simplifier's step list shows De Morgan only where the rewrite makes the expression shorter, typically when double negations disappear afterwards; NOT (A AND B) stays as it is because NOT A OR NOT B is longer. So some problems show the laws on the page and some show no law applied; the solutions say which, and the truth table confirms the answer either way, since the result must be TRUE on exactly the rows where the original is.

1. Push the negation inward in NOT (A AND B). NOT (A AND 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.

NOT (A AND B)

Classification: contingent

De Morgan over AND: NOT A OR NOT B. The step list shows no law applied, because this form is longer than the original; the table is FALSE only on A = TRUE, B = TRUE, as a NAND should be.

2. Push the negation inward in NOT (A OR B). NOT (A OR 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.

NOT (A OR B)

Classification: contingent

De Morgan over OR: NOT A AND NOT B, neither one nor the other, TRUE on A = FALSE, B = FALSE only.

3. Push the negation inward in NOT (A AND B AND C). NOT (A AND B AND C)
#ABCf
0FALSEFALSEFALSETRUE
1FALSEFALSETRUETRUE
2FALSETRUEFALSETRUE
3FALSETRUETRUETRUE
4TRUEFALSEFALSETRUE
5TRUEFALSETRUETRUE
6TRUETRUEFALSETRUE
7TRUETRUETRUEFALSE

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

NOT (A AND B AND C)

Classification: contingent

The law applies to the whole chain at once: NOT A OR NOT B OR NOT C. FALSE only on the all-TRUE row.

4. Push the negation inward in NOT (NOT A OR B). NOT (NOT A OR B)
#ABf
0FALSEFALSEFALSE
1FALSETRUEFALSE
2TRUEFALSETRUE
3TRUETRUEFALSE
NOT (NOT A OR B)
  1. De Morgan's law · NOT (A OR B) = NOT A AND NOT B
    NOT (NOT A OR B) → NOT NOT A AND NOT BResult: NOT NOT A AND NOT B
  2. Double negation · NOT NOT A = A
    NOT NOT A → AResult: A AND NOT B
A AND NOT B · verified equivalent on every row · simplified, not minimal

Classification: contingent

De Morgan gives NOT NOT A AND NOT B, and double negation gives A AND NOT B. The page shows both laws, since the result is shorter.

5. Push the negation inward in NOT (A -> B). NOT (A -> 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.

NOT (A -> B)

Classification: contingent

Implication elimination first, NOT (NOT A OR B), then the previous problem: A AND NOT B. The negation of an implication is its one failing row, A = TRUE, B = FALSE; it is not NOT A -> NOT B.

6. Push the negation inward in NOT ((A OR B) AND C). NOT ((A OR B) AND C)
#ABCf
0FALSEFALSEFALSETRUE
1FALSEFALSETRUETRUE
2FALSETRUEFALSETRUE
3FALSETRUETRUEFALSE
4TRUEFALSEFALSETRUE
5TRUEFALSETRUEFALSE
6TRUETRUEFALSETRUE
7TRUETRUETRUEFALSE

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

NOT ((A OR B) AND C)

Classification: contingent

Outer law first: NOT (A OR B) OR NOT C; inner law next: (NOT A AND NOT B) OR NOT C. Every NOT now sits on a variable.

7. Push the negation inward in NOT ((A AND B) OR (C AND D)). NOT ((A AND B) OR (C AND D))
#ABCDf
0FALSEFALSEFALSEFALSETRUE
1FALSEFALSEFALSETRUETRUE
2FALSEFALSETRUEFALSETRUE
3FALSEFALSETRUETRUEFALSE
4FALSETRUEFALSEFALSETRUE
5FALSETRUEFALSETRUETRUE
6FALSETRUETRUEFALSETRUE
7FALSETRUETRUETRUEFALSE
8TRUEFALSEFALSEFALSETRUE
9TRUEFALSEFALSETRUETRUE
10TRUEFALSETRUEFALSETRUE
11TRUEFALSETRUETRUEFALSE
12TRUETRUEFALSEFALSEFALSE
13TRUETRUEFALSETRUEFALSE
14TRUETRUETRUEFALSEFALSE
15TRUETRUETRUETRUEFALSE

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

NOT ((A AND B) OR (C AND D))

Classification: contingent

The outer OR becomes an AND of two negated ANDs, and each of those becomes an OR: (NOT A OR NOT B) AND (NOT C OR NOT D). TRUE unless A, B are both TRUE or C, D are both TRUE.

8. Push the negation inward in NOT (A AND NOT (B OR C)). NOT (A AND NOT (B OR C))
#ABCf
0FALSEFALSEFALSETRUE
1FALSEFALSETRUETRUE
2FALSETRUEFALSETRUE
3FALSETRUETRUETRUE
4TRUEFALSEFALSEFALSE
5TRUEFALSETRUETRUE
6TRUETRUEFALSETRUE
7TRUETRUETRUETRUE
NOT (A AND NOT (B OR C))
  1. De Morgan's law · NOT (A AND B) = NOT A OR NOT B
    NOT (A AND NOT (B OR C)) → NOT A OR NOT NOT (B OR C)Result: NOT A OR NOT NOT (B OR C)
  2. Double negation · NOT NOT A = A
    NOT NOT (B OR C) → B OR CResult: NOT A OR (B OR C)
  3. Associativity · (A OR B) OR C = A OR B OR C
    NOT A OR (B OR C) → NOT A OR B OR CResult: NOT A OR B OR C
NOT A OR B OR C · verified equivalent on every row · simplified, not minimal

Classification: contingent

De Morgan over the AND: NOT A OR NOT NOT (B OR C); double negation: NOT A OR (B OR C); associativity flattens it to NOT A OR B OR C. The page shows all three steps.

9. Push the negation inward in NOT (NOT A AND NOT B). NOT (NOT A AND NOT B)
#ABf
0FALSEFALSEFALSE
1FALSETRUETRUE
2TRUEFALSETRUE
3TRUETRUETRUE
NOT (NOT A AND NOT B)
  1. De Morgan's law · NOT A AND NOT B = NOT (A OR B)
    NOT A AND NOT B → NOT (A OR B)Result: NOT NOT (A OR B)
  2. Double negation · NOT NOT A = A
    NOT NOT (A OR B) → A OR BResult: A OR B
A OR B · verified equivalent on every row · simplified, not minimal

Classification: contingent

De Morgan and double negation: A OR B. This is the second law read backwards, and the engine shows both steps.

10. Push the negation inward in NOT ((A -> B) AND (B -> A)). NOT ((A -> B) AND (B -> A))
#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.

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

Classification: contingent

De Morgan over the AND: NOT (A -> B) OR NOT (B -> A); each negated implication is its failing row: (A AND NOT B) OR (B AND NOT A). That is A XOR B, the negation of the biconditional.

Questions

What is the classic slip here?

Distributing the NOT without flipping the operator, writing NOT A AND NOT B for NOT (A AND B). They differ on A = TRUE, B = FALSE: the first is FALSE there and the second is TRUE. Check one such row whenever you push a negation through.

Related

Worked examples

Glossary

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.