Latches and Flip-Flops Quick Reference Guide

Sequential Circuits
A sequential circuit is a digital circuit whose output depends on:
- Current input
- Previously stored value
Unlike a combinational circuit, it can remember past information.
General relation:
Next State = Function of Present-State Inputs and Previous-State Inputs
SR Latch
1-Bit Memory Cell - A 1-bit memory cell stores one binary value: either 0 or 1.
An SR latch is a basic 1-bit memory cell with two inputs Set (S) and Reset (R).
It has two outputs: Q (Stored Output) and ~Q (Inverted Output)
Note: Q ≠ ~Q.
Fig. 1: SR Latch using two NAND and two NOT Gates
Table 1: SR Latch Truth Table and Logic Flow
| S | R | Q (next) | ~Q (next) | Operation |
|---|---|---|---|---|
| 0 | 0 | Q | ~Q | Hold |
| 1 | 0 | 1 | 0 | Set |
| 0 | 1 | 0 | 1 | Reset |
| 1 | 1 | 1 | 1 | Invalid |
Logic Flow
Set: S = 1, R = 0
- NOT1 produces
0. - A
0at NAND1 forcesQ = 1. - Q =
1and NOT2 =1make~Q = 0.
Reset: S = 0, R = 1
- NOT2 produces
0. - A
0at NAND2 forces~Q = 1. ~Q = 1and NOT1 =1make Q =0.
Hold: S = 0, R = 0
Both NOT outputs are 1. The feedback keeps the previously stored value.
Invalid: S = 1, R = 1
Both NOT outputs become 0, forcing both NAND outputs HIGH. Therefore, Q and ~Q are no longer opposite.
ENABLE Input
Purpose
The ENABLE input controls when an SR latch is allowed to respond to S and R.
A clock signal can be connected to ENABLE:
EN = 0: Input changes are blocked.EN = 1: Input changes are accepted.
Enabled SR Latch
The inputs are first combined with ENABLE:
Sg = S · EN
Rg = R · ENThese signals are then applied to the SR latch.
Another 2 NAND Gates are used for S and R with common input EN.
Fig. 2: SR Latch circuit using NAND with ENABLE input

Working
When EN = 0
Sg = 0 and Rg = 0 for all input combinations. The latch holds its previous value.
When EN = 1
Sg = S and Rg = R. The latch performs Set, Reset, Hold, or Invalid operation.
Table 2: Enabled SR Latch Truth Table
| EN | S | R | Q(next) | Operation |
|---|---|---|---|---|
| 0 | X | X | Q | Hold |
| 1 | 0 | 0 | Q | Hold |
| 1 | 1 | 0 | 1 | Set |
| 1 | 0 | 1 | 0 | Reset |
| 1 | 1 | 1 | Invalid | Invalid |
“X” means the input value does not matter.
JK Latch
Purpose
The JK latch improves the SR latch by removing the invalid input combination.
- J works like Set.
- K works like Reset.
- When
J = K = 1, the stored output toggles.
Fig. 3: JK Latch circuit using NAND Gate

