Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
DEPARTMENT OF CSE
B.Tech CSE Sem. 3
CS1003 DIGITAL COMPUTER FUNDAMENTALS
(Regulations 2013)
Prepared by,
M. Eliazer
Asst. Prof.(Sr.G)/CSE
Unit-4
Sequential Logic Circuits
Latches and Flipflops
Triggered flip flops
Clocked flipflops
State reduction and assignment
Counters
Registers
2
Sequential Circuits
Every digital system is likely to have combinational
circuits, most systems encountered in practice also
include storage elements, which require that the
system be described in term of sequential logic.
Synchronous Clocked
Sequential Circuit
A sequential circuit may use many flip-flops to store
as many bits as necessary. The outputs can come
either from the combinational circuit or from the flipflops or both.
Latches
SR Latch
D Latch
One way to eliminate the undesirable condition of
the indeterminate state in SR latch is to ensure that
inputs S and R are never equal to 1 at the same time
in Fig 5-5. This is done in the D latch.
Flip-Flops
The state of a latch or flip-flop is switched by a
change in the control input. This momentary change
is called a trigger and the transition it cause is said to
trigger the flip-flop. The D latch with pulses in its
control input is essentially a flip-flop that is triggered
every time the pulse goes to the logic 1 level. As long
as the pulse input remains in the level, any changes
in the data input will change the output and the state
of the latch.
10
11
12
Edge-Triggered D FlipFlop
The first latch is called the master and the second
the slave. The circuit samples the D input and
changes its output Q only at the negative-edge of the
controlling clock.
D
Y
Q
110011
110011
? 1 1 0 0 1 .
CLK
13
15
Other Flip-Flops
Flop
JK Flip-
16
JK Flip-Flop
The J input sets the flip-flop to 1, the K input resets it
to 0, and when both inputs are enabled, the output is
complemented. This can be verified by investigating
the circuit applied to the D input:
D = J Q` + K` Q
17
T Flip-Flop
The T(toggle) flip-flop is a complementing flip-flop
and can be obtained from a JK flip-flop when inputs
J and K are tied together.
18
T Flip-Flop
The T flip-flop can be constructed with a D flip-flop
and an exclusive-OR gates as shown in Fig. (b). The
expression for the D input is
D=T
Q = TQ` + T`Q
19
Characteristic
Equations
D flip-flop Characteristic Equations
Q(t + 1) = D
JK flip-flop Characteristic Equations
Q(t + 1) = JQ` + K`Q
T flip-flop Characteristic Equations
Q(t + 1) = T
Q = TQ` + T`Q
20
Direct Inputs
Some flip-flops have asynchronous inputs that are
used to force the flip-flop to a particular state
independent of the clock. The input that sets the flipflop to 1 is called present or direct set. The input that
clears the flip-flop to 0 is called clear or direct reset.
When power is turned on a digital system, the state
of the flip-flops is unknown. The direct inputs are
useful for bringing all flip-flops in the system to a
known starting state prior to the clocked operation.
21
22
23
24
State Equations
The behavior of a clocked sequential circuit can be
described algebraically by means of state equations.
A state equation specifies the next state as a
function of the present state and inputs. Consider
the sequential circuit shown in Fig. 5-15. It consists
of two D flip-flops A and B, an input x and an output
y.
25
26
State Equation
A(t+1) = A(t) x(t) + B(t)
x(t)
B(t+1) = A`(t) x(t)
A state equation is an algebraic expression that
specifies the condition for a flip-flop state transition.
The left side of the equation with (t+1) denotes the
next state of the flip-flop one clock edge later. The
right side of the equation is Boolean expression that
specifies the present state and input conditions that
make the next state equal to 1.
Y(t) = (A(t) + B(t)) x(t)`
27
State Table
The time sequence of inputs, outputs, and flip-flop
states can be enumerated in a state table
(sometimes called transition table).
28
State Diagram
The information available in a state table can be
represented graphically in the form of a state
diagram. In this type of diagram, a state is
represented by a circle, and the transitions between
states are indicated by directed lines connecting the
circles.
1/0 : means input =1
output=0
29
Flip-Flop Input
Equations
The part of the combinational circuit that
generates external outputs is descirbed algebraically
by a set of Boolean functions called output equations.
The part of the circuit that generates the inputs to
flip-flops is described algebraically by a set of
Boolean functions called flip-flop input equations. The
sequential circuit of Fig. 5-15 consists of two D flipflops A and B, an input x, and an output y. The logic
diagram of the circuit can be expressed algebraically
with two flip-flop input equations and an output
DA = Ax + Bx
equation:
DB = A`x
y = (A + B)x`
30
31
32
33
34
36
37
TA = Bx
TB = x
y = AB
A(t+1)=(Bx)A+(Bx)A
=AB+Ax+ABx
B(t+1)=xB
38
39
Registers and
TheCounter
filp-flops are essential component
in clocked sequential circuits.
Registers
41
Registers
Register with
Parallel
Load
A clock edge applied to the C inputs of the
43
Register with
Parallel Load
44
Register with
Parallel
Load
When the load input is 1 , the data in the
45
Shift Registers
46
Shift Registers
47
Shift Registers
Serial Transfer
49
Serial Transfer
50
Serial Transfer
51
Serial Transfer
52
Serial Transfer
53
Serial Transfer
Table 6-1
Serial-Transfer Example
Timing Pulse
Shift Register
A
Shift Register
B
Initial value
1011
0010
After T1
1101
1001
After T2
1110
1100
After T3
0111
0110
After T4
1011
1011
54
Serial Transfer
55
Serial Addition
56
Serial Addition
57
Serial Addition
58
Serial Addition
59
Serial Addition
Table 6-2
State Table for serial Adder
Present
State
Inputs
Next State
Output
Flip-Flop
Inputs
JQ
KQ
60
Serial Addition
JQ=xy
KQ=xy=(x+y)
S=xyQ
61
Serial Addition
62
Universal Shift
Register
A clear control to clear the register to 0.
63
Universal Shift
Register
A parallel-load control to enable a parallel
64
Universal Shift
Register
65
Mode Control
S1
S0
0
0
1
0
1
0
Register
Operation
No Change
Shift right
Shift Left
66
Universal Shift
Register
Shift registers are often used to
67
Ripple Counters
Ripple counters
Synchronous counters
68
Binary Ripple
Counter
The output of each flip-flop is connected to
69
Binary Ripple
Counter
70
A3
A2
A1
A0
71
72
73
74
75
76
Synchronous
Counters
Synchronous counters are different
Binary Counter
The design of a
synchronous binary
counter is so simple
that is no need to go
through a sequential
logic design process.
Synchronous binary
counters have a regular
pattern and can be
constructed with
complementing flip-flop
and gates
78
79
BCD Counter
BCD Counter
Table 6-5
State Table for BCD Counter
Present State
Next State
Output
Flip-Flop inputs
Q8
Q4
Q2
Q1
Q8
Q4
Q2
Q1
TQ8
TQ4
TQ2
TQ1
1
81
BCD Counter
TQ1=1
TQ2=Q8Q1
TQ4=Q2Q1
TQ8=Q8Q1+Q4Q2Q1
y=Q8Q1
82
83
84
Clear
CLK
Load
Count
Function
Clear to 0
Load inputs
No change
85
86
87
End of Unit-4
88