61. Latches and Flip Flops-ii

Question.1

In the JK Flip-Flop circuit shown below, what is the purpose of the asynchronous S (PRESET) and R (CLEAR) inputs?

Select all correct options

JK Flip Flop with PRESET (S) and CLEAR (R)
Need Help? Refer to the Quick Guide below

In sequential circuits, the output depends on the present inputs and the previously stored state.

1-bit memory cell

  • NOT1 inverts S and NOT2 inverts R.
  • Their outputs drive two cross-coupled NAND gates, whose feedback keeps the last output state after the input returns LOW.
  • S = 1 sets Qn = 1, R = 1 resets Qn = 0, and S = R = 0 stores the previous state.
1-bit Memory Cell

SR Latch: -

An active-HIGH input IE (Input Enable) controls when the SR latch can respond.

When IE = 0, the SR latch holds its previous state regardless of S and R.

SR Latch implemented using NAND Gates
IESRQₙ₊₁Qₙ₊₁’Operation
0XXQₙQ̅ₙHold
100QₙQ̅ₙHold
11010Set
10101Reset
11111Invalid

X means don’t care

Invalid condition: When IE = 1 and S = R = 1, both outputs become HIGH, so Q and Q’ are no longer complementary. This is an invalid condition.

Clock Signal

A clock signal typically alternates periodically between logic 0 and logic 1.

It is commonly applied to a latch Enable input or to the clock input of a flip-flop.

Clock Symbol and Clock Waveforms

JK Latch: -

The JK latch removes the SR invalid input by using output feedback.

When J = K = 1, the feedback makes the stored state toggle instead of producing an invalid output.

JK Latch using NAND Gates
IEJKQₙ₊₁Operation
0XXQₙHold
100QₙHold
1010Reset
1101Set
111Qₙ’Toggle / race-around risk

Race-around condition:

In a level-triggered JK latch, J = K = 1 causes repeated toggling while the Enable/clock level remains active.

If the active clock-pulse width is greater than the propagation delay, Q can switch several times and its final state becomes uncertain.

Latches vs Flip Flops:-

  • A latch is level-triggered: it can respond throughout the active Enable level.
  • A flip-flop is edge-triggered: it updates only at the active clock edge.
FeatureLatchFlip-Flop
ActivationSignal levelSignal edge
Symbol identificationEN or IE input> clock symbol
Output changesDuring the active levelAt the active edge
Input controlENABLEClock
Main useLevel-sensitive storageEdge-triggered storage

An edge-triggered JK flip-flop solves the race-around problem because J and K are sampled only once at the active clock edge, allowing at most one toggle per edge.

Latches and Flip Flops Activation

 Active-HIGH or Positive edgeActive-LOW or Negative edge
Level-triggered latch

Active while IE = 1.

Active-high JK Latch

Active while IE = 0.

Active-low JK Latch
Edge-triggered Flip Flop

Active at 0 → 1.

Positive-edge triggered JK Flip Flop

Active at 1 → 0.

Negative-edge triggered JK Flip Flop

Latch applications

  • Temporary data storage in level-sensitive data paths.
  • Holding control or status signals while Enable is active.

Flip-flop applications

  • Registers and counters.
  • State storage in finite state machines (FSMs).

Excitation Tables

A truth table finds the output from known inputs.

An excitation table finds the inputs required for a desired output change.

SR Flip-Flop Excitation Table

QₙQₙ₊₁SRRequired action
000XRemain reset
0110Set
1001Reset
11X0Remain set

JK Flip-Flop Excitation Table

QₙQₙ₊₁JKRequired action
000XRemain reset
011XSet or toggle
10X1Reset or toggle
11X0Remain set

D Flip Flop

A D flip-flop can be formed from a JK flip-flop by connecting D directly to J and D̅ to K.

D Flip Flop Implementation using JK Flip Flop
J = D
K = D̅
Qₙ₊₁ = D

Truth Table

ClockDQₙ₊₁Operation
Active edge00Store 0
Active edge11Store 1
No active edgeXQₙHold

Excitation Table

QₙQₙ₊₁D
000
011
100
111
D = Qₙ₊₁

