Skip to content
digiwleeaTools
LearnGlossaryAboutCheat sheetHow a CPU worksBuild a CPUToolsOpen the lab →

1-to-16 demultiplexer: circuit and truth table, live

A 1-to-16 demultiplexer sends one data input D to one of sixteen outputs, Y0 to Y15, chosen by the 4-bit select S3 S2 S1 S0, and holds the other fifteen outputs at 0. This one is a tree of five 2-to-4 decoders with enable, with D on the enable of the first.

A demultiplexer is a decoder whose enable carries data. The first 2-to-4 decoder decodes S3 S2, and because its enable is D, its selected output is D itself while the other three stay 0. Each of its outputs enables one of four second-level decoders on S1 S0, so D travels down exactly one path to Y(8 S3 + 4 S2 + 2 S1 + S0). With D tied to 1 the same circuit is the 4-to-16 decoder from 2-to-4 decoders; the gate-level 1-to-8 demultiplexer is the size below, and the 16-to-1 multiplexer does the reverse job. All 32 combinations of D and the select are checked, every output each time, before the page is built. The live circuit opens with D = 1 and the select at 0000, so Y0 is lit.

Big circuit: pinch, scroll or tap + to zoom in, then drag to move around.

Live circuit: click the inputs to toggle them and watch the outputs update. It runs the real simulator, right here on the page.

Open this circuit in the lab →

Embed or cite this circuit

Free to embed on a course page, blog or worksheet: paste this code. The circuit stays live, and the small digiwleea badge links back here.

To cite it: digiwleea, “1-to-16 demultiplexer”, https://digiwleea.wleeaf.dev/tools/build/demultiplexer-1to16/

What you need

Step by step

  1. Place inputs D, S3, S2, S1, S0 and sixteen probes Y0 to Y15.
  2. Wire S3 and S2 to the address inputs of the first decoder, and D to its enable.
  3. Wire S1 and S0 to the address inputs of all four second-level decoders.
  4. Connect output k of the first decoder to the enable of second-level decoder k; decoder k drives Y4k to Y4k+3.
  5. Set D = 1 and count the select from 0000 to 1111: the 1 moves from Y0 to Y15. Set D = 0 and every output is 0.

1-to-16 demultiplexer: truth table

DS3 S2 S1 S0Output that equals D
0x x x xnone: all 0
10 0 0 0Y0
10 0 0 1Y1
10 0 1 0Y2
10 0 1 1Y3
10 1 0 0Y4
10 1 0 1Y5
10 1 1 0Y6
10 1 1 1Y7
11 0 0 0Y8
11 0 0 1Y9
11 0 1 0Y10
11 0 1 1Y11
11 1 0 0Y12
11 1 0 1Y13
11 1 1 0Y14
11 1 1 1Y15

x means either value. With D = 0 all sixteen outputs are 0 whatever the select; with D = 1 only the selected one is 1. Demultiplexers like this route one signal to one of many places, such as a write strobe to one of sixteen registers, which is how the register file picks the register to write. Twice as many outputs: the 1-to-32 demux using 1-to-8 demuxes.

You can also read the full theory in the lesson on encoders and demultiplexers. Prefer to build it yourself from scratch? Open the digiwleea lab and place the gates on the canvas, or start from the logic gate simulator.

More builds: Selecting, routing and decoding

All 246 build guides, by topic

Each of these is one step from a transistor to a working CPU. Build every gate from CMOS transistors and work all the way up in the free digiwleea lab, with the free theory reference alongside.

Open the 1-to-16 demultiplexer in the lab →

Frequently asked

What is a 1-to-16 demultiplexer?

A circuit with one data input, four select inputs and sixteen outputs. It copies the data input to the output numbered by the select and holds the other fifteen outputs at 0.

How do you make a 1-to-16 demux from smaller demultiplexers?

Use a 1-to-4 demux on the top two select bits to send D to one of four second-level 1-to-4 demuxes, each driven by the low two select bits. That is five 1-to-4 demuxes, and a 2-to-4 decoder with an enable input is exactly a 1-to-4 demux with D on the enable, which is how this circuit is built.

How many select lines does a 1-to-16 demultiplexer need?

Four, because 2 to the power 4 is 16. In general a 1-to-n demultiplexer needs log2(n) select lines.

What is the difference between a demultiplexer and a decoder?

A decoder turns an n-bit number into one active output line. A demultiplexer is a decoder with its enable used as a data input, so the selected output carries that data instead of a constant 1.