LearnGates

The OR gate

The OR gate gives 1 when at least one of its inputs is 1. The output is 0 only when every input is 0. It is the logic version of “or”: the alarm rings if the door or the window is open, or both.

Formula Y = A + B

Truth table

Truth table of OR
ABY
000
011
101
111

Try it Click the inputs to change them.

Y0

Where it is used

OR gates combine signals: any one of several sensors can raise an alarm, any key on a keypad can wake a device. In the full adder, an OR joins the two possible carries into one.

Careful with everyday language: when people say “tea or coffee” they usually mean one of the two, not both. That “one or the other, but not both” is a different gate, XOR.

Build it yourself

An OR gate can be made from three NAND gates, thanks to De Morgan’s law. Try it in the OR from NAND challenge.