Digital Logic Design
LECTURE 10: SEQUENTIAL LOGIC, LATCHES, FLIP FLOPS
After this class you should know
• Sequential Logic
• Types of sequential circuits
• Latches
• Flip Flops
06-May-19 BINARY SYSTEMS 2
Combinational
Logic
Digital Logic
Sequential
Logic
06-May-19 BINARY SYSTEMS 3
Digital Logic
Combinational Sequential
• Output at any instant of time • Output at any instant of time
depends only on input. depends on the previous values
• No memory units required as well along with the input.
• Faster • Memory units required.
• Easy design and analysis • Slower
• Parallel adder • Serial adder
• Examples: Full adder, • Examples: Flip flops, register,
Multiplexer, Decoder etc. counters
4
Sequential Circuits
State of system is info stored
That, PLUS inputs, determine outputs
5
Types of Sequential Circuits
Synchronous Asynchronous
• State changes synchronized • Changes occur
by one or more clocks independently
• Slower than asynchronous • Potentially faster
due to clock. • Harder Analysis and
• Easy Analysis and Design Design
• Change in input affects • Change in input signals
memory element upon affects memory elements at
activation of clock signal any instant of time.
6
Latch: Basic Memory Storage Element
• A storage element in a digital circuit that can maintain a binary state indefinitely (as long as
power is delivered to the circuit), until directed by an input signal to switch states.
• Latch is the basic storage element (stores 1 bit) building block of flip flops.
• Storage elements that operate with signal levels are latches. (Level Sensitive)
•Storage elements that operate with clock transitions are flip flops. (Clock Sensitive)
7
Latch Types
NOR
SR
Latches NAND
D
06-May-19 BINARY SYSTEMS 8
SR (set-reset) Latches (NOR)
Basic storage made from gates
Evaluate 1 First •S & R both 0 in “resting” state
•Have to keep both from 1 at same time
9
S R Latch (NAND)
Similar – made from NANDs
Evaluate 0 First
10
Add Control Input
Is there latch w/ no illegal state?
11
D-type Latch
No illegal state
12
Standard Symbols – Latches
Circle at input indicates negation
13
Flip-Flops
• Flip-Flops:
• Ensure output changes only once per clock cycle
• Two commonly-used types of flip-flops:
• Master-Slave
• Use a sequence of two latches
• Edge-Triggered
• Implementation very different from latches
14
1. Master-Slave Flip-Flop
Either Master or Slave is enabled, not both
Store for a clock cycle.
Get what was stored in last cycle
Characteristic Equation
Q(t+1)=D Characteristic Table ?
15
Edge-Triggered Flip-Flops
• New state latched on clock transition
• Low-to-high or high-to-low
• +ve edge-triggered, -ve edge-triggered
• Also: dual-edge-triggered
• Changes when clock high are ignored
• Note: Master-Slave sometimes called pulse triggered
16
Clock Response
17
Symbol for Edge Triggered D Flip Flop
18
D Flip Flop Characteristic Table
06-May-19 BINARY SYSTEMS 19
JK Flip Flop
Characteristic Equation
Q(t+1)=JQ’ +K’Q
J=1, K=0, D = Q’+Q=1
J=0, K=1, D =0
J=K=0, D=Q (Unchanged)
J=K=1, D=Q’ (Complement)
20
T –Flip Flop
21
Symbols – Master-Slave
Inverted ‘L’ indicates postponed output
Circle indicates whether enable is positive or negative
JK: like an SR flip-flop, but:
If J=K=1, output is toggled
Can make a toggle flip-flop (T flip-flop) from a JK
22
Symbols – Edge-Triggered
Arrow indicates edge trigger
23
Direct Inputs
• Use to force Set/Reset independent of clock
• Direct set or preset
• Direct reset or clear
• Often used for power-up reset
24