Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

Unit 2 — Sequential Circuits and Latches

Lesson 20 of 49 in the free Computer Organization and Architecture notes on Siksha Sarovar, written by Rohit Jangra.

From Combinational to Sequential

Add a feedback path to a combinational circuit and something new appears: the output now depends on its own previous value. The circuit remembers.

LatchFlip-Flop
TriggeringLevel sensitive (transparent while enabled)Edge sensitive (samples at the transition)
ClockEnable / no clockClock required
Output during active periodFollows the input continuouslyChanges only at the edge
Speed / areaFaster, smallerSlower, larger
Design useAsynchronous designs, temporary storageSynchronous designs (almost all modern logic)

1. SR Latch with NOR Gates

   Two cross-coupled NOR gates:

      Q   = (R + Q')'
      Q'  = (S + Q )'

   S = SET input, R = RESET input.
SRQ(next)State name
00Q (no change)Hold — memory!
010Reset
101Set
11?Invalid / forbidden
   Why S = R = 1 is forbidden (NOR version):
      Both outputs are forced to 0, so Q = Q' = 0 — a contradiction.
      Worse, when both inputs return to 0 simultaneously, the final state
      depends on which gate is faster -> a RACE CONDITION with an
      unpredictable result.

2. SR Latch with NAND Gates (S'R' latch)

   Two cross-coupled NAND gates, ACTIVE LOW inputs:

      Q  = (S' . Q')'
      Q' = (R' . Q )'
S'R'Q(next)State
00?Invalid
011Set
100Reset
11QHold

Note the inversion: for the NOR latch the forbidden combination is 11 and the hold combination is 00; for the NAND latch it is the opposite.

3. Gated (Clocked) SR Latch

Add an enable/clock so the latch only responds when permitted:

   S(internal) = S . EN
   R(internal) = R . EN

   EN = 0  ->  latch HOLDS regardless of S and R
   EN = 1  ->  latch behaves as an ordinary SR latch (transparent)

4. D Latch — eliminating the forbidden state

Tie R = S' so the two inputs can never both be 1:

   D latch:   S = D,  R = D'

   EN = 1  ->  Q follows D           (TRANSPARENT)
   EN = 0  ->  Q holds the last D    (LATCHED / OPAQUE)
ENDQ(next)
0XQ (hold)
100
111

The D latch is the standard 1-bit storage cell — this is what a static RAM bit and a register bit are built from.

5. Characteristic Table, Equation and Excitation Table

Three tables describe every storage element. Learn the difference — examiners test it.

TableQuestion it answersDirection
Characteristic tableGiven the inputs and present state, what is the next state?inputs → next state
Characteristic equationThe same relationship as a Boolean formulainputs → next state
Excitation tableGiven the required state transition, what inputs are needed?required transition → inputs

SR latch

   Characteristic equation:   Q(next) = S + R'.Q        with the constraint S.R = 0

Excitation table (SR):

Q → Q(next)SR
0 → 00X
0 → 110
1 → 001
1 → 1X0

D latch

   Characteristic equation:   Q(next) = D

Excitation table (D): trivially, D = Q(next).

6. Timing Parameters

ParameterMeaning
Setup time (t_su)Data must be stable before the active clock edge
Hold time (t_h)Data must remain stable after the active clock edge
Propagation delay (t_pd)Clock edge to valid output
MetastabilityIf setup/hold is violated, the output can hover between 0 and 1 for an unbounded time
   Maximum clock frequency of a synchronous circuit:

      T(min) = t_pd(FF) + t_pd(combinational logic) + t_su
      f(max) = 1 / T(min)

   Example: t_pd(FF) = 2 ns, logic = 5 ns, t_su = 1 ns
      T(min) = 8 ns  ->  f(max) = 125 MHz

7. The Transparency Problem

   While EN = 1, a level-sensitive latch is TRANSPARENT:
   any change on D passes straight through to Q.

   In a circuit where Q feeds back into the logic that computes D,
   the new Q can race around the loop and change D again within the
   SAME enable pulse -> multiple unwanted state changes.

This is the root cause of the race around condition you will meet with the JK flip-flop, and the reason edge-triggered flip-flops exist. The next lessons build them.

Summary

ElementInputsForbidden stateCharacteristic equation
SR latch (NOR)S, RS = R = 1Q(n) = S + R'Q
SR latch (NAND)S', R'S' = R' = 0same with active-low inputs
Gated SR latchS, R, ENS = R = 1 while EN = 1Q(n) = S·EN + (R·EN)'·Q
D latchD, ENnoneQ(n) = D (while EN = 1)