Welcome slide. Presenter: Faiza Jamil begins the presentation.
Faiza JamilBDA-25F-055Introduction to Latches
01
Introduction to Latches
◈ A latch is a temporary storage device
◈ Stores 1 bit of data
◈ Has two stable states — bistable
◈ It is a sequential circuit
◈ Output depends on:
Present input
Previous stored value
Definition
"A latch is a basic memory device used in digital electronics."
State 0
⇌
State 1
Good morning everyone. Today our topic is Latches in Digital Logic Design. A latch is a temporary memory device used to store one bit of data. It is called a bistable device because it has two stable states, either 0 or 1. Latches are sequential circuits because their output depends on both current input and previous stored value.
Faiza JamilBDA-25F-055Introduction to Latches
02
Why We Use Latches
💾
Temporary Data Storage
Hold data for short durations during processing
🔄
Holding Previous Values
Remember last state even after input changes
⚡
Synchronization
Align data flow between circuit stages
🧠
Memory Systems
Building blocks of RAM and registers
📦
Data Buffering
Smooth data transfer between components
Main Purpose
To remember data temporarily
We use latches because digital systems need memory elements. Latches store data temporarily and help circuits remember information even after input changes.
Faiza JamilBDA-25F-055Introduction to Latches
03
Types & Characteristics
Types of Latches
SR SR Latch — Set Reset
GSR Gated SR Latch
D D Latch — Data Latch
JK JK Latch
T T Latch — Toggle
Characteristics
Sequential circuit
Level triggered
Fast operation
Simple design
There are different types of latches used in digital systems. Each type performs a different function. Latches are simple and fast memory devices used in many electronic circuits.
Hashir Ahmed HashmiBDA-25F-048SR Latch
04
SR Latch
Set-Reset Latch
Inputs
SSet — forces output to 1
RReset — forces output to 0
Outputs
QNormal output
Q̄Complement output
SR Latch (NOR-based)
SR latch is the simplest type of latch. SR stands for Set and Reset. It has two inputs called Set and Reset and two outputs called Q and Q bar.
Hashir Ahmed HashmiBDA-25F-048SR Latch
05
Working of SR Latch
SET Condition
S=1, R=0 → Q=1
Output is forced HIGH
RESET Condition
S=0, R=1 → Q=0
Output is forced LOW
NO CHANGE
S=0, R=0 → Q=Q
Previous value is retained
⚠ INVALID
S=1, R=1 → Undefined
Forbidden state — avoid!
When Set is 1, output becomes 1. When Reset is 1, output becomes 0. If both inputs are 0, previous value remains stored. If both inputs become 1, the state becomes invalid.
Hashir Ahmed HashmiBDA-25F-048SR Latch
06
SR Latch — Truth Table
S
R
Q (next)
Condition
0
0
No Change
Hold
0
1
0
Reset
1
0
1
Set
1
1
Invalid
⚠ Forbidden
This truth table explains the operation of SR latch under different input conditions.
Hashir Ahmed HashmiBDA-25F-048SR Latch
07
SR Latch — Timing Diagram
This waveform shows how output changes according to Set and Reset inputs over time.
Asbah KhanBDA-25F-034Gated SR Latch
08
Gated SR Latch
◈ Has an additional Enable (EN) input
◈EN = 1 → Latch is Active
◈EN = 0 → Stores previous value
◈ Provides control over when latch responds
◈ More reliable than basic SR latch
✦ Improvement over basic SR Latch
Gated SR Latch
A gated SR latch is an improved SR latch that works only when Enable is active.
Asbah KhanBDA-25F-034Gated SR Latch
09
Gated SR Latch — Truth Table
EN
S
R
Q (next)
Condition
0
X
X
No Change
Disabled
1
0
0
No Change
Hold
1
0
1
0
Reset
1
1
0
1
Set
1
1
1
Invalid
⚠ Forbidden
EN = 0 → Latch is disabled, stores previous value regardless of S and R
When Enable is OFF, the latch stores previous data. When Enable is ON, it follows Set and Reset inputs.
Asbah KhanBDA-25F-034Gated SR Latch
10
Applications of Latches
🖥️
Registers
Temporary data storage inside CPUs
⚙️
CPUs
Processor pipeline and control logic
💽
Memory Systems
SRAM cells and cache memory
📊
Data Storage
Holding bits during computation
🎛️
Control Systems
State machines and controllers
Latches are used in computers, processors, memory circuits, and many digital systems.
MustafaBDA-25F-029D Latch
11
D Latch
Data Latch
Inputs
DData — the bit to store
ENEnable — activates the latch
Outputs
QNormal output
Q̄Complement output
✦ Eliminates the invalid state of SR Latch
Key Purpose
The D latch solves the forbidden state problem of SR latch by ensuring S and R are always complementary.
S = D R = D̄
D latch is an improved version of SR latch that removes the invalid condition.
MustafaBDA-25F-029D Latch
12
Construction of D Latch
Built Using
1 SR Latch (core memory)
2 NOT Gate (creates complement)
3 AND Gates (enable control)
S =D
R =D̄ (NOT D)
S and R are always opposite → no invalid state
D Latch Circuit
The D latch is built using SR latch and logic gates. The NOT gate creates complement input automatically.
MustafaBDA-25F-029D Latch
13
D Latch — Inputs & Outputs
Signal
Type
Meaning
Role
D
INPUT
Data Input
The bit value to be stored
EN
INPUT
Enable
Controls when latch is active
Q
OUTPUT
Normal Output
Stored bit value
Q̄
OUTPUT
Complement Output
Inverted stored value
These are the inputs and outputs of D latch.
MustafaBDA-25F-029D Latch
14
Working of D Latch
EN = 1 (Active)
Q = D
Output follows the Data input. Whatever D is, Q becomes the same.
D = 0→Q = 0
D = 1→Q = 1
EN = 0 (Disabled)
Q = Qprev
Output holds the last stored value. D input is ignored.
D = X→Q = Last Q
When Enable is active, output follows input D. When Enable is OFF, the previous value is stored.