WHY does it exist? In real hardware you often have one shared signal (a serial data stream, a bus line, a clock) and you must deliver it to one selected destination — a specific register, memory row, or peripheral. The DEMUX is the physical "address decoder + gate" that does this.
Take the simplest useful case: a 1-to-2 DEMUX (n=1, one select line S).
Step 1 — What do we want?
If S=0: send D to Y0, force Y1=0.
If S=1: send D to Y1, force Y0=0.
Why this step? We list the desired behaviour before touching gates — this is the truth table, our contract.
S
D
Y0
Y1
0
0
0
0
0
1
1
0
1
0
0
0
1
1
0
1
Step 2 — Read the logic straight off the table.Y0 is 1 only when S=0 AND D=1. Y1 is 1 only when S=1 AND D=1.
Y0=SDY1=SD
Why this step? Each output is an AND of the data with the correct combination of select lines — exactly D gated by the "am I the chosen one?" condition.
Step 3 — Generalise to 2n outputs.
Each output Yk fires only when the select lines spell the number k in binary. Let mk be that select-decode term (a minterm of the select lines). Then:
Imagine a train station with ONE incoming track and 8 platforms. A signalman looks at a number card (the select lines) and flips a switch so the incoming train rolls onto exactly the platform matching that number. All the other platforms stay empty. The train itself is your data bit — if no train comes (data = 0), even the chosen platform is empty. That signalman is the demultiplexer: one input, many outputs, and a "number card" that picks the destination.
Demultiplexer ko simple tarike se samjho: ye ek "router" hai jiske paas sirf EK data input hota hai, lekin bahut saare outputs (2n) hote hain. Kaunse output pe data jaayega, ye decide karte hain select lines. Jaise ek railway signalman ek number card dekhta hai aur incoming train ko usi platform pe bhej deta hai — baaki platforms khaali reh jaate hain. Wahi kaam DEMUX karta hai.
Formula bilkul seedha derive hota hai. Har output Yk tabhi ON hota hai jab select lines exactly k ka binary code banayein AND data D=1 ho. Isliye Yk=D⋅mk, jahan mk select lines ka minterm hai. Agar D=0 ho, to chosen output bhi 0 rahega — DEMUX apni marzi se 1 nahi banata, bas data ko faithfully aage bhejta hai.
Ek important connection yaad rakho: agar tum D=1 permanently laga do, to DEMUX bilkul ek decoder ban jaata hai. Yani same hardware, thoda alag use. Aur DEMUX bilkul MUX ka ulta hai — MUX many-in one-out karta hai, DEMUX one-in many-out.
Exam me sabse common galti: log soch lete hain ke n select lines matlab n outputs. Nahi! n select lines matlab 2n outputs (3 selects → 8 outputs). Aur select bits ko decimal me convert karna mat bhoolna — S1S0=10 ka matlab decimal 2, isliye Y2 active hoga.