Redstonery
RedstoneryCircuits › 2-to-1 multiplexer
Logic circuit

2-to-1 multiplexer

Choose which input is allowed to become the output.

17 × 20 footprint7 layers183 blocksTested in 4 rotationsJava Edition 26.2
Open in the simulatorBuild it in the game

Layout

Layer 0 (on the floor)
lever [face=floor, facing=north, powered=false] at x 0, z 0redstone dust at x 1, z 0redstone dust at x 2, z 0redstone dust at x 3, z 0redstone dust at x 4, z 0redstone dust at x 5, z 0redstone dust at x 6, z 0repeater [facing=west, delay=1] at x 7, z 0redstone dust at x 8, z 0redstone dust at x 9, z 0redstone dust at x 10, z 0redstone dust at x 11, z 0redstone dust at x 12, z 0redstone dust at x 13, z 0redstone dust at x 14, z 0repeater [facing=west, delay=1] at x 15, z 0redstone dust at x 16, z 0repeater [facing=north, delay=1] at x 2, z 1redstone dust at x 2, z 2redstone dust at x 2, z 3redstone dust at x 2, z 4redstone dust at x 2, z 5redstone dust at x 2, z 6redstone dust at x 2, z 7redstone dust at x 2, z 8redstone dust at x 2, z 9redstone dust at x 2, z 10stone at x 2, z 11redstone torch (on a wall) [facing=south] at x 2, z 12stone at x 6, z 7redstone dust at x 6, z 8redstone dust at x 6, z 9redstone dust at x 6, z 10redstone dust at x 6, z 11repeater [facing=north, delay=1] at x 6, z 12redstone dust at x 2, z 13redstone dust at x 3, z 13redstone dust at x 4, z 13redstone dust at x 5, z 13redstone dust at x 6, z 13redstone dust at x 4, z 14stone at x 4, z 15redstone torch (on a wall) [facing=south] at x 4, z 16repeater [facing=north, delay=1] at x 4, z 17redstone dust at x 4, z 18stone at x 12, z 4redstone dust at x 12, z 5redstone dust at x 12, z 6redstone dust at x 12, z 7redstone dust at x 12, z 8redstone dust at x 12, z 9redstone dust at x 12, z 10stone at x 12, z 11redstone torch (on a wall) [facing=south] at x 12, z 12stone at x 14, z 7redstone dust at x 14, z 8redstone dust at x 14, z 9redstone dust at x 14, z 10stone at x 14, z 11redstone torch (on a wall) [facing=south] at x 14, z 12redstone dust at x 10, z 13redstone dust at x 11, z 13redstone dust at x 12, z 13redstone dust at x 13, z 13redstone dust at x 14, z 13redstone dust at x 12, z 14stone at x 12, z 15redstone torch (on a wall) [facing=south] at x 12, z 16repeater [facing=north, delay=1] at x 12, z 17redstone dust at x 12, z 18redstone dust at x 4, z 19redstone dust at x 5, z 19redstone dust at x 6, z 19repeater [facing=west, delay=1] at x 7, z 19redstone dust at x 8, z 19redstone dust at x 9, z 19redstone dust at x 10, z 19redstone dust at x 11, z 19redstone dust at x 12, z 19redstone dust at x 13, z 19redstone dust at x 14, z 19redstone lamp at x 15, z 19
Layer 1 (1 up)
stone at x 6, z 6redstone dust at x 6, z 7stone at x 12, z 3redstone dust at x 12, z 4stone at x 14, z 6redstone dust at x 14, z 7
Layer 2 (2 up)
stone at x 0, z 0stone at x 1, z 0stone at x 2, z 0stone at x 3, z 0stone at x 4, z 0stone at x 5, z 0stone at x 6, z 0stone at x 7, z 0stone at x 8, z 0stone at x 9, z 0stone at x 10, z 0stone at x 11, z 0stone at x 12, z 0stone at x 13, z 0stone at x 14, z 0stone at x 15, z 0stone at x 16, z 0stone at x 6, z 5redstone dust at x 6, z 6stone at x 12, z 1stone at x 12, z 2redstone dust at x 12, z 3stone at x 14, z 5redstone dust at x 14, z 6
Layer 3 (3 up)
lever [face=floor, facing=north, powered=false] at x 0, z 0redstone dust at x 1, z 0redstone dust at x 2, z 0redstone dust at x 3, z 0redstone dust at x 4, z 0redstone dust at x 5, z 0redstone dust at x 6, z 0repeater [facing=west, delay=1] at x 7, z 0redstone dust at x 8, z 0redstone dust at x 9, z 0redstone dust at x 10, z 0redstone dust at x 11, z 0redstone dust at x 12, z 0redstone dust at x 13, z 0redstone dust at x 14, z 0repeater [facing=west, delay=1] at x 15, z 0redstone dust at x 16, z 0stone at x 6, z 4redstone dust at x 6, z 5repeater [facing=north, delay=1] at x 12, z 1redstone dust at x 12, z 2stone at x 14, z 4redstone dust at x 14, z 5
Layer 4 (4 up)
stone at x 6, z 3redstone dust at x 6, z 4stone at x 14, z 3redstone dust at x 14, z 4
Layer 5 (5 up)
stone at x 0, z 0stone at x 1, z 0stone at x 2, z 0stone at x 3, z 0stone at x 4, z 0stone at x 5, z 0stone at x 6, z 0stone at x 7, z 0stone at x 8, z 0stone at x 9, z 0stone at x 10, z 0stone at x 11, z 0stone at x 12, z 0stone at x 13, z 0stone at x 14, z 0stone at x 15, z 0stone at x 16, z 0stone at x 6, z 1stone at x 6, z 2redstone dust at x 6, z 3stone at x 14, z 1stone at x 14, z 2redstone dust at x 14, z 3
Layer 6 (6 up)
lever [face=floor, facing=north, powered=false] at x 0, z 0redstone dust at x 1, z 0redstone dust at x 2, z 0redstone dust at x 3, z 0redstone dust at x 4, z 0redstone dust at x 5, z 0redstone dust at x 6, z 0repeater [facing=west, delay=1] at x 7, z 0redstone dust at x 8, z 0redstone dust at x 9, z 0redstone dust at x 10, z 0redstone dust at x 11, z 0redstone dust at x 12, z 0redstone dust at x 13, z 0redstone dust at x 14, z 0repeater [facing=west, delay=1] at x 15, z 0redstone dust at x 16, z 0repeater [facing=north, delay=1] at x 6, z 1redstone dust at x 6, z 2repeater [facing=north, delay=1] at x 14, z 1redstone dust at x 14, z 2
redstone dustredstone torchrepeater or comparatorinputlampsolid blockarrows point where a device sends its output; north is up

