Cpre 281: Digital Logic: Instructor: Alexander Stoytchev
Cpre 281: Digital Logic: Instructor: Alexander Stoytchev
Cpre 281: Digital Logic: Instructor: Alexander Stoytchev
Digital Logic
http://www.ece.iastate.edu/~alexs/classes/
D Flip-Flops
x x x
x x x
A simple memory element with NOR Gates
x x x
Basic Latch
A simple memory element with NOR Gates
A simple memory element with NOR Gates
A simple memory element with NOR Gates
Set Reset
A memory element with NOR gates
Reset
Set Q
R S R Qa Qb
Qa
0 0 0/1 1/0 (no change)
0 1 0 1
1 0 1 0
Qb 1 1 0 0
S
R S R Qa Qb
Qa
0 0 0/1 1/0 (no change)
0 1 0 1
1 0 1 0
Qb 1 1 0 0
S
t1 t2 t3 t4 t5 t6 t7 t8 t9 t 10
1
R
0
1
S
0
1
Qa ?
0
1
Qb ?
0
Time
(c) Timing diagram [ Figure 5.4 from the textbook ]
Gated SR Latch
Motivation
• The basic latch changes its state when the input
signals change
S
Q
Clk
Q
R
S
Q
Clk
Q
R
t su
th
Clk
Setup time (tsu) – the minimum time that the D signal must be stable
prior to the the negative edge of the Clock signal
Hold time (th) – the minimum time that the D signal must remain stable
after the the negative edge of the Clock signal
[ Figure 5.8 from the textbook ]
Edge-Triggered D Flip-Flops
Motivation
Master Slave
Qm Qs
D D Q D Q Q
(a) Circuit
Master Slave
Qm Qs
D D Q D Q Q
Clock
Qm
Q = Qs
D Q
D Q
D Q
D Q
Q
Other Types of Edge-Triggered
D Flip-Flops
D D Q Qa Comparison of level-sensitive and
Clock Clk Q Qa edge-triggered D storage elements
D Q Qb
Q Qb
D Q Qc
Q Qc
Clock
Qa
Qb
Qc
D D Q Qa Comparison of level-sensitive and
Clock Clk Q Qa edge-triggered D storage elements
D Q Qb
Q Qb
Level-sensitive
(the output mirrors the D input when Clk=1)
D Q Qc
Q Qc
Clock
Qa
Qb
Qc
D D Q Qa Comparison of level-sensitive and
Clock Clk Q Qa edge-triggered D storage elements
D Q Qb
Q Qb
Positive-edge-triggered
D Q Qc
Q Qc
Clock
Qa
Qb
Qc
D D Q Qa Comparison of level-sensitive and
Clock Clk Q Qa edge-triggered D storage elements
D Q Qb
Q Qb
Negative-edge-triggered
D Q Qc
Q Qc
Clock
Qa
Qb
Qc
A positive-edge-triggered D flip-flop
1 P3
P1
2
5 Q
Clock
P2 6 Q
3
D Q
Clock Q
4 P4
D
P1
2
5 Q
Clock
P2 6 Q
3
D Q
Clock Q
4 P4
D
[http://en.wikipedia.org/wiki/Flip-flop_(electronics)]
Questions?
THE END