0% found this document useful (0 votes)
37 views28 pages

Lec 18 CLD

Uploaded by

Zahid Abbas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views28 pages

Lec 18 CLD

Uploaded by

Zahid Abbas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

EE 105 Computer Logic Design

Lecture 18
Flip-Flop Characteristic Tables
 Characteristic table defines the logical properties of a
flip-flop by describing its operation in tabular form
Flip-Flop Characteristic Tables
 Characteristic tables define the next state as a function
of the inputs and the present state
 State that results from a clock transition
 Q ( t ) is the present state
 State present prior to the application of a clock edge
 Q(t + 1) is the next state
 State that will appear one clock period later
 Thus, Q(t) denotes the state of the flip-flop immediately
before the clock edge, and
 Q(t + 1) denotes state that results from clock transition
Characteristic Equations
 Logical properties of a flip-flop can also be expressed
algebraically with a characteristic equation
 For the D flip-flop, characteristic equation is
Q(t + 1) = D
 Eq. states that the next state of the output will be equal to
the value of input D in the present state
 Characteristic Eq. for the JK flip-flop (derived from table)
Q(t + 1) = JQ’ + K’Q
 where Q is the value of the flip-flop output prior to the
application of a clock edge
 Characteristic equation for the T flip-flop
Q(t + 1) = T Q = TQ’ + T’Q
Direct Inputs
 Some flip-flops have asynchronous direct inputs
 Direct inputs are used to force the flip-flop to a particular
state independently of the clock
 When power is turned on in a digital system, the state of
the flip-flops is unknown
 Direct inputs are useful for bringing all flip-flops in system
to a known starting state prior to clocked operation
 Input that sets flip-flop to 1 is called preset or direct set
 Input that clears flip-flop to 0 is called clear or direct
reset
Direct Inputs
 A positive-edge-triggered D flip-flop with active-low
asynchronous reset

When R= 0,
it clears output
Q to 0, thus
resetting the
flip-flop
ANALYSIS OF CLOCKED
SEQUENTIAL CIRCUITS
 Analysis describes what a given circuit will do under
certain operating conditions
 Behavior of a clocked sequential circuit is determined from
 the inputs,
 the outputs,
 and the state of its flip-flops
 Outputs and the next state are both a function of
 the inputs
 and the present state
 Analysis of a sequential circuit consists of obtaining a
table or a diagram for the time sequence of inputs,
outputs, and internal states
ANALYSIS OF CLOCKED
SEQUENTIAL CIRCUITS
 Analysis describes what a given circuit will do under
certain operating conditions
 Behavior of a clocked sequential circuit is determined from
 the inputs,
 the outputs,
 and the state of its flip-flops
 Outputs and the next state are both a function of
 the inputs
 and the present state
 Analysis of a sequential circuit consists of obtaining a
table, a boolean expressions or a diagram for the time
sequence of inputs, outputs, and internal states
State Equations
 Describe behavior of a clocked sequential circuit
 A state equation (or transition equation ) specifies the
next state as a function of the present state and inputs
 Consider a sequential circuit that acts as a 0-detector by
asserting its output when a 0 is detected in a stream of 1s
 It has two D flip-flops A and B, an input x and an output y
 Since D input of a flip-flop determines value of the next
state, a set of State equations for the circuit is:
A(t + 1) = A(t)x(t) + B(t)x(t) = Ax + Bx
B(t + 1) = A’(t)x(t) = A’x
 Similarly, the present-state value of Output equation is:
y(t) = [A(t) + B(t)]x’(t) = (A+B) x’
State Equations
 State equations
for the circuit:

A(t + 1) = Ax + Bx
B(t + 1) = A’x

 Output equation
for the circuit:
y(t) = (A+B) x’
State Table
 Time sequence of inputs, outputs, and flip-flop states can
be enumerated in a state table (or transition table)
 State table for the
0-detector sequential
circuit is shown
State Table
 Table consists of four sections
 Present-state section shows the states of flip-flops A and
B at any given time t
 Input section gives a value of x for each possible present
state
 Next-state section shows the states of the flip-flops A
and B one clock cycle later, at time t + 1
 Output section gives the value of y at time t for each
present state and input condition
 Derivation of a state table requires listing all possible
binary combinations of present states and inputs
 In this case, eight binary combinations from 000 to 111
State Table
 Next-state values are then determined from the logic
diagram or from the state equations
A(t + 1) = Ax + Bx
B(t + 1) = A’x
 Column A has three 1’s where the present state of A and
input x are both equal to 1 or the present state of B and
input x are both equal to 1
 Similarly, column B is equal to 1 when the present state of
A is 0 and input x is equal to 1
 Output column is derived from the output equation
