CE2704 · Digital Logic Design
Theme 2 · Boolean algebra & logic gates

From English to a Boolean expression

The everyday engineering skill: turn a written requirement — a safety rule, a warning condition — into precise logic a machine can follow exactly.

Built from first principles.

Before you start

What you need first

  • Truth tables — to verify a translation, row by row.
  • Theorems & DeMorgan — to check two phrasings agree.

What you'll be able to do

  • Follow a repeatable method from requirement to expression.
  • Translate connectors (and / or / not / only if).
  • Handle negatives correctly — the #1 source of bugs.

A repeatable method for any requirement

  1. List the signals. Name every condition and decide which value (0/1) means "active" — your signal convention.
  2. Identify the output. What single yes/no decision are we making? Name it.
  3. Translate the connectors. "and"→AND, "or"→OR, "not / unless / without"→NOT, "but only if"→AND, "either…or"→OR.
  4. Watch the negatives. "Not pressed" means you want the signal to be 0 → use X′, not X.
  5. Write the truth table and check it against the spec — every row.
This scales from 2 inputs to 20. The most common bug is forgetting one row — exactly the kind of bug that hurts people in safety systems.
📐 Worked example

Motor-drive interlock

Spec: "Energize the motor if the start button is pressed AND the emergency-stop is NOT pressed AND the inverter reports ready."

Signals: START (1 = pressed), ESTOP (1 = pressed), READY (1 = ready); output RUN (1 = energize).

$$ \mathrm{RUN} = \mathrm{START}\cdot \mathrm{ESTOP}'\cdot \mathrm{READY} $$
STARTESTOPREADYRUN
1011
Only this row gives RUN = 1; every other combination gives 0. Pressing the e-stop forces RUN to 0 — exactly what safety needs. Note ESTOP′: "NOT pressed."
📐 Worked example

Seatbelt warning — and the same rule written two ways

Spec: "The warning light turns on when the ignition is on, the seat is occupied, AND the seatbelt is unbuckled."

Signals: IG (1 = on), S (1 = occupied), B (1 = buckled); output W (1 = light on). "Unbuckled" = B′:

$$ W = \mathrm{IG}\cdot S \cdot B' $$

The safety team rephrases from the opposite side: "the warning is OFF when ignition is off, OR the seat is empty, OR the belt is buckled." That describes W′:

$$ W' = \mathrm{IG}' + S' + B $$

Negate both sides and apply DeMorgan — and you get the same expression back:

$$ W = (\mathrm{IG}' + S' + B)' = \mathrm{IG}\cdot S \cdot B' $$
DeMorgan proves the two phrasings are the same circuit — one suits technicians ("when does it light?"), the other suits safety reviewers ("when is it off?").

Common pitfalls

  • The missing inversion. "Light on when belt unbuckled" needs B′, not B. Forgetting it is the most common safety-logic bug.
  • The forgotten row. Always finish with the truth table and check every combination — silent rows are still part of your design.
  • "Only if" vs "if". "Run only if ready" makes READY a required AND term; don't drop it.

✏️ Try it yourself

Translate: "A greenhouse fan F should run when the temperature is HIGH (H=1) AND the window is NOT open (O=1 means open), OR when the manual override M is on." Write the expression.

"HIGH and window not open": H·O′. "…OR override on": add + M. Answer: F = H·O′ + M.

Recap — the whole topic on one screen

StepDo this
1 Signalsname each condition + active value (convention)
2 Outputname the single yes/no decision
3 Connectorsand→·, or→+, not/unless→′, only if→·
4 Negatives"not active" → use the complement
5 Verifytruth table, every row, against the spec

Next topic · Theme 3

Canonical forms (SOP & POS)

You can write logic from a requirement. Next: the standard way to write a function straight from its truth table — sum-of-products and product-of-sums — the launchpad for Karnaugh-map simplification.

→ Canonical forms (SOP & POS)