Less expression, the same rule
Simplification preserves the output for every input assignment. First remove repetition using laws; then see the same reduction on a map.
Prerequisite: logic lawsTheory
Select a part, apply a law
When A is already true, adding A AND B does not change A OR (A AND B). This is absorption. Select an operator in the formula to see applicable laws. Only the selected part changes.
A ∨ (A ∧ B)
3 literals · 5 nodesLiterals count variable occurrences; nodes count all variables, constants and operators in the expression tree. Fewer nodes means a shorter expression. Reordering and expansion can be useful intermediate steps even when they do not immediately shorten it.
From a table to a Karnaugh map
This is the same truth table with inputs moved to the headings. In the order 00, 01, 11, 10, neighbours differ by one bit. The first and last columns are neighbours too, as if the map wrapped into a ring.
Below, F = A AND NOT C. Select the two ones across the edge and group them. B takes both values and disappears from the term; A = 1 and C = 0 stay fixed.
| A ↓ / BC → | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | ||||
| 1 |
Selection: 0
Select cells containing ones first.
0
Uncovered ones: 2Which groups are allowed
Group complete rectangles of 1, 2, 4, 8 or 16 ones, without zeros or holes. Diagonal contact does not count. Opposite edges join; with four variables, top and bottom join too, so all four corners can form a group.
Groups may overlap: one cell can help several reductions. Cover all ones and OR the terms to obtain DNF. Larger groups usually remove more literals. This trainer checks equivalence, without claiming a unique or shortest expression. Grouping zeros for CNF and don’t-care states are outside this trainer.
If there are no ones, the answer is 0 with no groups. If every cell is one, grouping the entire map gives 1: no variable stays fixed.
Practice
Factor out a repeated part
Factor out A, then compare the original and current expressions. You can enter your own formula: ! means NOT, & AND, | OR.
(A ∧ B) ∨ (A ∧ C)
4 literals · 7 nodesYour map: 2–4 variables
Select cells directly on the map. The preview shows which variables will disappear. Numbers mark overlapping groups; × removes just one group. Check that no ones remain uncovered.
| A ↓ / B → | 0 | 1 |
|---|---|---|
| 0 | ||
| 1 |
Selection: 0
Select cells containing ones first.
0
Uncovered ones: 3Games
Simplify a formula
Apply laws to shorten the expression. Check after making changes.
¬¬A
1 literals · 3 nodes| A ↓ / B → | 0 | 1 |
|---|---|---|
| 0 | ||
| 1 |
Selection: 0
Select cells containing ones first.
0
Uncovered ones: 1