Sequential Circuit
Sequential Circuit
• Hence the previous state of input does not have any effect on the present state of the
circuit.
• But sequential circuit has memory so output can vary based on input.
• This type of circuits uses previous input, output, clock and a memory element.
• A Flip Flop is a memory element that is capable of storing one bit of information.
• It is also called as Bistable Multivibrator since it has two stable states either 0 or 1.
Two Main Types of Sequential Circuits
There are two types of sequential circuit,
(i) synchronous
(ii) asynchronous
Synchronous Sequential Logic Circuit
➢ Clocked
➢ All Flip-Flops use the same clock and change state on the same triggering edge.
Asynchronous Sequential Logic Circuit
➢ No clock
➢ Can change state at any instance in time.
➢ Faster but more complex than synchronous sequential circuits.
General Models for Sequential Circuits
• A sequential circuit can be divided conveniently into two parts -- the flip-flops which serve
as memory for the circuit and the combinational logic which realizes the input functions for
the flip-flops and the output functions.
• The combinational logic may be implemented with gates, with a ROM, or with a PLA.
Combinational vs. Sequential
⚫ Combinational Logic Circuit
➢ Output is a function only of the present inputs.
➢ Does not have state information.
➢ Does not require memory.
⚫ Sequential Logic Circuit (Finite State Machine)
➢ Output is a function of the present state.
➢ Has state information
➢ Requires memory.
➢ Uses Flip-Flops to implement memory
Latches and Flip Flops:
✓ Both Latches and flip flops are circuit elements wherein the output not
only depends on the current inputs, but also depends on the previous input
and outputs.
✓ The main difference between the latch and flip flop is that a flip flop has a
clock signal, whereas a latch does not. Basically, there are four types of
latches and flip flops: SR, D, JK and T.
✓ The major differences between these types of flip flops and latches are the
number of i/ps they have and how they change the states.
✓ There are different variations for each type of latches and flip-flops which
can enhance their operations.
Flip Flop
Due to the undefined state in the SR • The operation of the JK flip-flop is similar to the SR flip-flop.
flip-flop, another flip-flop is required
in electronics. • When the input J and K are different then the output Q takes
The JK flip-flop is an improvement the value of J at the next clock edge.
on the SR flip-flop where S=R=1 is
not a problem. • When J and K both are low then NO change occurs at the
output.
• If both J and K are high, then at the clock edge, the output
will toggle from one state to the other.
Truth table of JK flip-flop
J K Q State
0 0 0 No Change
0 1 0 Reset
1 0 1 Set
1 1 Toggles Toggle
• If J and K data input are different (i.e. high and low) then J K Q Q’
the output Q takes the value of J at the next clock edge. 0 0 0 0
• If J and K are both low then no change occurs. 0 1 0 0
1 0 0 1
• If J and K are both high at the clock edge then the output 1 1 0 1
will toggle from one state to the other. 0 0 1 1
0 1 1 0
• JK Flip-Flops can function as Set or Reset Flip-flops
1 0 1 1
1 1 1 0
• The conversion of flip-flops to a JK flip-flop is to cross connect the Q and Q outputs with the S and R inputs through
additional 3-input AND gates
• If the J and K inputs are both HIGH, logic “1” then the Q output will change state (Toggle) for as long as the clock
input, (CLK) is HIGH. Thus the output will be unstable creating a race-around problem with this basic JK circuit.
• This problem is avoided by ensuring that the clock input is at logic “1” only for a very short time, or to produce a
more sophisticated JK flip-flop circuit called a Master–slave flip-flop.
The Master-Slave Flip-Flops
✓ The Master-Slave Flip-Flop is basically two gated SR flip-flops connected together in a series
configuration with the slave having an inverted clock pulse.
✓ The outputs from Q and Q from the “Slave” flip-flop are fed back to the inputs of the “Master”
with the outputs of the “Master” flip flop being connected to the two inputs of the “Slave” flip
flop.
✓ This feedback configuration from the slave’s output to the master’s input gives the characteristic
toggle of the JK flip.
• Clock = 1: Master active, slave inactive. Outputs of master will toggle. So S and R also will be inverted.
• Clock = 0: Slave active, master inactive. Outputs of slave will toggle.
J=K=1
4 • These changed output are returned back to the master inputs. But since clock = 0, the master is still
(Toggle)
inactive. So it does not respond to these changed outputs. This avoids the multiple toggling which leads
to the race around condition. The master slave flip flop will avoid the race around condition.
D Flip-Flop
• D Flip-flop operation is same as D latch. The only difference is that D
flip-flop changes its output only when there is an edge of the clock
signal.
• In SR NAND Gate Bistable circuit, the undefined input condition of SET =
"0" and RESET = "0" is forbidden. It is the drawback of the SR flip flop. This
state:
1.Override the feedback latching action.
2.Force both outputs to be 1.
3.Lose the control by the input, which first goes to 1, and the other input
remains "0" by which the resulting state of the latch is controlled.
• We connect the inverter between the Set and Reset inputs for producing another
type of flip flop circuit called D flip flop, Delay flip flop, D-type Bistable, D-type
flip flop.
• The D flip flop is the most important flip flop from other clocked types. It ensures
that at the same time, both the inputs,
• i.e., S and R, are never equal to 1. The Delay flip-flop is designed using a
gated SR flip-flop with an inverter connected between the inputs allowing for a
single input D(Data).
• This single data input, which is labeled as "D" used in place of the "Set" input and
for the complementary "Reset" input, the inverter is used. Thus, the level-sensitive
D-type or D flip flop is constructed from a level-sensitive SR flip flop.
Toggle Flip Flop / T Flip Flop
• The shift registers are also used for data transfer and data manipulation.
• The serial-in serial-out and parallel-in parallel-out shift registers are used to produce time
delay to digital circuits.
• The serial-in parallel-out shift register is used to convert serial data into parallel data thus
they are used in communication lines where demultiplexing of a data line into several
parallel line is required.
• A Parallel in Serial out shift register us used to convert parallel data to serial data.
Counters
Digital Logic Counter
• In digital logic and computing, a Counter is a device which stores (and sometimes
displays) the number of times a particular event or process has occurred
• Counter is a sequential circuit. A digital circuit which is used for a counting pulses is
known counter.
• For example, in UP counter a counter increases count for every rising edge of clock.
• Not only counting, a counter can follow the certain sequence based on our design like
any random sequence 0,1,3,2… .They can also be designed with the help of flip flops.
Counters are of two types.
Asynchronous or ripple counters
- In asynchronous counter we don’t use universal clock, only first flip flop is driven
by main clock and the clock input of rest of the following flip flop is driven by output of
previous flip flops.
Synchronous counter
• synchronous counter has one global clock which drives each flip flop so output changes in
parallel.
• advantage of synchronous counter is it can operate on higher frequency
• But asynchronous counter as it does not have cumulative delay because of same clock is
given to each flip flop
Asynchronous Counter
When the control input is 0, in the following figure, the AND gates 1 and 3 are disabled. It enables gate 2 and 4,
which means, Q’ output of first and second flip-flop drives the clock input of JK FF2 and JK FF3 respectively. In
this case, the counter will perform the operation of the down counter.
When the control input is 1, gates 1 and 3 are enabled and gates 2 and 4 are disabled. This makes a way for the Q
output of flip-flops to drive the clock input of the next stage flip-flop. Now, the counter will perform the up
counter operation.
Synchronous Counters
Johnson Counter
•The number of flip flops in the Johnson counter is equal to the number of flip
flops in the ring counter, and the Johnson counter counts twice the number of states
the ring counter can count.