Template: 1-to-2 Demultiplexer
Basic demultiplexer routing one input to two outputs. Learn data distribution and addressing concepts.
What You'll Learn
- Route a single data input to one of two outputs based on the select bit.
- Read the DEMUX truth table — exactly one output is non-zero at a time.
- Distinguish DEMUX (one input, many outputs) from MUX (many inputs, one output).
- Recognize that DEMUX with D=1 acts as a 1-of-N decoder.
- Apply DEMUX in TDM, write-back routing, and chip-select generation.
How It Works
A demultiplexer (DEMUX) is the inverse of a multiplexer: one data input, multiple outputs, and a select line that picks which output the input is routed to. The 1-to-2 DEMUX is the simplest case: one data input D, one select S, two outputs Y0 and Y1.
When S = 0, Y0 = D and Y1 = 0 (D goes to output 0; output 1 is silenced). When S = 1, Y1 = D and Y0 = 0 (D goes to output 1; output 0 is silenced).
Boolean expressions: Y0 = ¬S · D, Y1 = S · D. Each output is the AND of D with one select-code.
DEMUXes are essential when you have a serial data stream that needs to be distributed to multiple destinations — one DEMUX, one source, many sinks. Combined with a MUX at the receiving side, you get time-division multiplexing — sharing a single channel among multiple senders/receivers by interleaving their data based on a select clock.
A 1-to-N DEMUX is also functionally identical to a decoder with enable: with the data input held high, only the selected output goes high — exactly what a decoder does.
Truth Table
Two outputs, one always 0 (the unselected one). Showing the four (S, D) combinations.
| Inputs | Output | |||
|---|---|---|---|---|
| S | D | Y0 | Y1 | |
| 0 | 0 | 0 | 0 | S=0, D=0 — Y0 active but D is 0 |
| 0 | 1 | 1 | 0 | S=0, D=1 — D routed to Y0 |
| 1 | 0 | 0 | 0 | S=1, D=0 — Y1 active but D is 0 |
| 1 | 1 | 0 | 1 | S=1, D=1 — D routed to Y1 |
Boolean Expression
Output 0 is high only when S=0 AND D=1.
Output 1 is high only when S=1 AND D=1.
Try It Step-by-Step
Set the inputs in the embed above, then read what should happen and confirm.
- 1S = 0 D = 0Expected:
Y0=0, Y1=0What you'll see: Default state — no data flowing means both outputs stay low regardless of select. - 2S = 0 D = 1Expected:
Y0=1, Y1=0What you'll see: Select=0 routes D=1 to Y0. Y1 stays inactive. - 3S = 1 D = 1Expected:
Y0=0, Y1=1What you'll see: Flip the select — now D=1 goes to Y1 instead. Y0 silences. - 4S = 1 D = 0Expected:
Y0=0, Y1=0What you'll see: S=1 selects Y1 but D=0, so the active output stays low. Both outputs low — DEMUX correctly silences Y0 and routes the inactive D to Y1.
Components Used
Real-World Applications
Memory write-back routing. Write data flows from CPU through a DEMUX that routes it to the correct memory bank or register based on the address.
TDM (time-division multiplexing). A single high-bandwidth channel carries multiple low-bandwidth streams; on the receiver side a DEMUX clocked in sync with the sender splits the streams back out.
1-of-N enable signal generation. Driving a DEMUX with a constant 1 makes it a one-hot decoder — exactly one output high, all others low. Used for chip-select fan-out and one-hot state encoding.
Channel routing in switches. Network switches use DEMUXes to direct an incoming packet to the correct outgoing port based on routing-table lookup.
Test mode signal routing. Scan-out chains in DFT (design-for-test) use DEMUXes to direct test data to the appropriate scan path.