WHY each output is a minterm. A minterm of variables A,B is a product term that is 1 for exactly one combination. E.g. AˉB is 1 only when A=0,B=1. Since we want each output high for exactly one input combination, each output is a minterm.
Derivation from scratch (2:4): Write the truth table. We want Dk=1 only in row k.
A1
A0
D3
D2
D1
D0
0
0
0
0
0
1
0
1
0
0
1
0
1
0
0
1
0
0
1
1
1
0
0
0
Each column has a single 1 → each output is a single minterm → read it straight off. No K-map simplification needed; a decoder is literally "one gate per minterm".
Building 3:8 from two 2:4 decoders + Enable (Feynman-style construction):
The MSB A2 chooses which 2:4 decoder is active.
Feed A1A0 to both 2:4 decoders.
Top decoder handles A2=0 (outputs D0..D3): enable it with E=A2.
Bottom decoder handles A2=1 (outputs D4..D7): enable it with E=A2.
Why this works: For any input, exactly one of the two decoders is enabled (they can't both be on since A2 and A2 are opposite). The enabled one picks one line among its four. Result: one-hot over all 8. This is the hierarchical decoder trick and generalizes to any size.
Imagine a light switchboard with 4 lamps. You don't have 4 switches — you have 2 switches showing a number in "on/off" code (00,01,10,11). The decoder is a little machine that reads that 2-switch number and turns on only the matching lamp. Two switches → 4 lamps. Three switches → 8 lamps. The "Enable" button is a master power button: press it off and all lamps go dark no matter what number you set.
Dekho, decoder ek chhota sa "address se line select karne wala" circuit hai. Aap use binary number dete ho (jaise 2 input bits), aur woh sirf ek output line ko high (1) karta hai — wahi line jiska number aapke input ke barabar hai. Isko one-hot output kehte hain, matlab ek hi "hot" (on) hota hai, baaki sab off. 2 input hain to 22=4 output, 3 input hain to 23=8 output. Simple formula: n input → 2n output.
Har output basically ek minterm hota hai — matlab inputs ka AND, kuch ko complement (bar) karke. Jaise 2:4 me D2=A1⋅A0, kyunki 2=10 binary me. Truth table banao, har column me sirf ek jagah 1 hoga, wahi minterm padh lo — koi K-map simplification ki zaroorat nahi.
Enable (E) input bahut kaam ka hai: E=0 karo to poora decoder so jaata hai (saare output 0). E=1 pe normal chalta hai. Iska sabse bada fayda — chote decoders se bade banane me. Jaise do 2:4 decoder lo, dono ko A1A0 do, upar wale ko A2 se enable karo (lines 0–3), neeche wale ko A2 se (lines 4–7) — ban gaya 3:8 decoder! Aur agar Enable pin pe data daal do to yehi decoder demultiplexer ban jaata hai.
Yaad rakho: decoder aur encoder ulte hain. Decoder = binary in, one-hot out (thode se zyada). Encoder = one-hot in, binary out. Real life me memory ke rows select karne, 7-segment display, aur kisi bhi SOP function ko banane me decoder + OR gate use hota hai. Bas MSB/LSB galat mat karna, warna wrong line select ho jayegi!