y = Ax’ + Bx’
State Table
 In general, a sequential circuit with m flipflops and n inputs
needs 2m+n rows in the state table
 Binary numbers from 0 through 2m+n - 1 are listed under
the present-state and input columns
 Next-state section has m columns, one for each flip-flop
 Binary values for the next state are derived directly from the
state equations
 Output section has as many columns as there are outputs
 Binary values of output are derived from the circuit or from
the Boolean function in the same manner as in a truth table
State Table
 It is sometimes convenient to express the state table in a
slightly different form having only three sections: present
state, next state, and output
 For each present state, there are two possible next states
and outputs, depending on the value of the input
State Diagram
 Information available in a state table can be represented
graphically in the form of a state diagram
 Aa state is represented by a circle, and the (clock-
triggered) transitions between states are indicated by
directed lines connecting the circles
 State diagram provides the same
information as the state table and
is obtained directly from Table
(form 1 or 2)
State Diagram
 Binary number inside each circle identifies the state of
the flip-flops
 Directed lines are labeled with two binary numbers
separated by a slash
 Input value during the present state is labeled first, and the
number after the slash gives the output during the present
state with the given input
 For example, the directed line from state 00 to 01 is
labeled 1/0, meaning that when the sequential circuit is in
the present state 00 and the input is 1, the output is 0.
After the next clock cycle, the circuit goes to the next
state, 01.
State Diagram
 Steps presented in this example are summarized below:
Circuit diagram

Equations – State table

State diagram

 This sequence of steps begins with a structural


representation of the circuit and proceeds to an abstract
representation of its behavior
 There is no difference between a state table and a state
diagram, except in the manner of representation
Flip-Flop Input Equations
 Sequential circuit diagram consists of flip-flops and gates
 Interconnections among gates form a combinational circuit
and may be specified with Boolean expressions
 To draw the logic diagram of the sequential circuit:
 Need knowledge of the type of flip-flops and
 List of the Boolean expressions of the combinational circuit
 Part of the combinational circuit that generates external
outputs is described algebraically by a set of Boolean
functions called output equations
 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
Flip-Flop Input Equations
 To denote the input equation variable and a subscript to
designate the name of the flip-flop output
 For example, the following input equation specifies an OR
gate with inputs x and y connected to the D input of a flip-
flop whose output is labeled with the symbol Q :
DQ = x + y
 Logic diagram of the Sequential circuit of 0-detector
(shown earlier) can be expressed algebraically with two
flip-flop input equations and an output equation:
DA = Ax + Bx
DB = A’x
y = (A + B)x’
Flip-Flop Input Equations
 Three equations provide the necessary information for
drawing the logic diagram of the sequential circuit
 Symbol DA specifies a D flip-flop labeled A and DB
specifies a second D flip-flop labeled B
 These Boolean expressions fully specify the combinational
circuit part of the sequential circuit
 Note that the expression for the input equation for a D
flip-flop is identical to the expression for the
corresponding state equation
 This is because of the characteristic equation that equates
the next state to the value of the D input:
Q(t + 1) = DQ
Analysis with D Flip-Flops
 Circuit is described by the input equation
DA = A x y
 DA symbol implies a D flip-flop with output A
 x and y variables are the inputs to the circuit
 No output equations are given, which implies that the
output comes from the output of the flip-flop
 State table has one column for the present state of flip-
flop A, two columns for the two inputs, and one column for
the next state of A
 Binary numbers under Axy are listed from 000 through 111
 Next-state values are obtained from the state equation
A(t + 1) =A x y
Analysis with D Flip-Flops
Analysis with D Flip-Flops
 Circuit has one flip-flop and two states
 State diagram consists of two circles, one for each state
 Present state and the output can be either 0 or 1, as
indicated by the number inside the circles
 A slash on the directed lines is not needed, because there
is no output from a combinational circuit
 Two inputs can have four possible combinations for each
state
 Two input combinations during each state transition are
separated by a comma to simplify the notation
Analysis with JK Flip-Flops
Analysis with JK Flip-Flops
 Circuit can be specified by the flip-flop input equations:
JA = B KA = Bx’
JB = x KB = Ax’ + A’x = A x
 Next state of each flip-flop is evaluated from the
corresponding J and K inputs:
A(t + 1) = JA A’ + K’A A
B(t + 1) = JB B‘ + K’B B
 Substituting the values of JA and KA :
A(t + 1) = BA‘ + (Bx‘)‘ A = A‘B + AB‘ + Ax
 Substituting the values of JB and KB:
B(t + 1) = x’B’ + (A x)’B = B’x’ + ABx + A’Bx’
Analysis with JK Flip-Flops
Analysis with JK Flip-Flops

You might also like