Applications

  • Data registers and pipeline storage.
  • One-bit data capture and building blocks for input synchronizer chains.

T Flip Flop

A T flip-flop can be formed from a JK flip-flop by connecting both J and K to T.

T Flip Flop Implementation using JK Flip Flop
J = T
K = T
Qₙ₊₁ = T ⊕ Qₙ

Truth Table

ClockTQₙ₊₁Operation
Active edge0QₙHold
Active edge1Qₙ’Toggle
Non-active edgeXQₙHold

Excitation Table

QₙQₙ₊₁T
000
011
101
110
T = Qₙ ⊕ Qₙ₊₁

Applications

  • Binary counters.
  • When T = 1, Q toggles on every active clock edge, producing a divide-by-2 output.

Asynchronous Inputs:-

The shown PRESET and CLEAR inputs are active-LOW. PRE̅ = 0 asynchronously sets Q = 1, while CLR̅ = 0 asynchronously resets Q = 0, regardless of the clock or synchronous inputs.

JK Flip Flop with PRESET and CLEAR inputs
P̅R̅E̅C̅L̅R̅QₙQ̅ₙOperation
11QₙQ̅ₙNormal clocked operation
0110Asynchronous set
1001Asynchronous clear
0011Invalid / not allowed

Flip Flop conversion:

  • To convert one flip-flop into another
  • list the target next-state behavior
  • use the available flip-flop excitation table to find its required inputs
  • simplify the input equations
  • connect the circuit accordingly

Implementing T Flip Flop from D Flip Flop

For each T-flip-flop transition, D must equal the required next state Qₙ₊₁.

TQₙQₙ₊₁Required D
0000
0111
1011
1100
D = T ⊕ Qₙ
Implementation of T Flip Flop from D Flip Flop

Flip-Flop Conversion Table

Target Flip FlopAvailable Flip FlopRequired connections
DSRS = D, R = D̅
DJKJ = D, K = D̅
DTT = D ⊕ Qₙ
TSRS = T · Q̅ₙ, R = T · Qₙ
TJKJ = T, K = T
TDD = T ⊕ Qₙ
JKSRS = J · Q̅ₙ, R = K · Qₙ
JKTT = J · Q̅ₙ + K · Qₙ
JKDD = J · Q̅ₙ + K̅ · Qₙ
SRDD = S + R̅ · Qₙ
SRJKJ = S, K = R
SRTT = S · Q̅ₙ + R · Qₙ

For conversions targeting an SR flip-flop, S = R = 1 remains prohibited.

Controlled D/T Flip Flop with inputs I and CNT

The JK input connections are J = I and K = I ⊕ CNT.

  • When CNT = 0, the circuit behaves as a T flip-flop with T = I.
  • When CNT = 1, it behaves as a D flip-flop with D = I.
Controlled D/T Flip Flop
J = I
K = I ⊕ CNT

Truth Table

CNTIQₙQₙ₊₁Operation
0000T mode: hold
0011T mode: hold
0101T mode: toggle
0110T mode: toggle
1000D mode: store 0
1010D mode: store 0
1101D mode: store 1
1111D mode: store 1

Excitation Table

CNTQₙQₙ₊₁Required IBehavior of I
0000T Behavior
0011T Behavior
0101T Behavior
0110T Behavior
1000D Behavior
1011D Behavior
1100D Behavior
1111D Behavior
I = CNT · Qₙ₊₁ + C̅N̅T̅ · (Qₙ ⊕ Qₙ₊₁)

JK Master Slave Flip Flop

A JK master-slave flip-flop uses two stages connected as Master → Slave.

  • The master captures J and K during one clock level
  • slave transfers the master state to Qn during the inverted clock level.
JK Master Slave Flip Flop

The Master and Slave operate on opposite clock levels, so only one stage is active at a time. This prevents the race-around condition.

  • Clock = 1: Master active, Slave holds.
  • Clock = 0: Master holds, Slave updates Qn.
  • Qn and Qn' are fed back to the Master input logic for JK operation.

Therefore, only one output change occurs per clock pulse, preventing race-around.

JKQₙ₊₁Operation
00QₙHold
010Reset
101Set
11Q̅ₙToggle

Select Multiple Options

Restart quiz!