Skip to content
Tactiverge

School/△ Builder/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

1.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.

  • ◇ Apply Boolean laws, including complement, absorption and De Morgan's laws, to simplify an expression.
  • ◇ Group 1s on a three-input Karnaugh map to find a minimal sum of products.
  • ◇ Verify a simplification by comparing truth tables.

2.Predict

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

Guess first. Being wrong here is how the surprise works.

3.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.

Loading the interactive…

Can't use the interactive? Read a description instead

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.

4.Checkpoint: guided practice

Check what you just discovered before going on. Hints appear after a wrong answer.

Practice 1

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

Practice 2

By De Morgan's law, ¬(A + B) equals…

5.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

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'.

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

  • Every expression can be simplified.
    ✓ Some, like three-input XOR, are already minimal as a sum of products.
  • K-map columns go 00, 01, 10, 11.
    ✓ They go 00, 01, 11, 10 so that neighbours differ in one input; otherwise groups do not simplify correctly.

6.Practice on your own

Practice, not a test. Wrong answers get a hint and another try.

Practice 3 · a fresh version every time

Write out the 8-row truth table for Y = (B + ¬A) + C (inputs A, B, C). On how many rows is Y = 1?

rows

Practice 4 · a fresh version every time

With A = 1, B = 0 and C = 0, what is Y = (C ⊕ B) ⊕ A? Answer 0 or 1.

Practice 5

The majority function's row-by-row form uses 12 literals. How many literals does its simplest sum of products use?

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.

7.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.

8.Reflect

Concepts: Logic gates and Boolean algebra