3.3.8 · HinglishCombinational Circuits

Decoders (2 - 4, 3 - 8)

1,733 words8 min readRead in English

3.3.8 · Hardware › Combinational Circuits


The Core Idea: outputs = minterms

KYUN har output ek minterm hota hai. Variables ka minterm ek product term hota hai jo exactly ek combination ke liye hota hai. Jaise sirf tab hota hai jab . Kyunki hum chahte hain ki har output exactly ek input combination ke liye high ho, isliye har output ek minterm hi hota hai.

Scratch se derivation (2:4): Truth table likho. Hum chahte hain ki sirf row mein ho.

0 0 0 0 0 1
0 1 0 0 1 0
1 0 0 1 0 0
1 1 1 0 0 0

Har column mein ek hi 1 hai → har output ek single minterm hai → seedha padh lo. K-map simplification ki zaroorat nahi; ek decoder literally "ek gate per minterm" hota hai.


Enable input (practically zaroori cheez)

Active-high enable ke saath, har output ban jaata hai . Example: .

Figure — Decoders (2 - 4, 3 - 8)

3:8 Decoder

3:8 ko do 2:4 decoders + Enable se banana (Feynman-style construction):

  • MSB decide karta hai ki kaun sa 2:4 decoder active hoga.
  • ko dono 2:4 decoders ko feed karo.
  • Top decoder handle karta hai (outputs ): ise se enable karo.
  • Bottom decoder handle karta hai (outputs ): ise se enable karo.

Yeh kyun kaam karta hai: Kisi bhi input ke liye, exactly ek hi decoder enabled hoga (dono ek saath on nahi ho sakte kyunki aur opposite hote hain). Jo enabled hoga woh apne chaar mein se ek line pick karega. Result: poore 8 mein one-hot. Yahi hierarchical decoder trick hai aur kisi bhi size tak generalize hoti hai.


Worked Examples


Common Mistakes


Recall Feynman: 12-saal ke bacche ko samjhao

Ek light switchboard socho jisme 4 lamps hain. Tumhare paas 4 switches nahi hain — tumhare paas 2 switches hain jo ek number "on/off" code (00,01,10,11) mein dikhaate hain. Decoder ek chhoti machine hai jo woh 2-switch number padhti hai aur sirf matching lamp jalati hai. Do switches → 4 lamps. Teen switches → 8 lamps. "Enable" button ek master power button hai: ise off karo aur saare lamps bujh jaate hain chahe tum koi bhi number set karo.


Flashcards

What does an decoder do?
Ek -bit binary input ko one-hot output mein convert karta hai — output lines mein se exactly ek activate karta hai (woh wali jo input ki decimal value ke equal ho).
Why is each decoder output a minterm?
Kyunki har output exactly ek input combination ke liye 1 hona chahiye, jo ki precisely minterm ki definition hai.
2:4 decoder: write .
(fire karta hai jab ho).
3:8 decoder: which output fires for input 101?
, kyunki ; equals .
What is the role of the Enable input?
Jab disabled ho, saare outputs inactive hote hain; jab enabled ho decoder normally kaam karta hai. Expansion aur demux use bhi allow karta hai.
How do you build a 3:8 decoder from two 2:4 decoders?
ko dono ko feed karo; top ko se enable karo (lines 0–3), bottom ko se (lines 4–7).
Decoder vs encoder?
Decoder: binary→one-hot (few→many). Encoder: one-hot→binary (many→few). Yeh dono inverses hain.
How to implement with a 3:8 decoder?
Outputs ko OR karo.
A decoder with data on the Enable pin acts as what?
Ek 1-to- demultiplexer (data bit ko addressed output par route karta hai).
For active-low outputs, what does the selected line look like?
Woh 0 ho jaati hai jabki baaki saari 1 rehti hain.

Connections

  • Minterms and Maxterms — decoder outputs hi minterms hote hain.
  • Multiplexers — dual/complementary block; MUX + decoder ek common pair hai.
  • Demultiplexers — ek decoder + enable = demux.
  • Encoders — inverse operation.
  • Memory Address Decoding — real-world use: RAM rows/chips select karna.
  • Sum of Products (SOP) — decoders kisi bhi SOP ko OR gate ke saath realize karte hain.
  • 7-Segment Display Driver — numbers ko display segments mein decode karna.

Concept Map

converted by

produces

activates

each output is

AND of inputs

derived from

special case

special case

gates each output

two of these plus enable

selects which

allows

n-bit binary address

n:2^n Decoder

One-hot output

Exactly one output line

Minterm

True or complement form

Truth table

2:4 Decoder

3:8 Decoder

Enable input E

MSB A2

Build bigger decoders