OR gate

The gate that fires when any of its inputs is on. A plain-English guide to logic gates from TorchAnvil.

An OR gate has two (or more) inputs and one output. The output is high when at least one input is high. It only goes low when every input is low.

How to read it

OR is the word "or" in English — but the generous version. "Bring a coat or an umbrella" doesn't stop you bringing both.

A B A + B
0 0 0
0 1 1
1 0 1
1 1 1

Three 1s and a single 0. OR is the mirror image of AND, which has three 0s and a single 1. Where AND is fussy, OR is easygoing: it says no only when everything is off.

The + in A + B is Boolean addition, and it behaves like ordinary addition with one exception: 1 + 1 = 1, not 2. There is no "2" in Boolean algebra. A wire is on or it isn't, and two reasons to be on don't make it more on. That single exception is the whole difference between OR and the sum bit of an adder.

Why it matters

OR is how you collect alarms, requests and permissions — anything where several independent sources should all be able to trigger the same result:

That last one is the shape you'll meet most often in real hardware: a wide OR collecting every possible fault into one line.

A worked example: a two-switch lamp

Wire two levers into an OR and out to a lamp. Now walk the room. Flip the lever by the door: lamp on. Walk over and flip the second lever: lamp stays on. Flip the first one back: still on. The lamp only goes dark when you've turned off both.

That's the behaviour of a shop's "any till can ring the bell" line, and it's why OR is the wrong choice for a hallway light with switches at both ends — there, flipping either switch should toggle the light, which is XOR, not OR. Getting this pair the wrong way round is the single most common wiring mistake in beginner circuits.

How it differs from XOR

OR and XOR agree on three rows and differ on exactly one:

A B OR XOR
0 0 0 0
0 1 1 1
1 0 1 1
1 1 1 0

Everything hinges on "both on". OR says yes; XOR says no. Spoken English is ambiguous here — "tea or coffee?" usually means one or the other, not both, which is XOR — so English is a poor guide. When you need "either but not both," reach for XOR and say so out loud, because your intuition will keep pulling you toward OR.

In redstone

OR is the gate redstone gives you for free. Run two dust lines into the same block and you have one: if either line carries power, the shared output is powered. No torches, no delay, no bill of materials.

That's worth internalising because it inverts the usual cost intuition. In most tutorials AND feels like the "simple" gate, but in redstone AND costs three torches and two ticks while OR costs a block of dust and zero ticks. Wide ORs are nearly free: merge eight lines into one bus and you've built an 8-input OR without placing a single component.

The catch is signal strength. Redstone dust loses one unit of power per block travelled, and merging lines doesn't add strength — the result takes the strongest input, not their sum. For long runs you'll need a repeater to bring the level back up, which does cost a tick.

Building it from other gates

Like every gate, OR can be built from NANDs — three of them:

The first two NANDs invert each input, and the third combines them. That's De Morgan again: NOT(NOT A AND NOT B) = A OR B. From NORs it's cheaper, needing only two: a NOR followed by an inverter.

Wide ORs and buses

Because OR is associative and cheap, it scales better than any other gate. An 8-input OR asks a simple question — "is anything on?" — and there are two ways to build it.

A chain feeds gate 1 into gate 2 into gate 3, and so on. Seven gates, seven levels deep. The answer isn't valid until the signal has propagated through all seven.

A tree pairs the inputs — four ORs, then two, then one. Still seven gates, but only three levels deep. In a clocked design that's less than half the delay for identical logic and identical cost.

In redstone the tree question mostly evaporates, because merging dust lines is free and instant: eight lines into one block is a genuine 8-input OR with zero gates and zero ticks. What you get instead is the signal-strength problem — the merged line still fades one unit per block, so a wide bus over any distance needs repeaters.

Gotchas

Try it

The demo on the right is two levers into one OR into a lamp. Flip either lever and the lamp lights. Flip both and nothing new happens — that's the row that separates OR from XOR.

Then rewire it: replace the OR with an XOR and repeat the same four combinations. Only the last one changes.

Frequently asked questions

What is an OR gate?
An OR gate is a logic gate whose output is high when at least one input is high. With two inputs, three of the four combinations produce a 1 — only both-inputs-off gives 0.
What is the difference between OR and XOR?
They differ on exactly one row. When both inputs are on, OR outputs 1 and XOR outputs 0. OR means "at least one"; XOR means "exactly one".
How do you build an OR gate in Minecraft redstone?
Run both input lines into the same block of redstone dust. If either line is powered the output is powered. OR needs no torches and adds no tick delay, which makes it the cheapest gate in redstone.
Why does 1 + 1 = 1 in Boolean algebra?
Because a wire is either on or off — there is no value above 1. Boolean addition is OR, so two reasons for a wire to be on still leave it simply on. The sum bit that would carry to 2 is handled by XOR instead.
Is an OR gate inclusive or exclusive?
Inclusive. Both inputs being on still produces an output of 1. The exclusive version, which rejects that case, is the XOR gate.