How it works

Select off passes A; Select on passes B. A real signal selector made from gates. The raised rails carry independent inputs into visible torch AND terms; repeaters isolate the output OR rails. Allow 60 game ticks for this teaching layout to settle.

  1. The select input enables one data route and disables the other.
  2. For a two-input multiplexer, Y = (A AND NOT S) OR (B AND S): select off chooses A and select on chooses B.

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.

ABSelectselected data
0000
1001
0100
1101
0010
1010
0111
1111

Inputs and outputs

  • InputA (x 0, y 0, z 0)
  • InputB (x 0, y 3, z 0)
  • InputSelect (x 0, y 6, z 0)
  • Outputselected data (x 14, y 0, z 19)

Blocks you need

103 × redstone dust, 57 × stone, 14 × repeater, 5 × redstone torch (on a wall), 3 × lever, 1 × redstone lamp.

Build it in the game: 183 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 ~3 ~0 ~0 minecraft:redstone_wire
setblock ~4 ~0 ~0 minecraft:redstone_wire
setblock ~5 ~0 ~0 minecraft:redstone_wire
setblock ~6 ~0 ~0 minecraft:redstone_wire
setblock ~7 ~0 ~0 minecraft:repeater[facing=west,delay=1]
setblock ~8 ~0 ~0 minecraft:redstone_wire
setblock ~9 ~0 ~0 minecraft:redstone_wire
setblock ~10 ~0 ~0 minecraft:redstone_wire
setblock ~11 ~0 ~0 minecraft:redstone_wire
setblock ~12 ~0 ~0 minecraft:redstone_wire
setblock ~13 ~0 ~0 minecraft:redstone_wire
setblock ~14 ~0 ~0 minecraft:redstone_wire
setblock ~15 ~0 ~0 minecraft:repeater[facing=west,delay=1]
setblock ~16 ~0 ~0 minecraft:redstone_wire
setblock ~0 ~2 ~0 minecraft:stone
setblock ~0 ~3 ~0 minecraft:lever[face=floor,facing=north,powered=false]
setblock ~1 ~2 ~0 minecraft:stone
setblock ~1 ~3 ~0 minecraft:redstone_wire
setblock ~2 ~2 ~0 minecraft:stone
setblock ~2 ~3 ~0 minecraft:redstone_wire
setblock ~3 ~2 ~0 minecraft:stone
setblock ~3 ~3 ~0 minecraft:redstone_wire
setblock ~4 ~2 ~0 minecraft:stone
setblock ~4 ~3 ~0 minecraft:redstone_wire
setblock ~5 ~2 ~0 minecraft:stone
setblock ~5 ~3 ~0 minecraft:redstone_wire
setblock ~6 ~2 ~0 minecraft:stone
setblock ~6 ~3 ~0 minecraft:redstone_wire
setblock ~7 ~2 ~0 minecraft:stone
setblock ~7 ~3 ~0 minecraft:repeater[facing=west,delay=1]
setblock ~8 ~2 ~0 minecraft:stone
setblock ~8 ~3 ~0 minecraft:redstone_wire
setblock ~9 ~2 ~0 minecraft:stone
setblock ~9 ~3 ~0 minecraft:redstone_wire
setblock ~10 ~2 ~0 minecraft:stone
setblock ~10 ~3 ~0 minecraft:redstone_wire
setblock ~11 ~2 ~0 minecraft:stone
setblock ~11 ~3 ~0 minecraft:redstone_wire
setblock ~12 ~2 ~0 minecraft:stone
setblock ~12 ~3 ~0 minecraft:redstone_wire
setblock ~13 ~2 ~0 minecraft:stone
setblock ~13 ~3 ~0 minecraft:redstone_wire
setblock ~14 ~2 ~0 minecraft:stone
setblock ~14 ~3 ~0 minecraft:redstone_wire
setblock ~15 ~2 ~0 minecraft:stone
setblock ~15 ~3 ~0 minecraft:repeater[facing=west,delay=1]
setblock ~16 ~2 ~0 minecraft:stone
setblock ~16 ~3 ~0 minecraft:redstone_wire
setblock ~0 ~5 ~0 minecraft:stone
setblock ~0 ~6 ~0 minecraft:lever[face=floor,facing=north,powered=false]
setblock ~1 ~5 ~0 minecraft:stone
setblock ~1 ~6 ~0 minecraft:redstone_wire
setblock ~2 ~5 ~0 minecraft:stone
setblock ~2 ~6 ~0 minecraft:redstone_wire
setblock ~3 ~5 ~0 minecraft:stone
setblock ~3 ~6 ~0 minecraft:redstone_wire
setblock ~4 ~5 ~0 minecraft:stone
setblock ~4 ~6 ~0 minecraft:redstone_wire
setblock ~5 ~5 ~0 minecraft:stone
setblock ~5 ~6 ~0 minecraft:redstone_wire
setblock ~6 ~5 ~0 minecraft:stone
setblock ~6 ~6 ~0 minecraft:redstone_wire
setblock ~7 ~5 ~0 minecraft:stone
setblock ~7 ~6 ~0 minecraft:repeater[facing=west,delay=1]
setblock ~8 ~5 ~0 minecraft:stone
setblock ~8 ~6 ~0 minecraft:redstone_wire
setblock ~9 ~5 ~0 minecraft:stone
setblock ~9 ~6 ~0 minecraft:redstone_wire
setblock ~10 ~5 ~0 minecraft:stone
setblock ~10 ~6 ~0 minecraft:redstone_wire
setblock ~11 ~5 ~0 minecraft:stone
setblock ~11 ~6 ~0 minecraft:redstone_wire
setblock ~12 ~5 ~0 minecraft:stone
setblock ~12 ~6 ~0 minecraft:redstone_wire
setblock ~13 ~5 ~0 minecraft:stone
setblock ~13 ~6 ~0 minecraft:redstone_wire
setblock ~14 ~5 ~0 minecraft:stone
setblock ~14 ~6 ~0 minecraft:redstone_wire
setblock ~15 ~5 ~0 minecraft:stone
setblock ~15 ~6 ~0 minecraft:repeater[facing=west,delay=1]
setblock ~16 ~5 ~0 minecraft:stone
setblock ~16 ~6 ~0 minecraft:redstone_wire
setblock ~2 ~0 ~1 minecraft:repeater[facing=north,delay=1]
setblock ~2 ~0 ~2 minecraft:redstone_wire
setblock ~2 ~0 ~3 minecraft:redstone_wire
setblock ~2 ~0 ~4 minecraft:redstone_wire
setblock ~2 ~0 ~5 minecraft:redstone_wire
setblock ~2 ~0 ~6 minecraft:redstone_wire
setblock ~2 ~0 ~7 minecraft:redstone_wire
setblock ~2 ~0 ~8 minecraft:redstone_wire
setblock ~2 ~0 ~9 minecraft:redstone_wire
setblock ~2 ~0 ~10 minecraft:redstone_wire
setblock ~2 ~0 ~11 minecraft:stone
setblock ~2 ~0 ~12 minecraft:redstone_wall_torch[facing=south]
setblock ~6 ~5 ~1 minecraft:stone
setblock ~6 ~6 ~1 minecraft:repeater[facing=north,delay=1]
setblock ~6 ~5 ~2 minecraft:stone
setblock ~6 ~6 ~2 minecraft:redstone_wire
setblock ~6 ~4 ~3 minecraft:stone
setblock ~6 ~5 ~3 minecraft:redstone_wire
setblock ~6 ~3 ~4 minecraft:stone
setblock ~6 ~4 ~4 minecraft:redstone_wire
setblock ~6 ~2 ~5 minecraft:stone
setblock ~6 ~3 ~5 minecraft:redstone_wire
setblock ~6 ~1 ~6 minecraft:stone
setblock ~6 ~2 ~6 minecraft:redstone_wire
setblock ~6 ~0 ~7 minecraft:stone
setblock ~6 ~1 ~7 minecraft:redstone_wire
setblock ~6 ~0 ~8 minecraft:redstone_wire
setblock ~6 ~0 ~9 minecraft:redstone_wire
setblock ~6 ~0 ~10 minecraft:redstone_wire
setblock ~6 ~0 ~11 minecraft:redstone_wire
setblock ~6 ~0 ~12 minecraft:repeater[facing=north,delay=1]
setblock ~2 ~0 ~13 minecraft:redstone_wire
setblock ~3 ~0 ~13 minecraft:redstone_wire
setblock ~4 ~0 ~13 minecraft:redstone_wire
setblock ~5 ~0 ~13 minecraft:redstone_wire
setblock ~6 ~0 ~13 minecraft:redstone_wire
setblock ~4 ~0 ~14 minecraft:redstone_wire
setblock ~4 ~0 ~15 minecraft:stone
setblock ~4 ~0 ~16 minecraft:redstone_wall_torch[facing=south]
setblock ~4 ~0 ~17 minecraft:repeater[facing=north,delay=1]
setblock ~4 ~0 ~18 minecraft:redstone_wire
setblock ~12 ~2 ~1 minecraft:stone
setblock ~12 ~3 ~1 minecraft:repeater[facing=north,delay=1]
setblock ~12 ~2 ~2 minecraft:stone
setblock ~12 ~3 ~2 minecraft:redstone_wire
setblock ~12 ~1 ~3 minecraft:stone
setblock ~12 ~2 ~3 minecraft:redstone_wire
setblock ~12 ~0 ~4 minecraft:stone
setblock ~12 ~1 ~4 minecraft:redstone_wire
setblock ~12 ~0 ~5 minecraft:redstone_wire
setblock ~12 ~0 ~6 minecraft:redstone_wire
setblock ~12 ~0 ~7 minecraft:redstone_wire
setblock ~12 ~0 ~8 minecraft:redstone_wire
setblock ~12 ~0 ~9 minecraft:redstone_wire
setblock ~12 ~0 ~10 minecraft:redstone_wire
setblock ~12 ~0 ~11 minecraft:stone
setblock ~12 ~0 ~12 minecraft:redstone_wall_torch[facing=south]
setblock ~14 ~5 ~1 minecraft:stone
setblock ~14 ~6 ~1 minecraft:repeater[facing=north,delay=1]
setblock ~14 ~5 ~2 minecraft:stone
setblock ~14 ~6 ~2 minecraft:redstone_wire
setblock ~14 ~4 ~3 minecraft:stone
setblock ~14 ~5 ~3 minecraft:redstone_wire
setblock ~14 ~3 ~4 minecraft:stone
setblock ~14 ~4 ~4 minecraft:redstone_wire
setblock ~14 ~2 ~5 minecraft:stone
setblock ~14 ~3 ~5 minecraft:redstone_wire
setblock ~14 ~1 ~6 minecraft:stone
setblock ~14 ~2 ~6 minecraft:redstone_wire
setblock ~14 ~0 ~7 minecraft:stone
setblock ~14 ~1 ~7 minecraft:redstone_wire
setblock ~14 ~0 ~8 minecraft:redstone_wire
setblock ~14 ~0 ~9 minecraft:redstone_wire
setblock ~14 ~0 ~10 minecraft:redstone_wire
setblock ~14 ~0 ~11 minecraft:stone
setblock ~14 ~0 ~12 minecraft:redstone_wall_torch[facing=south]
setblock ~10 ~0 ~13 minecraft:redstone_wire
setblock ~11 ~0 ~13 minecraft:redstone_wire
setblock ~12 ~0 ~13 minecraft:redstone_wire
setblock ~13 ~0 ~13 minecraft:redstone_wire
setblock ~14 ~0 ~13 minecraft:redstone_wire
setblock ~12 ~0 ~14 minecraft:redstone_wire
setblock ~12 ~0 ~15 minecraft:stone
setblock ~12 ~0 ~16 minecraft:redstone_wall_torch[facing=south]
setblock ~12 ~0 ~17 minecraft:repeater[facing=north,delay=1]
setblock ~12 ~0 ~18 minecraft:redstone_wire
setblock ~4 ~0 ~19 minecraft:redstone_wire
setblock ~5 ~0 ~19 minecraft:redstone_wire
setblock ~6 ~0 ~19 minecraft:redstone_wire
setblock ~7 ~0 ~19 minecraft:repeater[facing=west,delay=1]
setblock ~8 ~0 ~19 minecraft:redstone_wire
setblock ~9 ~0 ~19 minecraft:redstone_wire
setblock ~10 ~0 ~19 minecraft:redstone_wire
setblock ~11 ~0 ~19 minecraft:redstone_wire
setblock ~12 ~0 ~19 minecraft:redstone_wire
setblock ~13 ~0 ~19 minecraft:redstone_wire
setblock ~14 ~0 ~19 minecraft:redstone_wire
setblock ~15 ~0 ~19 minecraft:redstone_lamp