Redstonery › Circuits › OR gate
Logic circuit
OR gate
Let either control enable an output.
5 × 3 footprint1 layer9 blocksTested in 4 rotationsJava Edition 26.2
Layout
redstone dustinputlamparrows point where a device sends its output; north is up
How it works
Two inputs meet on the same dust: either one lights the lamp.
- The two input routes meet at one output route.
- Either input can enable the output; both together also enable it.
Truth table
Settled outputs after the inputs stop changing. 1 is on, 0 is off. Every row is checked in the simulator in all four rotations.
| A | B | A or B |
|---|---|---|
| 0 | 0 | 0 |
| 1 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 1 | 1 |
Inputs and outputs
- InputA (x 0, y 0, z 0)
- InputB (x 0, y 0, z 2)
- OutputA or B (x 4, y 0, z 1)
Blocks you need
6 × redstone dust, 2 × lever, 1 × redstone lamp.
Build it in the game: 9 commands
Relative to where you stand, with x running east and z running south. Paste one line at a time into chat, or into a chain of command blocks. The block art is the game's own; the layout is what the page above shows.
setblock ~0 ~0 ~0 minecraft:lever[face=floor,facing=north,powered=false] setblock ~1 ~0 ~0 minecraft:redstone_wire setblock ~2 ~0 ~0 minecraft:redstone_wire setblock ~0 ~0 ~2 minecraft:lever[face=floor,facing=north,powered=false] setblock ~1 ~0 ~2 minecraft:redstone_wire setblock ~2 ~0 ~2 minecraft:redstone_wire setblock ~2 ~0 ~1 minecraft:redstone_wire setblock ~3 ~0 ~1 minecraft:redstone_wire setblock ~4 ~0 ~1 minecraft:redstone_lamp