Advantages Over SR Latch
- The combination
J = K = 1is valid. - It can toggle the stored output.
- It is useful in counters and switching circuits.
Table 3: JK Latch Truth Table
| J | K | Q(next) | Operation |
|---|---|---|---|
| 0 | 0 | Q | Hold |
| 0 | 1 | 0 | Reset |
| 1 | 0 | 1 | Set |
| 1 | 1 | ~Q | Toggle |
Race-Around Condition
Race-around occurs when:
J = K = 1- The latch is enabled for too long
- Output feedback remains active during the enabled period
When Q toggles, its new value is fed back to the input gates. If ENABLE is still active, the output toggles again. This can happen several times during one clock pulse.
The final output becomes uncertain.
Solutions
- Use a shorter clock pulse.
- Use edge-triggered operation.
- Use a master-slave arrangement.
Latches vs Flip-Flops
Table 4: Latch and Flip-Flop Comparison
| Feature | Latch | Flip-Flop |
|---|---|---|
| Activation | Signal level | Signal edge |
| Symbol identification | EN or E input | > clock symbol |
| Output changes | During the active level | Only at the active edge |
| Input control | ENABLE | Clock |
| Speed | Generally faster | Generally slower |
| Main use | Temporary storage | Synchronous storage |
Level and Edge Activation
Table 5: Activation Types
| Active-HIGH or Positive | Active-LOW or Negative | |
|---|---|---|
| Level-triggered | Definition: Active while the signal is HIGH. Working: The output can change while EN = 1. Notation: EN input without a bubble. ![]() | Definition: Active while the signal is LOW. Working: The output can change while EN = 0. Notation: EN input with a bubble. ![]() |
| Edge-triggered | Definition: Active only during a rising edge. Working: The output changes at Notation: > without a bubble. ![]() | Definition: Active only during a falling edge. Working: The output changes at Notation: > with a bubble. ![]() |
Single-Input Flip-Flops
D and T flip-flops use only one main input. They can be created using a JK flip-flop.
D Flip-Flop Using JK
Definition
A D or Data flip-flop stores the value available at input D during the active clock edge.
Its next output is:
Q(next) = DConnections
J = D
K = ~DFig. 4: D Flip Flop using JK Flip Flop

Working
When D = 0
J = 0K = 1- The JK device performs Reset.
Q(next) = 0
When D = 1
J = 1K = 0- The JK device performs Set.
Q(next) = 1
Table 6: D Flip-Flop Truth Table
| D | J | K | Q(next) | JK Operation |
|---|---|---|---|---|
| 0 | 0 | 1 | 0 | Reset |
| 1 | 1 | 0 | 1 | Set |
T Flip-Flop Using JK
Definition
A T or Toggle flip-flop changes its output when T = 1.
Its next output is:
Q(next) = T ⊕ QConnections
J = T
K = TFig. 5: T Flip Flop using JK Flip Flop

Working
When T = 0
J = 0K = 0- The JK device performs Hold.
- The output does not change.
When T = 1
J = 1K = 1- The JK device performs Toggle.
- The output changes to its opposite value.
Table 7: T Flip-Flop Truth Table
| T | J | K | Q(next) | JK Operation |
|---|---|---|---|---|
| 0 | 0 | 0 | Q | Hold |
| 1 | 1 | 1 | ~Q | Toggle |
D Flip Flop and T Flip Flop Comparison
Table 8: D and T Flip-Flop Comparison
| Feature | D Flip-Flop | T Flip-Flop |
|---|---|---|
| Main input | D | T |
| JK connections | J = D, K = ~D | J = T, K = T |
| Next-state equation | Q(next) = D | Q(next) = T ⊕ Q |
| Input 0 | Reset to 0 | Hold |
| Input 1 | Set to 1 | Toggle |
| JK operation | Reset or Set | Hold or Toggle |
| Main applications | Registers, data storage, delay circuits | Counters, frequency division, toggle control |
Excitation Tables
Basic Idea
An excitation table gives the input required to move from the present output to a required next output.
For example, it answers:
“What input should be applied to change Q = 0 into Q(next) = 1?”
Truth Table vs Excitation Table
- A truth table finds the next output from the inputs.
- An excitation table finds the required inputs from the desired output change.
Uses
Excitation tables are used for:
- Counter design
- State-machine design
- Sequential circuit design
- Flip-flop conversion
Excitation Table of SR, JK, D, T
Table 9: Excitation Tables of SR, JK, D and T Flip Flops
| Q | Q(next) | S | R | J | K | D | T |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | X | 0 | X | 0 | 0 |
| 0 | 1 | 1 | 0 | 1 | X | 1 | 1 |
| 1 | 0 | 0 | 1 | X | 1 | 0 | 1 |
| 1 | 1 | X | 0 | X | 0 | 1 | 0 |
X means either 0 or 1 can be used.
PRESET and CLEAR
Definition
PRESET and CLEAR are direct control inputs used to force the output into a known state.
They work without waiting for the clock. Therefore, they are called asynchronous inputs.
- PRESET forces
Q = 1. - CLEAR forces
Q = 0.
Active-LOW Inputs
Active-LOW inputs are written as:
~PRE~CLR
The input becomes active when its value is 0.
Fig. 6: JK Flip Flop with PRESET (S) and CLEAR (R) inputs

