Module 5
Module 5
Module V
Sequential Circuits.
We discussed various combinational circuits. All these circuits
have a set of output(s), which depends only on the combination
of present inputs. The following figure shows the block
diagram of sequential circuit.
Clock signal
Clock signal is a periodic signal and it’s ON time and OFF time
need not be the same. We can represent the clock signal as a
square wave, when both its ON time and OFF time are same.
This clock signal is shown in the following figure.
Types of Triggering
Following are the two possible types of triggering that are used
in sequential circuits.
Level triggering
Edge triggering
Level triggering
There are two levels, namely logic High and logic Low in clock
signal. Following are the two types of level triggering.
Positive level triggering
Negative level triggering
If the sequential circuit is operated with the clock signal when it
is in Logic High, then that type of triggering is known as
Positive level triggering. It is highlighted in below figure.
Edge triggering
There are two types of transitions that occur in clock signal.
That means, the clock signal transitions either from Logic Low
to Logic High or Logic High to Logic Low.
Latches
There are two types of memory elements based on the type of
triggering that is suitable to operate it.
Latches
Flip-flops
Latches operate with enable signal, which is level sensitive.
Whereas, flip-flops are edge sensitive. We will discuss about
flip-flops in next chapter. Now, let us discuss about SR Latch &
D Latch one by one.
SR Latch
SR Latch is also called as Set Reset Latch. This latch affects the
outputs as long as the enable, E is maintained at ‘1’. The circuit
diagram of SR Latch is shown in the following figure.
This circuit has two inputs S & R and two outputs Q(t) & Q(t)’.
The upper NOR gate has two inputs R & complement of present
state, Q(t)’ and produces next state, Q(t+1) when enable, E is ‘1’.
Similarly, the lower NOR gate has two inputs S & present state,
Q(t) and produces complement of next state, Q(t+1)’ when
enable, E is ‘1’.
At any time, only of those two inputs should be ‘1’. If both inputs
are ‘1’, then the next state Q(t+1) value is undefined.
The following table shows the state table of SR latch.
S R Q(t+1)
0 0 Q(t)
0 1 0
1 0 1
1 1 -
D Latch
There is one drawback of SR Latch. That is the next state value
can’t be predicted when both the inputs S & R are one. So, we
can overcome this difficulty by D Latch. It is also called as Data
Latch. The circuit diagram of D Latch is shown in the following
figure.
This circuit has single input D and two outputs Q(t) & Q(t)’. D
Latch is obtained from SR Latch by placing an inverter between
S amp;& R inputs and connect D input to S. That means we
eliminated the combinations of S & R are of same value.
If D=0 → S=0 & R=1, then next state Q(t+1) will be equal to
‘0’ irrespective of present state, Q(t) values. This is
corresponding to the second row of SR Latch state table.
If D=1 → S=1 & R=0, then next state Q(t+1) will be equal to
‘1’ irrespective of present state, Q(t) values. This is
corresponding to the third row of SR Latch state table.
Flip-flops
Latches are the basic building blocks of flip-flops. We can
implement flip-flops in two methods.
In first method, cascade two latches in such a way that the first
latch is enabled for every positive clock pulse and second latch
is enabled for every negative clock pulse. So that the
combination of these two latches become a flip-flop.
SR Flip-Flop
SR flip-flop operates with only positive clock transitions or
negative clock transitions. Whereas, SR latch operates with
enable signal. The circuit diagram of SR flip-flop is shown in
the following figure.
This circuit has two inputs S & R and two outputs Q(t) & Q(t)’.
The operation of SR flip-flop is similar to SR Latch. But, this flip-
flop affects the outputs only when positive transition of the
clock signal is applied instead of active enable.
Here, Q(t) & Q(t+1) are present state & next state respectively.
So, SR flip-flop can be used for one of these three functions such
as Hold, Reset & Set based on the input conditions, when
positive transition of clock signal is applied. The following table
shows the characteristic table of SR flip-flop.
D Flip-Flop
D flip-flop operates with only positive clock transitions or
negative clock transitions. Whereas, D latch operates with
enable signal. That means, the output of D flip-flop is insensitive
to the changes in the input, D except for active transition of the
clock signal. The circuit diagram of D flip-flop is shown in the
following figure.
This circuit has single input D and two outputs Q(t) & Q(t)’. The
operation of D flip-flop is similar to D Latch. But, this flip-flop
affects the outputs only when positive transition of the clock
signal is applied instead of active enable.
JK Flip-Flop
JK flip-flop is the modified version of SR flip-flop. It operates
with only positive clock transitions or negative clock
transitions. The circuit diagram of JK flip-flop is shown in the
following figure.
This circuit has two inputs J & K and two outputs Q(t) & Q(t)’.
The operation of JK flip-flop is similar to SR flip-flop. Here, we
considered the inputs of SR flip-flop as S=J Q(t)’ and R=KQ(t) in
order to utilize the modified SR flip-flop for 4 combinations of
inputs.
Eugin Lopez. F, Asst. Prof in Computer, CAS, IHRD, Thodupuzha [email protected]
- 124 -
CS1CMT01 Fundamentals of Digital Systems (Complementary) MG University, Kottayam
Here, Q(t) & Q(t+1) are present state & next state respectively.
So, JK flip-flop can be used for one of these four functions such
as Hold, Reset, Set & Complement of present state based on the
input conditions, when positive transition of clock signal is
applied. The following table shows the characteristic table of
JK flip-flop.
T Flip-Flop
T flip-flop is the simplified version of JK flip-flop. It is obtained
by connecting the same input ‘T’ to both inputs of JK flip-flop. It
operates with only positive clock transitions or negative clock
transitions. The circuit diagram of T flip-flop is shown in the
following figure.
This circuit has single input T and two outputs Q(t) & Q(t)’. The
operation of T flip-flop is same as that of JK flip-flop. Here, we
considered the inputs of JK flip-flop as J=T and K=T in order to
utilize the modified JK flip-flop for 2 combinations of inputs. So,
we eliminated the other two combinations of J & K, for which
those two values are complement to each other in T flip-flop.
Reset State
In this second stable state, Q’ is at logic level “0”, (not Q = “0”) its
inverse output at Q is at logic level “1”, (Q = “1”), and is given by
R = “1” and S = “0”. As gate X has one of its inputs at logic “0” its
output Q must equal logic level “1” (again NAND gate
principles). Output Q is fed back to input “B”, so both inputs to
NAND gate Y are at logic “1”, therefore, Q’ = “0”.
If the set input, S now changes state to logic “1” with input R
remaining at logic “1”, output Q’ still remains LOW at logic level
“0” and there is no change of state. Therefore, the flip-flop
circuits “Reset” state has also been latched and we can define
this “set/reset” action in the following truth table.
It can be seen that when both inputs S = “1” and R = “1” the
outputs Q and Q’ can be at either logic level “1” or “0”, depending
upon the state of the inputs S or R BEFORE this input condition
existed. Therefore the condition of S = R = “1” does not change
the state of the outputs Q and Q’.
input and is given the prefix of “EN“. The addition of this input
means that the output at Q only changes state when it is HIGH
and can therefore be used as a clock (CLK) input making it level-
sensitive as shown below.
Gated SR Flip-flop
When the Enable input “EN” is at logic level “0”, the outputs of
the two AND gates are also at logic level “0”, (AND Gate
principles) regardless of the condition of the two inputs S and R,
latching the two outputs Q and Q’ into their last known state.
When the enable input “EN” changes to logic level “1” the circuit
responds as a normal SR bistable flip-flop with the two AND
gates becoming transparent to the Set and Reset signals.
This simple JK flip Flop is the most widely used of all the flip-
flop designs and is considered to be a universal flip-flop circuit.
The sequential operation of the JK flip flop is exactly the same as
for the previous SR flip-flop with the same “Set” and “Reset”
inputs. The difference this time is that the “JK flip flop” has no
invalid or forbidden input states of the SR Latch even when S
and R are both at logic “1”.
Both the S and the R inputs of the previous SR bistable have now
been replaced by two inputs called the J and K inputs,
respectively after its inventor Jack Kilby. Then this equates to:
J = S and K = R.
The two 2-input AND gates of the gated SR bistable have now
been replaced by two 3-input NAND gates with the third input
of each gate connected to the outputs at Q and Q’. This cross
coupling of the SR flip-flop allows the previously invalid
condition of S = “1” and R = “1” state to be used to produce a
“toggle action” as the two inputs are now interlocked.
If the circuit is now “SET” the J input is inhibited by the “0” status
of Q’ through the lower NAND gate. If the circuit is “RESET” the
K input is inhibited by the “0” status of Q through the upper
NAND gate. As Q and Q’ are always different we can use them to
control the input. When both inputs J and K are equal to logic
“1”, the JK flip flop toggles as shown in the following truth table.
Also when both the J and the K inputs are at logic level “1” at the
same time, and the clock input is pulsed “HIGH”, the circuit will
“toggle” from its SET state to a RESET state, or visa-versa. This
results in the JK flip flop acting more like a T-type toggle flip-flop
when both terminals are “HIGH”.
When the clock is “LOW”, the outputs from the “master” flip flop
are latched and any additional changes to its inputs are ignored.
The gated “slave” flip flop now responds to the state of its inputs
passed over by the “master” section.
Then, the circuit accepts input data when the clock signal is
“HIGH”, and passes the data to the output on the falling-edge of
the clock signal. In other words, the Master-Slave JK Flip flop
is a “Synchronous” device as it only passes data with the timing
of the clock signal.
Counters
An ‘N’ bit binary counter consists of ‘N’ T flip-flops. If the counter
counts from 0 to 2𝑁 − 1, then it is called as binary up counter.
Similarly, if the counter counts down from 2𝑁 − 1 to 0, then it is
called as binary down counter.
There are two types of counters based on the flip-flops that are
connected in synchronous or not.
Asynchronous counters
Synchronous counters
Asynchronous Counters
If the flip-flops do not receive the same clock signal, then that
counter is called as Asynchronous counter. The output of
system clock is applied as clock signal only to first flip-flop. The
remaining flip-flops receive the clock signal from output of its
previous stage flip-flop. Hence, the outputs of all flip-flops do not
change (affect) at the same time.
No of negative
Q0(LSB) Q1 Q2(MSB)
edge of Clock
0 0 0 0
1 1 0 0
2 0 1 0
3 1 1 0
4 0 0 1
5 1 0 1
6 0 1 1
7 1 1 1
No of negative
Q0(LSB) Q1 Q2(MSB)
edge of Clock
0 0 0 0
1 1 1 1
2 0 1 1
3 1 0 1
4 0 0 1
5 1 1 0
6 0 1 0
7 1 0 0
Synchronous Counters
If all the flip-flops receive the same clock signal, then that
counter is called as Synchronous counter. Hence, the outputs
of all flip-flops change (affect) at the same time.
Shift Register
We know that one flip-flop can store one-bit of information. In
order to store multiple bits of information, we require multiple
flip-flops. The group of flip-flops, which are used to hold (store)
the binary data is known as register.
In this shift register, we can send the bits serially from the input
of left most D flip-flop. Hence, this input is also called as serial
input. For every positive edge triggering of clock signal, the data
shifts from one stage to the next. So, we can receive the bits
serially from the output of right most D flip-flop. Hence, this
output is also called as serial output.
Example
Let us see the working of 3-bit SISO shift register by sending the
binary information “011” from LSB to MSB serially at the input.
Assume, initial status of the D flip-flops from leftmost to
rightmost is Q2Q1Q0=000. We can understand the working of
3-bit SISO shift register from the following table.
No of positive Serial
Q2 Q1 Q0
edge of Clock Input
0 - 0 0 0
1 1(LSB) 1 0 0
2 1 1 1 0
3 0(MSB) 0 1 1(LSB)
4 - - 0 1
5 - - - 0(MSB)
The initial status of the D flip-flops in the absence of clock signal
is Q2Q1Q0=000. Here, the serial output is coming from Q0. So,
the LSB (1) is received at 3rd positive edge of clock and the MSB
(0) is received at 5th positive edge of clock.
Therefore, the 3-bit SISO shift register requires five clock pulses
in order to produce the valid output. Similarly, the N-bit SISO
shift register requires 2N-1 clock pulses in order to shift ‘N’ bit
information.
In this shift register, we can send the bits serially from the input
of left most D flip-flop. Hence, this input is also called as serial
input. For every positive edge triggering of clock signal, the data
shifts from one stage to the next. In this case, we can access the
outputs of each D flip-flop in parallel. So, we will get parallel
outputs from this shift register.
Example
Let us see the working of 3-bit SIPO shift register by sending the
binary information “011” from LSB to MSB serially at the input.
Assume, initial status of the D flip-flops from leftmost to
rightmost is Q2Q1Q0=000. Here, Q2 & Q0 are MSB & LSB
respectively. We can understand the working of 3-bit SIPO
shift register from the following table.
No of positive Serial
Q2(MSB) Q1 Q0(LSB)
edge of Clock Input
0 - 0 0 0
1 1(LSB) 1 0 0
2 1 1 1 0
3 0(MSB) 0 1 1
The initial status of the D flip-flops in the absence of clock signal
is Q2Q1Q0=000. The binary information “011” is obtained in
parallel at the outputs of D flip-flops for third positive edge of
clock.
So, the 3-bit SIPO shift register requires three clock pulses in
order to produce the valid output. Similarly, the N-bit SIPO shift
register requires N clock pulses in order to shift ‘N’ bit
information.
Example
Let us see the working of 3-bit PISO shift register by applying
the binary information “011” in parallel through preset inputs.
Since the preset inputs are applied before positive edge of Clock,
the initial status of the D flip-flops from leftmost to rightmost
will be Q2Q1Q0=011. We can understand the working of 3-bit
PISO shift register from the following table.
No of positive
Q2 Q1 Q0
edge of Clock
0 0 1 1(LSB)
1 - 0 1
2 - - 0(LSB)
Here, the serial output is coming from Q0. So, the LSB (1) is
received before applying positive edge of clock and the MSB (0)
is received at 2nd positive edge of clock.
Therefore, the 3-bit PISO shift register requires two clock pulses
in order to produce the valid output. Similarly, the N-bit PISO
shift register requires N-1 clock pulses in order to shift ‘N’ bit
information.
Example
Let us see the working of 3-bit PIPO shift register by applying
the binary information “011” in parallel through preset inputs.
Since the preset inputs are applied before positive edge of Clock,
the initial status of the D flip-flops from leftmost to rightmost
will be Q2Q1Q0=011. So, the binary information “011” is
obtained in parallel at the outputs of D flip-flops before applying
positive edge of clock.