Fig. 1 — 2-Input OR GateInteractive simulation

What You'll Learn

  • Read and write the 2-input OR truth table from memory.
  • Recognize that OR is the dual of AND — it returns 0 only when every input is 0.
  • Translate "or" / "either" / "any of" English statements into Boolean OR.
  • Identify OR gates inside larger circuits like alarms, interrupts, and reset trees.
  • Understand why OR is commutative and associative, and why those properties matter.

How It Works

A Boolean OR implements inclusive disjunction: Output is high when A is high, B is high, or both are high. Only A = B = 0 produces a low output. The function is Output = A + B, where + denotes logical OR rather than arithmetic addition.

The production circuit connects two input switches to one 2-input OR gate and connects that gate to one output light. Three of the four input combinations drive the light high. By comparison, a 2-input AND is high on only the 11 row; this is a complementary row-count pattern, not a claim that OR is the logical negation of AND.

OR is commutative (A + B = B + A) and associative ((A + B) + C = A + (B + C)). Those identities preserve the stable logic function when inputs are reordered or grouped. In physical hardware, different groupings can still change gate depth, delay, area, and transient behavior.

Truth Table

A 2-input OR has 2² = 4 possible combinations. Only the all-zeros row produces 0; every other row produces 1.

InputsOutput
ABOutput
000Both off — output low
011One input high — output high
101
111Both high — output still high

Boolean Expression

Output=A+B\text{Output} = A + B

Standard form. The + denotes logical OR, not arithmetic addition.

Output=A∨B\text{Output} = A \lor B

Formal logic notation using the disjunction symbol.

Output=A‾⋅B‾‾\text{Output} = \overline{\overline{A} \cdot \overline{B}}

De Morgan equivalent — OR equals NAND of the inverted inputs.

Try It Step-by-Step

Set the listed controls in the embedded circuit, then compare the observed modeled state with the expected result.

  1. 1
    A=0B=0
    Expected:Output = 0
    What you'll see:Both switches off — the output is dark. This is the only combination that produces 0.
  2. 2
    A=1B=0
    Expected:Output = 1
    What you'll see:One input high — output goes high. OR doesn't care which input lifts it, just that at least one does.
  3. 3
    A=0B=1
    Expected:Output = 1
    What you'll see:Symmetry: flipping which input is high gives the same result. OR is commutative.
  4. 4
    A=1B=1
    Expected:Output = 1
    What you'll see:Both inputs high — output stays high. Unlike XOR, OR doesn't flip back to 0 when both inputs match.

Components Used

Applications and Design Context

Alarm-request aggregation. Conditioned window, motion, and glass-break signals can feed an OR so any active request asserts an aggregate alarm.

Interrupt aggregation. Peripheral request lines can be ORed into one processor-facing interrupt, while separate status or vector logic identifies the source.

Active-high reset requests. Power-on, watchdog, manual, and debug reset requests can be combined before reset distribution, subject to polarity and synchronization requirements.

Status summaries. Independent fault bits can drive a master warning without discarding the detailed per-fault indicators.

Array error summaries. Local memory-bank error flags can be ORed into one aggregate error signal.

Frequently Asked Questions

Is OR the same as inclusive-or in English?

Yes. Boolean OR is the inclusive sense: "A or B or both." The exclusive sense ("A or B but not both") is XOR — a different gate.

Why does + mean OR instead of addition?

It's a notational convention from George Boole's algebra. In Boolean expressions, + is OR and · is AND — different operators that share symbols with arithmetic for historical reasons.

Can I build an OR gate using only NAND gates?

Yes. NAND is universal — any logic function, including OR, can be built from NANDs alone. Specifically: A OR B = NAND(NOT A, NOT B), and NOT A = NAND(A, A).

What's the OR of more than two inputs?

It is high when at least one input is high. A wider OR can be realized with a wide-fan-in cell or a tree of smaller gates. Associativity preserves the steady-state Boolean result, while grouping still affects physical depth and timing.

What's the difference between OR and XOR?

OR returns 1 when at least one input is 1 (including when both are 1). XOR returns 1 only when an odd number of inputs are 1 — it's 0 when both inputs are 1. They differ on exactly the row where both inputs are high.

Continue Learning