SR latch operation
3.4.1· Hardware › Sequential Circuits
WHY ek latch exist karta hai?
Set–Reset latch do control inputs ke saath sabse simple aisa loop hai:
- S (Set) → output force karo.
- R (Reset) → output force karo.
WHAT hai structure? (NOR version)

Wiring (NOR version):
Ise aise padho: ", aur dusre output ka NOR hai; , aur ka NOR hai."
HOW behave karta hai? — truth table scratch se derive karna
Hum har row NOR rule se derive karte hain: NOR output 1 tabhi hota hai jab DONO inputs 0 hon.
Case 1: Hold ()
Maano abhi hai.
- ✓ (1 rehta hai)
- ✓ (0 rehta hai)
Yeh step kyun? Dono equations wahi values reproduce karti hain jo humne assume ki thi → state self-consistent hai = stable. Yeh ke liye bhi utna hi valid hai. Toh ⇒ keep previous value (yeh hai memory).
Case 2: Set ()
- .
- Phir .
Yeh step kyun? Kisi bhi NOR input par 1 us gate ke output ko 0 force karta hai. Toh , force karta hai, jo phir dusre gate ko output karne deta hai. Result: ==== (Set).
Case 3: Reset ()
- .
- Phir .
Yeh step kyun? Set ke symmetric: , force karta hai. Result: ==== (Reset).
Case 4: Forbidden ()
- aur .
Yeh step kyun? Dono outputs ek saath 0 ban jaate hain, toh aur ab complementary nahi hain — naming violate ho gayi. Isse bhi bura: agar aur phir ek hi waqt par drop kar jaayein, toh dono gates high jaane ki koshish karte hain, aur final state chhoti timing/gate-delay differences par depend karti hai → unpredictable / metastable. Isliye forbidden / invalid.
Characteristic equation derive karna
Hum ko ke function ke roop mein teen legal rows ke liye chahte hain:
"Set hone par 1 force karo; purani value rakho agar Reset nahi ho raha" se milta hai: Constraint sirf woh promise hai ki Set aur Reset ek saath press nahi karoge.
NAND version (active-LOW )
NAND rule: output 0 tabhi hota hai jab DONO inputs 1 hon (matlab output 1 hota hai agar koi bhi input 0 ho).
Inverted kyun? NAND ke saath 0 input high force hota hai, toh 0 active value hai. Sab kuch NOR latch ka logical dual hai — same behavior, inputs par 0 aur 1 ke roles swap hain.
Worked example: timing sequence trace karna (NOR latch)
Time ke saath inputs (har step mein, phir ), unknown se start karke, power up karte hain aur drive karte hain:
| step | S | R | action | Q |
|---|---|---|---|---|
| 0 | 0 | 1 | Reset | 0 |
| 1 | 0 | 0 | Hold | 0 |
| 2 | 1 | 0 | Set | 1 |
| 3 | 0 | 0 | Hold | 1 |
| 4 | 0 | 1 | Reset | 0 |
Step 1 kyun? Reset ke baad, . ke saath, Hold rule reproduce karta hai → toh 0 rehta hai bhaale koi input active na ho. Woh "sticking" bilkul wahi memory hai. Step 3 kyun? Set ke baad, ; Hold use par rakhta hai. Latch ne us Set ko yaad rakkha jo ek step pehle hua tha — proof hai ki woh ek bit store karta hai.
Recall Feynman: 12 saal ke bacche ko samjhao
Socho do bacche ek rope pakde hain, har ek doosre ko khada rakhne ke liye peechhe jhuk raha hai. Woh balance left jhuk sakta hai (use 1 kaho) ya right (use 0 kaho), aur ek baar jhukne ke baad woh khud-ba-khud jhuka rehta hai — yeh yaad rakhna hai. S button use left jhukne ke liye dhakka deta hai (1). R button use right jhukne ke liye dhakka deta hai (0). Agar tum kuch nahi dabate, woh waisi hi side jhuka rehta hai jaise pehle tha. Agar tum dono buttons ek saath dabate ho, dono bacche gir jaate hain aur koi nahi jaanta pehle kaun uthega — yeh woh "forbidden" move hai jo tumhe karna hi nahi chahiye.
Active recall
An SR latch is built from which cross-coupled gates (two variants)?
Why can a latch store a bit while a plain gate cannot?
NOR SR latch: what does S=0, R=0 do?
NOR SR latch: what does S=1, R=0 do?
NOR SR latch: what does S=0, R=1 do?
NOR SR latch: why is S=1, R=1 forbidden?
State the characteristic equation of an SR latch.
For a NAND (active-LOW) SR latch, which input combination is Hold?
For a NAND SR latch, which combination is forbidden?
In the NOR latch, what does a logic 1 on any NOR input do?
What is metastability in an SR latch?
Connections
- Cross-coupled gates — woh general feedback trick jo saare latches ke peeche hai.
- Gated SR latch — ek enable add karta hai taaki inputs tabhi matter karein jab gate high ho.
- D latch — forbidden state hataata hai tie karke.
- JK flip-flop — SR ke forbidden ko fix karta hai use toggle banaakar.
- Flip-flop vs latch — level-triggered (latch) vs edge-triggered (flip-flop).
- Metastability — deeper reason kyun dangerous hai.
- NOR gate / NAND gate — primitive building blocks.