Boolean Math and Models

The Core Idea

Boolean algebra describes decisions whose results are TRUE or FALSE. A Boolean model writes a control rule as an expression, so you can reason about that rule before choosing how to draw or program it.

What You Will Learn

  • Boolean algebra notation and the three core operators (AND, OR, NOT)

  • How to read and write Boolean expressions for control logic

  • De Morgan's theorems and how they simplify ladder logic

  • Truth tables as a verification tool

  • How Boolean expressions map directly to ladder rungs

Why This Matters

Boolean algebra is the mathematical language behind every ladder rung. When you can read a Boolean expression, you can predict exactly what a rung will do without tracing power flow. When you can write one, you can design logic on paper before ever opening a programming environment.

Notation

OperationSymbolMeaningLadder Equivalent
AND· or ∧Both must be trueSeries contacts
OR+ or ∨Either is sufficientParallel branches
NOT¬ or overbarInversionNormally closed (NC) contact

Examples:

  • Y = A · B → Y is true when A AND B are both true

  • Y = A + B → Y is true when A OR B (or both) are true

  • Y = ¬A → Y is true when A is false

Operator Precedence

Just like arithmetic (multiply before add), Boolean has precedence:

  1. NOT (highest — evaluated first)

  2. AND (middle)

  3. OR (lowest — evaluated last)

So A + B · ¬C means A + (B · (¬C)) — NOT C first, then AND with B, then OR with A.

Use parentheses to override: (A + B) · ¬C means OR first, then AND with NOT C.

De Morgan's Theorems

These two rules let you push NOT through AND/OR:

¬(A · B) = ¬A + ¬B    (NOT of AND = OR of NOTs)
¬(A + B) = ¬A · ¬B    (NOT of OR = AND of NOTs)

Why this matters for ladder: If you need "NOT (A AND B)", you can implement it as two NC contacts in parallel instead of trying to negate an entire series path.

Building a Boolean Model

For any control requirement:

  1. Identify the output — what tag should be controlled?

  2. List conditions — what inputs affect it?

  3. Classify each condition:

    • Must be TRUE → variable (e.g., SENSOR)

    • Must be FALSE → negated variable (e.g., ¬FAULT)

  4. Determine relationships:

    • ALL required → AND (·)

    • ANY sufficient → OR (+)

  5. Write the expression

Example

Requirement: "Run the pump if level is high AND valve is open, OR if manual override is active."

Model:

PUMP = (LEVEL_HIGH · VALVE_OPEN) + MANUAL_OVR

Verifying with Truth Tables

For any Boolean expression, build the truth table by evaluating every input combination:

LEVEL_HIGHVALVE_OPENMANUAL_OVRPUMP
0000
0011
0100
0111
1000
1011
1101
1111

If the truth table matches your requirement for every row, your expression is correct.

From Boolean to Ladder

The translation is mechanical:

  • Each AND (·) → series contacts in the same branch

  • Each OR (+) → parallel branches

  • Each NOT (¬) → NC contact instead of normally open (NO) contact

  • Parentheses → define branch grouping

PUMP = (LEVEL_HIGH · VALVE_OPEN) + MANUAL_OVR

Becomes: two parallel branches — top has NO LEVEL_HIGH and NO VALVE_OPEN in series, bottom has NO MANUAL_OVR alone — both feeding the PUMP output coil.

Common Boolean Identities

IdentityRule
A · 1 = AAND with TRUE has no effect
A · 0 = 0AND with FALSE always gives FALSE
A + 0 = AOR with FALSE has no effect
A + 1 = 1OR with TRUE always gives TRUE
A · A = AIdempotent AND
A + A = AIdempotent OR
A · ¬A = 0Contradiction
A + ¬A = 1Tautology

These help simplify complex expressions before translating to ladder.

Key Takeaways

  • Boolean algebra has three operators: AND (·), OR (+), NOT (¬)

  • Precedence: NOT > AND > OR (use parentheses to clarify)

  • De Morgan's theorems let you push NOT through AND/OR

  • Always build the Boolean model BEFORE drawing ladder

  • Truth tables verify correctness for every input combination

  • The translation from Boolean to ladder is mechanical and reversible

Enable JavaScript to run the embedded simulator and complete the interactive exercises.