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.
Open this circuit in the lab →
What you need
- 1× 2-to-4 decoder with enable: first level: S3 S2, with D on its enable
- 4× 2-to-4 decoder with enable: second level: S1 S0 into Y0 to Y3, Y4 to Y7, Y8 to Y11 and Y12 to Y15
Step by step
- Place inputs
D,S3,S2,S1,S0and sixteen probesY0toY15. - Wire S3 and S2 to the address inputs of the first decoder, and D to its enable.
- Wire S1 and S0 to the address inputs of all four second-level decoders.
- Connect output k of the first decoder to the enable of second-level decoder k; decoder k drives Y4k to Y4k+3.
- 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
| D | S3 S2 S1 S0 | Output that equals D |
|---|---|---|
| 0 | x x x x | none: all 0 |
| 1 | 0 0 0 0 | Y0 |
| 1 | 0 0 0 1 | Y1 |
| 1 | 0 0 1 0 | Y2 |
| 1 | 0 0 1 1 | Y3 |
| 1 | 0 1 0 0 | Y4 |
| 1 | 0 1 0 1 | Y5 |
| 1 | 0 1 1 0 | Y6 |
| 1 | 0 1 1 1 | Y7 |
| 1 | 1 0 0 0 | Y8 |
| 1 | 1 0 0 1 | Y9 |
| 1 | 1 0 1 0 | Y10 |
| 1 | 1 0 1 1 | Y11 |
| 1 | 1 1 0 0 | Y12 |
| 1 | 1 1 0 1 | Y13 |
| 1 | 1 1 1 0 | Y14 |
| 1 | 1 1 1 1 | Y15 |
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.