Table 10: Active-LOW PRESET and CLEAR Operation
| ~PRE | ~CLR | Q | Operation |
|---|---|---|---|
| 0 | 1 | 1 | Preset |
| 1 | 0 | 0 | Clear |
| 1 | 1 | Normal | Clock-controlled operation |
| 0 | 0 | Invalid | Prohibited |
Benefits
- Starts a circuit from a known value.
- Clears counters and registers quickly.
- Initializes the circuit during power-up.
- Works even when the clock is stopped.
- Provides direct emergency control.
Flip-Flop Conversions
Conversion Method
One flip-flop can be made to behave like another by adding combinational logic to its inputs.
General method:
- Write the truth table of the required flip-flop (inputs and present state).
- Find the required next state Q(next) from input and present state.
- Use the excitation table of the available flip-flop.
- Find the required input equation.
- Connect the logic circuit to the available flip-flop.
In this guide:
X to Y means implement Y behaviour using X flip-flop.
T to D Conversion
The required circuit must behave like a D flip-flop, but the available device is a T flip-flop.
Step 1: D Flip-Flop Behaviour
Q(next) = DStep 2: T Flip-Flop Excitation
A T flip-flop:
- Holds when
T = 0 - Toggles when
T = 1
Table 11: D to T Conversion Table
| D | Q | Required Q(next) | Required T |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 0 |
Step 3: Input Equation
From the table:
T = D ⊕ QStep 4: Circuit
Connect D and the present output Q to an XOR gate. Connect the XOR output to the T input.
Fig. 7: Implementation of D Flip Flop using T Flip Flop

Other Flip-Flop Conversions
Table 12: Conversion Equations
| Conversion | Available Device | Required Connections |
|---|---|---|
| SR to JK | SR | S = J.(~Q), R = K.Q |
| D to JK | D | D = J.(~Q) + K.Q |
| T to JK | T | T = J.(~Q) + K.Q |
| T to D | T | T = D ⊕ Q |
| D to T | D | D = T ⊕ Q |
| Controlled D/T | JK | J = I, K = I ⊕ CNT |
CNT-Controlled D/T Using JK
Inputs: I, CNT.
Connections:
J = I
K = I ⊕ CNTFig. 8: Controlled D/T Flip Flop

Table 13: Controlled D/T Operation
| CNT | J | K | Behaviour |
|---|---|---|---|
| 0 | I | I | T operation |
| 1 | I | ~I | D operation |
CNT = 0: The output holds or toggles according toI.CNT = 1: The output stores the value ofI.
JK Master-Slave Flip-Flop
Structure
A JK master-slave flip-flop contains two connected stages:
- Master latch
- Slave latch
The master and slave operate during opposite clock levels.
Fig. 9: JK Master Slave Flip Flop Circuit

Working
- When
CLK = 1, the master readsJandK. - During this time, the slave remains disabled.
- When
CLKchanges to0, the master becomes disabled. - The slave reads the stored master output.
- The final output changes only once during one clock cycle.
- Input changes cannot directly reach the output while both stages are operating separately.
Table 14: JK Master-Slave Truth Table
| J | K | Q(next) | Operation |
|---|---|---|---|
| 0 | 0 | Q | Hold |
| 0 | 1 | 0 | Reset |
| 1 | 0 | 1 | Set |
| 1 | 1 | ~Q | Toggle |
Advantages
- Prevents race-around.
- Produces only one output change per clock cycle.
- Gives stable and predictable output.
- Separates input reading from output updating.
Disadvantages
- Uses more gates.
- Requires more circuit area.
- Has a larger propagation delay.
- Consumes more power than a simple latch.
Concept understood? Let's apply and learn for real



