TactivergeLite

Lite / Building Machines That Respond / Week 15

Module check: simplifying logic

A 'majority vote' circuit can be written with 12 letters, or with 6. Both give identical answers. Why would an engineer care which one you build?

About 40 min · 3 goals · Checked by automated tests · Full interactive version

Why should I care?

Fewer gates mean a cheaper, faster, lower-power circuit and fewer places for faults. Simplification is also a check on your thinking: if the simplest form surprises you, maybe the rule was not what you meant.

Predict

Simplify Y = A · B + A · ¬B.

  1. A
  2. B
  3. A · B
  4. It cannot be simplified
Guess first, then reveal

Y = A · (B + ¬B) = A · 1 = A. Whatever B is, the output just follows A. The two terms were really one idea written twice.

Discover

Load the majority preset and compare the row-by-row form with the simplest form. Toggle cells to make Y = A: how many literals does it need? Load 'XOR of three' and explain why nothing groups. Finally make up a function with four 1s that simplifies to a single two-letter term.

What the interactive shows (text version)

The K-map shows eight cells in two rows (A = 0, 1) and four columns (BC = 00, 01, 11, 10). Pressing a cell toggles its output. The tool lists the groups and the simplest expression: majority (rows 3, 5, 6, 7) simplifies to A·B + A·C + B·C; rows 4 to 7 simplify to A; three-input XOR (rows 1, 2, 4, 7) does not simplify.

You can also open the interactive on the full site when you have a faster connection.

Understand

Useful laws

Identity: A·1 = A, A + 0 = A. Null: A·0 = 0, A + 1 = 1. Complement: A·¬A = 0, A + ¬A = 1. Idempotent: A + A = A. Absorption: A + A·B = A. De Morgan: ¬(A·B) = ¬A + ¬B; ¬(A + B) = ¬A · ¬B. Each can be proved with a four-row truth table.

The Karnaugh map

A K-map is a truth table folded into a grid whose columns go 00, 01, 11, 10 (Gray code), so neighbouring cells differ in exactly one input. A group of two neighbouring 1s drops that input; a group of four drops two inputs. Cover every 1 with as few, as large groups as possible.

Always verify

A simplification is correct only if its truth table matches the original on every row. The explorer and the K-map both do this check for you; on paper, compare the two output columns.

Explain it another way

Intuitive

Simplifying logic is like tidying instructions: 'If it's raining take an umbrella; if it's not raining take an umbrella' becomes 'take an umbrella'.

Technical

Two-level minimisation finds a minimal sum-of-products cover of the function's minterms by prime implicants. K-maps do this visually for up to four or five variables; tools use algorithms such as Quine–McCluskey or heuristics for larger functions.

Mathematical

Literal count is a proxy for gate inputs. Majority: 4 three-literal minterms (12 literals) become 3 two-literal terms (6 literals). Three-input XOR has four 1s with no two adjacent on the map, so its minimal sum of products stays at 12 literals.

Applied

Chip design tools simplify logic automatically, but engineers still simplify by hand to understand a design, to spot mistakes in a specification and to build small interlocks with the fewest parts.

Derivation: Two simplifications, step by step
  1. Distributive law (factor out A): A·B + A·¬B = A·(B + ¬B).

  2. Complement law: B + ¬B = 1, because exactly one of them is 1. So the expression is A·1 = A.

  3. De Morgan's law: ¬(A · B) = ¬A + ¬B and ¬(A + B) = ¬A · ¬B. Check by truth table: ¬(A·B) is 1,1,1,0 for AB = 00, 01, 10, 11, and so is ¬A + ¬B.

  4. Majority: the row-by-row form is ¬A·B·C + A·¬B·C + A·B·¬C + A·B·C. Copy A·B·C three times (X + X = X), pair it with each other term and use the complement law: (¬A + A)·B·C + A·(¬B + B)·C + A·B·(¬C + C) = B·C + A·C + A·B, 6 literals instead of 12.

Worked example 1

Simplify A + A · B and check with a truth table.

Absorption: A + A·B = A·(1 + B) = A·1 = A. Truth table for AB = 00, 01, 10, 11: A + A·B = 0, 0, 1, 1, which is exactly A.

Common mix-ups

Practice

Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.

Practice 1. Simplify Y = A·B + A·¬B.
Practice 2. By De Morgan's law, ¬(A + B) equals…

rows

literals

Practice 6. On a three-input K-map, four 1s form one group (a whole row or a 2 × 2 block). The resulting term has…
Practice 7. Simplify A + A · B.

Apply it

Write the row-by-row (sum of minterms) expression for your greenhouse vent rule from the previous lesson, simplify it with the K-map, then prove the two forms match by comparing truth tables in the expression explorer.

Reflect

Which law surprised you most, and how would you convince a friend it is true?

Write your answer on paper or in your own notes. Lite never stores what you write.

← From safety rules to Boolean expressionsEverything from NAND →