Logic Gates: OR

The OR logic gate takes two bits as an input. Its output follows the rule: "if at least one of the bits is $1$, output $1$; otherwise, output $0$." This gate acts exactly as the "or" operator in programming does: given the Boolean variables x and y, then: x || y means "x or y". You may also use the bitwise | operator: x | y.

Below is the black-box representation of the OR gate, one way in which we can build it with transistors, and its truth table.

OR Gate: black-box representation.

OR Gate: black-box representation. Miriam Briskman, CC BY-NC 4.0.

One way to build an OR Gate from transistors.

One way to build an OR Gate from transistors. Taken from this article by nithya7rns.

Input Output
x y x + y
$0$ $0$ $0$
$0$ $1$ $1$
$1$ $0$ $1$
$1$ $1$ $1$
OR truth table