Synchronous Sequential Logic: UNIT-4
Synchronous Sequential Logic: UNIT-4
A B Y
0 0 1
0 1 1
1 0 1
1 1 0
BASIC STORAGE ELEMENT
0
1
LATCH
0
1
#For input S=0, R=1.
S =0 1 Q =1 1 0 1 1 0
1 1 1 0
Q’=0 0
R =1 1
#For input S=1, R=0.
S =1 1 Q=0 0 1 0 0 1
1 1 0 1
0 1 1 0
1 1 1 0
Q’=1 1
R =0 1
#Tabulating all the result.
S Q
0 0 Indeterminant
0 1 1 0
1 0 0 1
1 1 1 NO 0
Q’ 1 1 CHANGE
0 1
R
#SR Flip-flop.
S=0 1 Q
Clock
0 0 NO CHANGE
0 1 0 1
0
1 Q’ 1 0 1 0
R=1
=0 1 1 Indeterminant
#D Flip-flop.
D Q Q’
CHARACTERIS
D 0
1
0
1
1
0 TIC TABLE
Q
Q(n) D Q(n+!)
Clock 0 0 0 TRUTH TABLE
1 1 1
Q’ Q Q(n+1) D
0 0 1
EXCITATION
1 1 0
TABLE
#JK Flip-flop.
J=1
1 =0 Q =1 =0 =1
Clock
0 =1 Q’=0 =1 =0
K=1
WAVE FORM REPRESENTATION
NOW, changes at I/P
Any change at I/P will affect O/P
will not effect O/P
1
CLOCK 0 RACE
T 2T
AROUND
(t)
1 CONDITION
Q0
SOLUTION OF RACE AROUND CONDITION
T F
CLOCK 0
T 2T
(t)
PROPAGATION DELAY
1
Q0
FINAL SOLUTION……
CLOCK 0
T 2T
(t)
Q0
PROBLEMS
Q:- Determine the output of PGT
Q:- Determine the output of PGT clocked SR flip flop which Q
clocked SR flip flop which Q initially 1 for the given input
initially 0 for the given input waveforms.
waveforms
Q
Q’
I wish I could have done
something else to make this
beautiful day more
beautiful for you all those
are staying away from
home. All I can say/do to
wish you all very happy
HOLI. May the colors of
happiness and joy
encompasses you in all
aspects of your life and you
all live a colorful and
cheerful life always.
Master Slave Flip Flop
J =1
=1 Q=1
1=0 =0
0 0 1 1
0 =1
=0 =1
K=1 Q’=0
Analysis of clocked sequential circuits
X’
BX’
B
Shift Registers
• Direction
• Left shift
• Right shift
• Rotate (right or left)
• Bidirectional
Data Movement
• The bits in a shift register can move in any of the following manners
Data Movement
• Block diagrams for shift registers with various input/output options:
N 1 0
Q Q Q Q
Serial-In Serial-Out
• A simple way of looking at the
serial shifting operation, with
1
a focus on the data bits, is
illustrated at right
2
• The 4-bit data word “1011” is
to be shifted into a 4-bit shift 3
register
• One shift per clock pulse 4
L/S L/S
A 0 0
F A
B 1
1 B
Universal Shift Register
Introducing counters
• Counters are a specific type of sequential circuit
• The state serves as the “output” (Moore)
• A counter that follows the binary number sequence is called a binary counter
• n-bit binary counter: n flip-flops, count in binary from 0 to 2ⁿ-1
• Synchronous Counters:
• A common clock signal is connected to the C input of each flip-flop
Synchronous Binary Up Counter
• The output value increases by one on each clock cycle
• After the largest value, the output “wraps around” back to 0
• Using two bits, we’d get something like this:
clock
What good are counters?
• Counters can act as simple clocks to keep track of “time”
• You may need to record how many times something has happened
• How many bits have been sent or received?
• How many steps have been performed in some computation?
• We’ll need two flip-flops again. Here are the four possible states:
00 01
11 10
The complete state diagram and table
• Here’s the complete state diagram and state table for this circuit
X Q1
Q0
clock
Unused states
• The examples shown so far have all had 2n states, and used n flip-flops.But
sometimes you may have unused, leftover states
• For example, here is a state table and diagram for a counter that repeatedly
counts from 0 (000) to 5 (101)
• What should we put in the table for the two unused states?
Present State Next State 000
Q2 Q1 Q0 Q2 Q1 Q0
0 0 0 0 0 1
101 001
0 0 1 0 1 0
0 1 0 0 1 1
0 1 1 1 0 0
1 0 0 1 0 1
1 0 1 0 0 0 100 010
1 1 0 ? ? ?
1 1 1 ? ? ? 011
Unused states can be don’t cares…
• To get the simplest possible circuit, you can fill in don’t cares for the
next states. This will also result in don’t cares for the flip-flop inputs,
which can simplify the hardware
• If the circuit somehow ends up in one of the unused states (110 or 111),
its behavior will depend on exactly what the don’t cares were filled in with
Q0
UP
R
D0
CLK
CLR
An 8-bit counter
• As you might expect by now, we can use
these general counters to build other
counters
• Here is an 8-bit counter made from two 4-bit
counters
• The bottom device represents the least significant four bits,
while the top counter represents the most significant four bits
• When the bottom counter reaches 1111 (i.e., when CO = 0), it
enables the top counter for one cycle