0% found this document useful (0 votes)
10 views

LEC7 (2)

The document covers the fundamentals of sequential circuits, specifically focusing on flip-flops such as JK, D, and T flip-flops, including their characteristic equations and input equations. It explains the analysis of clocked sequential circuits through state diagrams, state equations, and transition equations. Additionally, it illustrates how to derive next-state values and analyze circuit behavior using various flip-flop types.

Uploaded by

pogataj757
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

LEC7 (2)

The document covers the fundamentals of sequential circuits, specifically focusing on flip-flops such as JK, D, and T flip-flops, including their characteristic equations and input equations. It explains the analysis of clocked sequential circuits through state diagrams, state equations, and transition equations. Additionally, it illustrates how to derive next-state values and analyze circuit behavior using various flip-flop types.

Uploaded by

pogataj757
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Comp

302 Digital Design and Computer Architecture

LEC
Sequential Circuits and FSM
7 Textbook chapter 3

Fall 2024 Dr. Amr Hefny Cairo University


2
3
JK flip-flop

D = JQ + K Q
J=1, K=0, D = Q + Q=1
J=0, K=1, D = 0
J=0, K=0, D = Q
J=1, K=1, D = Q
4
JK flip-flop

J: set, K: reset, if J=K=1 then toggle output


JK flip-flop

Simulation Output for JK flip-flop


5
T (toggle) flip-flop
D = TQ + T Q= TQ

Q
6
Characteristic Equations
• The characteristic equation states the next state in
terms of inputs and the present state
• For the D flip-flop:
Q(t+1) =D
• For the JK flip-flop:
Q(t+1) = JQ + K Q
• For the T flip-flop:
Q(t+1) = TQ + T Q= TQ
7
Direct Inputs

• When power is turned on in a digital system, the state of the


flip-flops is unknown.

• Some flip-flops have asynchronous inputs that are used to


force the flip-flop to a particular state independently of the
clock
•The input that sets the flip-flop to 1 is called
preset or direct set
–preset or direct set : sets the flip-flop to 1
–direct reset : clears the flip-flop to 0 .
9

1
1

• The bubble along the input indicates that the reset is active at the logic-0
level, i.e. when R = 0, the output is reset to 0
• The upward arrow indicate that the flip-flop triggers on the positive edge
of the clock
10
ANALYSIS OF CLOCKED SEQUENTIAL
CIRCUITS
• Analysis describes what a given circuit will
do under certain operating conditions
• The analysis of a clocked sequential circuit
consisting of obtaining a State diagram
11
State Equations: transition equation
• The behavior of a clocked sequential
circuit can be described algebraically
by means of state equations. A
• A state equation specifies the next
state as a function of the present state
and inputs.
A(t + 1) = A(t) x(t) + B(t) x(t)
B(t + 1) = A(t)’x(t)
B
y(t) = [A(t) + B(t)] x(t)’
OR SIMPLY
A(t + 1) = A x + B x
B(t + 1) = A’x
The state table

A(t+1) = Ax + Bx
B(t+1) = A x
y = x [B + A]
13

• State diagram :
– circle : the state name
– directed arc : transition from the Present State to the
Next State
– The directed lines are labeled with two binary numbers
separated by a slash.
input /output
14
State diagram
• Define all possible states
• Determine the flow from state to another
according to the state table.
Qn J K Qn+1
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 1 S0=0 and S1=1
1 0 1 0
1 1 0 1
1 1 1 0
15
0/0 0/1 1/0

State Diagram 00 10
0/1
0/1 means x=0/y=1
1/0
1/0
INPUT OUTPUT 0/1

01 11
1/0
16

The steps presented in this example are :

Circuit diagram → State Equations → State table → State diagram


17
Flip-Flop Input 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:
DA=Ax +Bx
DB=A' x
Y = (A + B) x'
18
Analysis with D Flip-Flops
19
Analysis with JK Flip-Flops

The next-state values of a sequential circuit that uses JK- or T-type


flip-flops can be derived as follows:
1. Determine the flip-flop input equations .
2. List the binary values of each input equation.
3. Use the corresponding flip-flop characteristic equations to
determine the next-state values in the state table.
20

Flip-Flop Input Equations:


JA=B, KA=Bx'
JB=x' , KB=A'x + Ax' = A  x
21
State equations
From the JK flip-flop Input equation Input eqs: JA=B KA=Bx’
D = JQ + K Q JB=x’ KB=A’x + Ax’
=A x
• From JK flip-flop characteristic equation:
• A(t+1) = JAA +KA' A
• B(t+1) = JBB + KB B
• Substituting the values of JA , KA from the input equation, we
obtain the state equation :
A(t+1) = BA + (Bx)A
= BA + AB + Ax
B(t+1)= x B+(Ax) B=B x+ABx+A B x
22

A(t+1) =BA + AB + Ax JA=B KA=Bx’


B(t+1)=B x+ABx+A B x JB=x’ KB=A’x + Ax’
23
24
Analysis with T Flip-Flops

• The next-state values in the state table can be


obtained by using either the characteristic
table listed in Table 5.1 or the characteristic
equation
Q (t + 1) = T  Q = T' Q + TQ'
25

Example
Now consider the sequential circuit
shown in Fig. 5.20 . It can be described
algebraically by two input equations and
an output equation:
TA = Bx
TB = x
y = AB
26

• The values for the next state can be


derived from the state equations by
substituting TA and TB in the characteristic
equations, yielding characteristic eq.
Q (t + 1) = T  Q = T' Q + TQ'
A(t + 1) = (Bx)' A + (Bx)A'
= AB' + Ax' + A' Bx
B(t + 1) = x  B
27

• As long as input x is equal to 1, the


circuit behaves as a binary counter
with a sequence of states 00, 01, 10,
11, and back to 00.
• When x = 0, the circuit remains in the
same state. Output y is equal to 1
when the present state is 11. Here, the
output depends on the present state
only and is independent of the input.
• The two values inside each circle and
separated by a slash are for the
present state and output.

You might also like