Design example using Boolean algebra

Design means walking one road: English rule → Boolean variables → expression → simplify → gates, and it turns algebra into a working circuit.

11 min read · 12 cards · 3 checks

Read in: English · हिन्दी · ગુજરાતી


Theory

You are the engineer now

The college lab installs a smart door. The rule, in plain words:

"Open only for someone with a valid ID card who has morning or evening slot permission."

Somewhere between that sentence and the wires inside the door is a translation job. That job is called design, and by the end of this topic you will do it end to end, sentence to circuit.

Theory

A rulebook for a gatekeeper

Think of the output as a gatekeeper who cannot think, only follow a rulebook. Design is writing that rulebook so precisely that for EVERY combination of conditions the answer is a definite open (1) or stay shut (0). English is too loose for that; Boolean algebra is the precise language.

Theory

Step 1: name the inputs and the output

Turn each condition into a 0/1 variable:

  • A = 1 when the ID card is valid
  • M = 1 when morning permission exists
  • E = 1 when evening permission exists
  • F = 1 when the door should open (the output)

This step looks trivial and is where most wrong answers are born: a fuzzy variable ("A = the card") cannot be computed with. Define each as a yes/no test.

Theory

Step 2: translate the sentence

"Valid ID and (morning or evening permission)" becomes:

F = A·(M + E)

  • "and" → · (AND)
  • "or" → + (inclusive OR: someone with both slots still enters)
  • brackets follow the sentence's grouping

Distributing gives the SOP view: F = A·M + A·E, two entry cases, both requiring the ID.

Quiz

Using F = A·(M + E): a student has a valid ID (A = 1), no morning permission (M = 0), evening permission (E = 1). Does the door open?

  1. Yes, F = 1
  2. No, F = 0 because M = 0
  3. No, both slots are needed
  4. Cannot tell from the expression
Show the answer

Yes, F = 1

M + E = 0 + 1 = 1, then F = 1·1 = 1: door opens. Options B and C read OR as AND, the single most common translation error. Inclusive OR needs at least one, not all. Plugging values in like this is also how you verify any design.

Theory

Step 3: draw it as gates

F = A·(M + E) wires up directly:

  • one OR gate takes M and E, producing (M + E)
  • one AND gate takes A and that result, producing F

Two gates total. The expanded form A·M + A·E needs two AND gates plus an OR gate: three gates for the same function. Same truth table, different cost, which is why simplification (last topic) matters before wiring.

Think first

New brief: "A machine runs only when the power is on, the cover is closed, and there is no fault."

Define variables and write the expression in your head: P = power on, C = cover closed, F = fault present, R = machine runs.

Show the answer

R = P·C·¬F

All three conditions join by AND, and "no fault" is the complement of F, built with a NOT gate feeding the AND. The subtle step: F was defined as "fault PRESENT", so the rule needs ¬F. Always re-read your own variable definitions before writing the expression.

Quiz

In the machine example, why does the expression use ¬F instead of F?

  1. Because NOT gates are cheaper than AND gates
  2. Because F was defined as "fault present" and the rule wants the fault absent
  3. Because outputs must always be complemented
  4. It is a mistake; R = P·C·F is correct
Show the answer

Because F was defined as "fault present" and the rule wants the fault absent

The variable stores "fault present"; the rule demands its opposite, so the complement bridges the two. If F had been defined as "no fault", plain F would be right. The lesson: expressions depend entirely on how variables were defined, which is why step 1 is written down, not assumed.

Formula

The four-step exam recipe

Every design question yields to the same moves: (1) define 0/1 inputs and the output in one line each, (2) translate the sentence with ·, + and ¬ following its grouping, (3) simplify only if it genuinely drops terms, naming laws, (4) describe or sketch the gates. Write the four steps as headings and the marks follow.

Watch out

Translation traps in the English

"Or" in rules is inclusive unless the sentence says "but not both" (that would be XOR). "Only if" states a requirement, not a guarantee: "opens only if ID is valid" means no ID, no entry, but a valid ID alone may not be enough. And negative words (no, unless, without) almost always signal a complement.

Theory

Where you will meet this again

This exact flow is how real hardware is born: engineers write conditions in a language like Verilog and tools minimize and wire them. On the software side, every access-control check you will code (user.isValid && (slot === 'AM' || slot === 'PM')) is today's door in JavaScript clothes.

Summary

Key takeaways

  • Design walks one road: define 0/1 variables, translate the sentence, simplify if useful, map to gates.
  • "and" → ·, "or" → + (inclusive), "no/not" → complement, brackets follow the sentence grouping.
  • F = A·(M + E) uses two gates; its expansion A·M + A·E uses three: equivalent function, different cost.
  • Expressions inherit meaning from variable definitions, so write the definitions first.
  • Memory hook: sentence, symbols, simplify, circuit.

Study this properly

This page is the lesson to read. In Gri-Learn the same topic is a graded deck: the self-checks are scored and your weak topics are tracked. Free to start.

Start this topic

Already have an account? Sign in

More from Boolean Algebra

Gri-Learn · syllabus-mapped B.C.A. lessons in English, Hindi and Gujarati

Design example using Boolean algebra · Mathematics (Multi-Disciplinary Course) · Gri-Learn