4-to-1 multiplexer: build and simulate it online

Two select lines choose which of four inputs reaches Y.

Build the 4-to-1 multiplexer in the free online simulator — it checks your circuit automatically.

What you need

  • 6 logic switches labelled D0, D1, D2, D3, S1, S0
  • 1 probes labelled Y
  • a multiplexer (block or gates)

Step by step

  1. Inputs and output. From the Logic section of the library, drop digital inputs (0/1 boxes) or logic switches for the inputs, and digital outputs or probes for the outputs; give each its label in the inspector (the checker finds them by label). Switches D0, D1, D2, D3, S1, S0; Probe Y
  2. The multiplexer. Use the Multiplexer block (select lines = 2) — or build it from AND/OR/NOT gates for the challenge. D0–D3 → the data inputs, S0/S1 → select
  3. Prove it. The checker tries all 64 combinations: Y must always equal the selected D. S1 S0 = 10 → Y = D2

Truth table

S1S0D3D2D1D0Y
0000000
0000011
0000100
0000111
0001000
0001011
0001100
0001111
0010000
0010011
0010100
0010111
0011000
0011011
0011100
0011111
0100000
0100010
0100101
0100111
0101000
0101010
0101101
0101111
0110000
0110010
0110101
0110111
0111000
0111010
0111101
0111111
1000000
1000010
1000100
1000110
1001001
1001011
1001101
1001111
1010000
1010010
1010100
1010110
1011001
1011011
1011101
1011111
1100000
1100010
1100100
1100110
1101000
1101010
1101100
1101110
1110001
1110011
1110101
1110111
1111001
1111011
1111101
1111111

Frequently asked questions

How do you build a 4-to-1 multiplexer?

Two select lines choose which of four inputs reaches Y. In short: inputs and output, then the multiplexer, then prove it.

What is the truth table of a 4-to-1 multiplexer?

It has 6 inputs (S1, S0, D3, D2, D1, D0) and 1 output (Y), so 64 rows. The full table is on this page; the Embedded Lab checks all of them against your circuit.

What parts do you need for a 4-to-1 multiplexer?

a multiplexer (block or gates) — plus logic switches for the inputs and probes for the outputs.

Can I simulate a 4-to-1 multiplexer online for free?

Yes. Open it in the BitForBytes Embedded Lab, a free browser-based circuit and logic simulator: drag in the gates, wire them, and press "Check my circuit" — every input combination is simulated and marked for you. No download or sign-up needed.

Part of DSD 21 · Multiplexers in the free BitForBytes digital system design course.

More combinational builds