Quiz 2

Sequential Circuits — Latches, Flip-Flops, Counters

398 words
2 min read
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

# Sequential Circuits — Latches, Flip-Flops, Counters ## 🎯 Learning Objectives - Differentiate between latch and flip-flop - Design circuits using SR, D, JK, and T flip-flops - Build synchronous counters and shift registers - Analyze timing diagrams of sequential circuits * * * ## 1. Latches vs Flip-Flops Aspect La...

Sequential Circuits — Latches, Flip-Flops, Counters

🎯 Learning Objectives

  • Differentiate between latch and flip-flop
  • Design circuits using SR, D, JK, and T flip-flops
  • Build synchronous counters and shift registers
  • Analyze timing diagrams of sequential circuits

1. Latches vs Flip-Flops

AspectLatchFlip-Flop
TriggerLevel-sensitiveEdge-triggered
TransparencyTransparent when enabledOutput only at edge
UsageTiming elements, registersSynchronous design
ComplexitySimpleMore complex

1.1 SR Latch (NOR implementation)

(Diagram)
SRQ¬QState
00Q¬QHold
0101Reset
1010Set
11Invalid

1.2 D Flip-Flop (Edge-Triggered)

(Diagram)
CLK ↑DQ
Rising00
Rising11
OtherHold
Characteristic equation: Qnext=DQ_{next} = D

2. Flip-Flop Types

TypeInput(s)EquationApplication
SRS, RQnext=S+RQQ_{next} = S + R'QBasic storage
DDQnext=DQ_{next} = DRegisters, latches
JKJ, KQnext=JQ+KQQ_{next} = JQ' + K'QCounters
TTQnext=QTQ_{next} = Q \oplus TToggle, counters

3. Counters

3.1 3-Bit Synchronous Up Counter

(Diagram)
ClockQ₂Q₁Q₀Value
00000
10011
20102
30113
41004
51015
61106
71117
80000

4. 📝 Practice Questions

Q1: What is the difference between a latch and a flip-flop?
Answer: A latch is level-sensitive (transparent while clock is high/low). A flip-flop is edge-triggered (samples input only at rising/falling edge). Flip-flops are preferred in synchronous designs because they eliminate transparency windows. Q2: Design a 4-bit synchronous down counter using T flip-flops.
Answer: Same structure as up counter but use Q' outputs to drive T inputs, or use D flip-flops with Q_next = Q - 1 logic. Q3: How many flip-flops are needed for a counter that counts to 100?
Answer: Need to count 0-99 (100 states). Need ceil(log₂(100)) = 7 flip-flops (128 states, 28 unused). Q4: What happens when both S and R are 1 in an SR latch?
Answer: This is an invalid state. Both outputs Q and ¬Q become 0, violating the complement relationship. When S and R return to 0, the state is indeterminate (depends on which gate responds faster). This race condition is why SR latches are avoided in many designs. Q5: Convert a D flip-flop to a T flip-flop.
Answer: Connect D = Q ⊕ T. When T=0: D=Q (hold). When T=1: D=¬Q (toggle). Adding an XOR gate between T and Q drives the D input.

5. 🔗 Cross-References

Document outline

Keep your place and jump directly to a heading.

Table of Contents
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.