Professional Documents
Culture Documents
Module -3
Flip-Flops
and its Applications
Topic Section
Basic Bistable elements 6.1
Latches 6.2
The master-slave flipflops (pulse-triggered flip-flops): 6.4
o SR flip-flops 6.41,6.42
o JK flip-flops
D FF, T FF
Characteristic equations 6.6
Registers 6.7
binary ripple counters 6.8.1
synchronous binary counters 6.8.2
(Text 2 - Chapter 6)
2. Donald D. Givone, ―Digital Principles and Design, McGraw Hill, 2002.
Introduction
Combinational and Sequential Circuits
The two types of Digital circuits depend on their output and memory used:
(i) Combinational circuit: Consists of logic gates whose outputs at any time are determined
from only the present combination of inputs and they have no memory. The output at
any time is a direct function of the applied external inputs as shown in Fig.3.1.
(ii) Sequential circuit: Consists of logic gates whose outputs at any time are determined
from both the present combination of inputs and previous output. That means
sequential circuits use memory elements to store the value of previous output. The
block diagram of sequential circuit is shown in Fig.3.2
The output depends only on the The output depends upon both present
present input and there is no need input and present state (previous output),
for feedback for input and output, so memory element is required to save
1 so memory element is not required. the feedback state.
2 It is easier to design, use and It is not easier to design, use and handle
Storage Elements:
Generally, there are two types of storage elements used: Latches, and Flip-Flops.
Storage elements that operate with signal levels (rather than signal transitions) are
referred to as Latches.
Storage elements that are controlled by a clock transition are called Flip-Flops.
Observation:
1. The two outputs are always complementary.
2. The circuit has 2 stable states.
Flip-Flop :
Flip-flop is a basic digital memory circuit, which stores one bit of information. A flip-flop is a
bistable device with inputs, that remains in a given state as long as power is applied and until
input signals are applied to cause its output to change. It consists of a basic bistable element
in which appropriate logic is added in order to control its state.
The process of storing a 1 into a flip-flop is called Setting or Presetting the flip-flop; while the
process of storing a 0 into a flip-flop is called Resetting or Clearing the flip-flop.
The inputs to a flip-flop are of two types. An asynchronous or direct input is one in which a
signal change of sufficient magnitude and duration essentially produces an immediate change
in the state of the flip-flop. On the other hand, a synchronous input does not immediately
affect the state of the flip-flop, but rather affects the state of the flip-flop only when some
control signal, usually called an enable or clock input, also occurs.
Flip flops are the fundamental blocks of most sequential circuits. Flip-flops are used as
memory elements in sequential circuit. It is also known as a bistable multivibrator or a binary
or one-bit memory.
NO FLIP-FLOP LATCH
Flip-flop is a bistable device. It has two Latch is also a bistable device whose
1 stable states represented as 0 and 1. states are represented as 0 and 1.
It checks the inputs but changes the It checks the inputs continuously and
output only at times defined by the responds to the changes in inputs
2 clock signal or any other control signal. immediately.
7 Flip-flop always have a clock signal Latches doesn’t have a clock signal
8 Flip-flop can be built from Latches Latches can be built from gates
3.2 Latches
The storage devices called latches form one class of flip-flops. This class is characterized by
the fact that the timing of the output changes is not controlled. That is, the output
essentially responds immediately to changes on the input lines, although a special control
signal, called the enable or clock might also need to be present. Thus, the input lines are
continuously being interrogated
In the function table shown in Fig 3.4 (b), Q denotes the present state of the latch. Q is the
state of the device at the time the input signals are applied. The response of the latch at the
Q and 𝑄̅ output terminals as a consequence of applying the various inputs is denoted by Q+
and 𝑄̅+, respectively. Thus, Q+ is called the next state of the latch. SR latch using NOR gates is
an active high input SR latch.
Inputs Outputs
S R Q+ 𝐐 ̅+
0 0 Q ̅
Q
0 1 0 1
1 0 1 0
1 1 0* 0*
*Unpredictable behaviour
will result if inputs return
Fig. 3.4 (a)
to 1 simultaneously
Fig 3.4 (b)
Working of SR Latch
Case 1:
When S = R = 0, the output remains in previous state i.e. it holds the previous data as shown
in first row of the function table given in below Fig 3.4 (b)
Case 2:
When S=0 and R=1, the latch will be in RESET state. Because the high input of NOR gate with
R input drives the other NOR gate with 0, as its output is 0. So both the inputs of the NOR
gate with S input are 0. This will cause the output of the latch to settle in RESET state (Q+=0).
Fig 3.5
Case 3:
When S=1 and R=0, then the latch will be in SET state (Q+=1). The low input of NOR gate
with S input drives the other NOR gate with 1, as its output is 1. So both the inputs of the
NOR gate with R input are 1. This will cause the output of the latch to settle in SET state as
shown in Fig. 3.6.
Fig.3.6
Case 4:
When both the S = R = 1, the latch will be in undefined state. The high inputs of S and R,
violates the rule that the outputs should complement to each other. So the latch is in
undefined state (or forbidden state). The output of SR latch for various input conditions is
shown in Fig. 3.7
Fig. 3.7
The problem with simple SR latch is that they are level sensitive, which makes them a
transparent device. In order to avoid this, Gated or Clocked SR flip – flops are used. Clock
signal makes the device edge sensitive (and hence no transparency).
Working
Case 1:
When S̅ = R
̅ = 1, then the output remains in previous state i.e. it holds the previous data.
Case 2:
When S̅ = 1 and R̅ =0, then the latch will be in RESET state. The low input of NAND gate with
̅
R input drives the other NAND gate with 1, as its output is 1. So both the inputs of the NAND
gate with S̅ input are 1. This will cause the output of the latch to settle in RESET state.
Case 3:
When S̅ =0 and R ̅ = 1, then the latch will be in SET state. Because the low input of NAND
gate with S̅ input drives the other NAND gate with 1, as its output is 1. So both the inputs of
the NAND gate with R input are 1. This will cause the output of the latch to settle in SET
state.
Case 4:
When both the 𝑆̅ = 𝑅̅ = 0, then the latch will be in undefined state. The low inputs of 𝑆̅ and
𝑅̅, violates the rule that the outputs should compliment to each other. So the latch is in
undefined state (or forbidden state).
Ex:1 For the given value of S and R inputs in Fig 3.9, plot Q and 𝑄̅
Fig. 3.9
For example, in this bouncing period of the signal, the fluctuations in the output voltage are
very high and therefore the register counts several inputs instead of single input. To
eliminate this kind of behavior of digital circuits, we use SR flip – flops.
For interfacing keys to the digital systems, usually push bottom keys are used. These push
button keys when pressed bounces a few times, closing and opening the contacts before
providing a steady reading, as shown in the Fig. (a). Reading taken during bouncing period
may be faulty. This problem is known as key debounce. The problem of key debounce is
undesirable and it must be avoided.
One way to avoid key debounce problem is to use SR latch. The circuit used to avoid
keybounce with SR latch is called a switch debouncer. The Fig. (b) shows the switch
debouncer circuit and its waveforms. When key is at position A, the output of SR latch is
logic 1, and when key is at position B, the output of SR latch is logic 0. It is important to note
that, when key is in between A and B, SR inputs are 00 and hence output does not change,
preventing debouncing of key output. In other words, we can say that the output does not
change during transition period, eliminating key debounce.
The Gated SR Latch The inputs for both the SR latch and the S’R’ latch are asynchronous (or
direct). That is, a change in value of these inputs causes an immediate change of the
outputs. It is frequently desirable to prevent input activation signals from affecting the state
of the latch immediately, but rather to have the effect occur at some desirable time or
alternatively, to allow the input changes to be effective only during a prescribed period of
time. For these situations, a gated SR latch is used. The gated SR latch is also called an SR
latch with enable. A gated SR latch is shown in below Fig. It consists of the SR latch along
with two additional nand-gates and a control input, C, referred to as the enable, gate, or
clock input. The enable input, C, determines when the S and R inputs become effective. As
shown by truth table, the circuit behaves like a SR latch when EN = 1, and retains its
previous state when EN= 0.
Inputs Outputs
S R C Q+ 𝐐̅+
0 0 1 Q ̅
Q
0 1 1 0 1
1 0 1 1 0
1 1 1 1* 1*
(a) x x 0 Q ̅
Q
Unpredictable behaviour will result if inputs
return to 1 simultaneously or C returns to 0
while S and R are 1
(b)
Inputs Outputs
D C Q+ ̅+
𝐐
0 1 0 1
1 1 1 0
X 0 Q ̅
𝐐
(C)
Working :
In the above figure ,we have a Gated SR Latch implemented using NAND gates.NAND implementation is used
because will take less number on transistors.
The D input is given to S and D_bar ( ie.,NOT D) is given to R.Here we will not have the problem of latch going
to forbidden state (ie., S=1 and R=1)
because inputs to this latch is reversed (ie., in SR latch first input is R and second is S but here it is reversed).
Lets Assume some value for the output Q (ie., 0 here) and proceed with it working.
Table :
Outputs for all combination of inputs and assumed values of Q.
A convenient way of showing the terminal behavior of a flip-flop is the timing diagram. A
timing diagram is a graph that depicts the input and output transitions of a flip-flop as a
function of time. Propagation Delays The propagation delay is the time it takes a change in
an input signal to produce a change in an output signal. In general, the propagation delay
between each pair of input and output terminals is different, as well as whether the
change causes the output to go from low to high, i.e., from 0 to 1 in positive logic, or from
high to low, i.e., from 1 to 0 in positive logic. The various propagation delays of a flip-flop
are specified by the manufacturer. Propagation delays in an SR latch are illustrated in
fallowing figure. This figure shows the effect of first setting and then resetting an SR latch.
It should be noted that the outputs do not change instantaneously to an input change nor
do the outputs change simultaneously. tpLH = the propagation delays from low to high,
i.e., from 0 to 1 in positive logic. tpHL= the propagation delays from high to low, i.e., from
1 to 0 in positive logic. tpLH and tpHL are, in general, different as well as whether the Q or
𝑄 ̅ output terminals are being viewed.
The propagation delay is the time it takes a change in an input signal to produce a change in an
output signal.
• Propagation delay from low to high: 𝑡𝑝𝐿𝐻
• Propagation delay from high to low: 𝑡𝑝𝐻
Figure below shows the outputs of an SR latch as various signal values are applied to the S and R
inputs. For simplicity, the finite slopes of the rising and falling edges of the signals are not shown and
the propagation delays are assumed to be all equal. It should be noted in the figure that when S = R
= 1, both the Q and 𝑄 ̅ outputs become 0.
In addition, special attention should be given to the response of the latch at time t15. Here it is
assumed that the signals on the S and R input terminals are simultaneously changed from 1 to 0. As
a consequence, the response of the latch is unpredictable as indicated by the shaded area.
The latch may be in its 0-state, 1-state, or metastable state. At time t16, however, the application of
the 1 on the set input terminal returns the latch to predictable behavior after a short propagation
delay time.
Inputs Outputs
S R Q+ 𝐐̅+
0 0 Q ̅
Q
0 1 0 1
1 0 1 0
1 1 0* 0*
Fig 3.
Fig 3.
Fig. 3.
In accordance with the function table, and as illustrated in the figure, the Q-
output of the latch follows the input signal at the D terminal whenever the
enable signal, C, is 1. Whenever the enable signal is 0, changes at the D
terminal are ignored and the Q-output retains the state of the latch just prior to
the l to 0 change in the enable signal.
To achieve this operation of a gated latch, constraints are normally placed on
the time intervals between input changes.
Consider times t3, t6, t11, and t14, at these times the enable signal t is returned to
0, causing the output to latch onto its current state.
However, to guarantee this latching action, a constraint is placed upon the D
signal for some minimum time before and after the enable signal goes from 1 to
0. This is shown as the shaded areas in above figure.
For proper operation, the D signal must not change during this period. The
minimum time the D signal must be held fixed before the latching action, tsu is
called the setup time; while the minimum time the D signal must be held fixed
after the latching action, th, is called the hold time.
Failure to satisfy the setup time and hold time constraints can result in
unpredictable output behavior, including metastability. This is illustrated in
following figure, where unpredictable behavior occurs when latching is
attempted at time t12 since the signal on the D line changed at time t11, which is
assumed to have occurred within the setup time of the gated D latch.
Setup and hold time constraints are very important properties when
considering the behavior of all types of flip-flops.
Fig
JK and T Flip-Flops
A JK flip-flop is a refinement of the RS flip-flop in that the indeterminate state of the RS type
is defined in the JK type. Inputs J and K behave like inputs Sand R to set and clear the flip-
flop, respectively. The input marked J is for set and the input marked K is for reset. When
both inputs J and K are equal to 1, the flip-flop switches to its complement state, that is, if Q
= 1, it switches to Q = 0, and vice versa.
A JK flip-flop constructed with two cross-coupled NOR gates and two AND gates is shown
in Fig. 6-6(a). Output Q is ANDed with K and CP inputs so that the flip-flop is cleared during
a clock pulse only if Q was previously 1. Similarly, output Q' is ANDed with J and CP inputs
so that the flop-flop is set with a clock pulse only when Q' was previously 1. When both J and
K are 1, the input pulse is transmitted through one AND gate only: the one whose input is
connected to the flip-flop output that is presently equal to 1.
Thus, if Q = 1, the output of the upper AND gate becomes 1 upon application of the clock
pulse, and the flip-flop is cleared. If Q' = 1, the output of the lower AND gate becomes 1 and
the flip-flop is set. In either case, the output state of the flip-flop is complemented. The
behavior of the JK flip-flop is demonstrated in the characteristic table of Fig. 6-6(b).
It is very important to realize that because of the feedback connection in the JK flipflop, a CP
pulse that remains in the 1 state while both J and Kare equal to 1 will cause the output to
complement again and repeat complementing until the pulse goes back to 0.
A JK flip-flop has two inputs similar to that of RS flip-flop. We can say JK flip-flop is a
refinement of RS flip-flop. JK means Jack Kilby, a Texas instrument engineer who
invented IC. The two inputs of JK Flip-flop is J (set) and K (reset). A JK flip-flop is nothing
but a RS flip-flop along with two AND gates which are augmented to it.
The flip-flop is constructed in such a way that the output Q is ANDed with K and CP. This
arrangement is made so that the flip-flop is cleared during a clock pulse only if Q was
previously 1. Similarly Q’ is ANDed with J and CP, so that the flip-flop is cleared during a
clock pulse only if Q’ was previously 1.
When J=K=0
When both J and K are 0, the clock pulse has no effect on the output and the output of
the flip-flop is the same as its previous value. This is because when both the J and K are
0, the output of their respective AND gate becomes 0.
When J=0, the output of the AND gate corresponding to J becomes 0 (i.e.) S=0 and R=1.
Therefore Q’ becomes 0. This condition will reset the flip-flop. This represents the RESET
state of Flip-flop.
In this case, the AND gate corresponding to K becomes 0(i.e.) S=1 and R=0. Therefore Q
becomes 0. This condition will set the Flip-flop. This represents the SET state of Flip-flop.
When J=K=1
Consider the condition of CP=1 and J=K=1. This will cause the output to complement
again and again. This complement operation continues until the Clock pulse goes back
to 0. Since this condition is undesirable, we have to find a way to eliminate this
The characteristic table explains the various inputs and the states of JK flip-flop.
T flip-flops are similar to JK flip-flops. T flip-flops are single input version of JK flip-flops.
This modified form of JK flip-flop is obtained by connecting both inputs J and K together.
This flip-flop has only one input along with Clock pulse. These flip-flops are called T flip-
flops because of their ability to complement its state (i.e.) Toggle. So they are called as
Toggle flip-flop.
When T=1 and CP=1, the flip-flop complements its output, regardless of the present
state of the Flip-flop. In this case the next state is the complement of the present state.
When T=0, there is no change in the state of the flip-flop (i.e.) the next state is same as
the present state of the flip-flop. From the characteristic table and characteristic
equation it is quite evident that when T=0, the next sate is same as the present state.
Applications Of Flip-Flops
• Counters
• Frequency Dividers
• Shift Registers
• Storage Registers
These are the various types of Flip-flops which are being used in Digital
electronic circuits and the applications of Flip-flops are as specified above.
To avoid this undesirable operation, the clock pulse must have a time duration that is
shorter than the propagation delay time of the flip-flop. This is a restrictive requirement,
since the operation of the circuit depends on the width of the pulse. For this reason, JK flip-
flops are never constructed as shown in Fig. 6-6(a). The restriction on the pulse width can be
eliminated with a master-slave or edge-triggered construction, as discussed in the next
section. The same reasoning applies to the T flip-flop.
The latches have the common property of immediate output responses (to
within the propagation delay times) while enabled caused by changes on the
information input lines, i.e., the S, R, and D lines. This property is referred to as
transparency. In certain applications, this is an undesirable property. Rather, it
is necessary that the output changes occur only coincident with changes on a
control input line. This is particularly the case when it is necessary to sense the
current state of a flip-flop while simultaneously allowing new state information
to be entered as determined by the information lines. The property of having
the timing of a flip-flop response being related to a control input signal is
achieved with master-slave and edge-triggered flip-flops. A master-slave flip-
flop consists of two cascaded sections, each capable of storing a binary symbol.
The first section is referred to as the master and the second section as the
slave. Information is entered into the master on one edge or level of a control
signal and is transferred to the slave on the next edge or level of the control
signal. In its simplest form, each section is a latch.
(a)
(b)
Fig.3.
The transition of the control signal from its low to high value, i.e., 0 to 1 in
positive logic, is called the rising, leading, or positive edge of the control signal;
while the transition of the control signal from its high to low value, i.e., 1 to 0
in positive logic, is called the falling, trailing, or negative edge of the control
signal. As long as C = 0 the master, being a gated SR latch, is disabled and any
changes on the S and R input lines are ignored. At the same time, the slave is
enabled due to the presence of the inverter. Hence, the slave is in the same
state as that of the master since the QM and 𝑄 ̅M outputs of the master are
Connected to the S and R inputs, respectively, of the slave. As the control
signal starts to rise, the slave is disabled, by design, at time t1; while the
master remains disabled. Thus, the slave becomes disconnected from the
master but retains the state of the master. The control signal continues to rise,
and it is at time t2 that the master is enabled. While C = 1; the master, being a
gated SR latch, responds to the inputs on the S and R lines, Meanwhile, since
the slave is disabled due to the presence of the inverter, any changes to the
state of the master are not reflected to the slave.
The control signal is subsequently returned to its low level at time t3. At this
time, the master is disabled, causing it to latch onto its new state. However, it
is not until time t4 that the slave is enabled. This results in the slave taking on
the state of the master as the connection is made. It is important to note that
for very short periods during the rising and falling edges of the control signal
both the master and slave latches are disabled. This is critical to the operation
of a master-slave flip-flop. It should be observed that although the master can
change its state (and, correspondingly, its output) at any time while the control
signal is 1, it is only as the control signal goes from 1 to O that the slave
changes its state. Thus, the output change of the master-slave flip-flop is
synchronized to the falling edge of the control signal.
Fig.3.
(a)
Fig 3.
The master of the master-slave JK flip-flop, being a latch, is enabled during the entire
period the control signal is 1.
O's Catching:
If the slave latch is in its 1-state, then a logic-1 on the K input line while the
control signal is 1 causes the master latch to reset. This subsequently results in the
slave becoming reset when the control signal returns to 0. An example of this occurred
during the second clock pulse in Fig. 3.15. This behavior is known as O's
catching.
[It should be noted that once the master latch is reset by a logic-1 signal on
the K input line, a subsequent logic-1 signal on the J input line during the same period
in which C = 1 does not cause the master to again become set. This is due to the
fact that since the slave does not change its state until C returns to 0, the feedback
signal from the slave, i.e., Qs = 0, keeps the output of the J-input and-gate at logic-0.]
1 's Catching
If the slave is storing a O, then a logic-1 on the J input line while the control signal is
1 causes the master latch to be set, which subsequently results in the setting of the
slave upon the occurrence of the falling edge of the control signal. This behavior
occurred during the third clock pulse in Fig. 3.15 and is known as l's catching.
(a) (b)
Fig. 3. Master-slave D flip-flop. (a) Logic diagram using a master-slave SR flipflop.
(b) Two logic symbols.
Having designed the system, our next step is to verify its functionality by
using an SR-to-D verification table as shown in Figure 6
Figure 6: Comparison between an SR-to-D verification table and the truth table of D flip-flop
From the verification table shown in Figure 6, it is evident that the entries in its first,
second, and sixth columns (shaded in beige) are identical to the entries found in the
truth table of the D flip-flop. This indicates that the system designed using the given
SR flip-flop will behave exactly as a D flip-flop.
Another type of master-slave flip-flop is shown in Fig. below, where the J and K
input· terminals are tied together so that T = J = K. In this case the flip-flop
changes state, or toggles, with each control pulse if T = 1 and retains its current
state with each control pulse if T = 0. This is called a master-slave T flip-flop.
The function table of the master-slave T flip-flop and its logic symbols are given
in below Fig.
Figure 3.23 Positive-edge-triggered Tflip-flop. (a) Logic diagrams. (b) Function table where
Q+ denotes the output Q in response to the inputs. (c) Two logic symbols.
a) SR Flip Flop
Step 1: Derive the Next State table Step 2: K-Map to derive
characteristic equation
b) JK Flip Flop
Step 1: Derive the Next State table Step 2: K-Map to derive
characteristic equation
c) D Flip Flop
Q+ =D
d) T Flip Flop
REGISTERS
A register is simply a collection of flip-flops taken as an entity. The basic
function of a register is to hold information within a digital system so as to
make it available to the logic elements during the computing process.
A flip-flop can store 1-bit information. So an n-bit register has a group of n flip-
flops and is capable of storing any binary information/number containing n-bits.
Since a register consists of a finite number of flip-flops and since each flip-flop
is capable of storing a 0 or a 1 symbol, there are only a finite number of 0-1
combinations that can be stored in a register. Each of these combinations is
known as the state or content of the register.
Registers that are capable of moving information position wise upon the
occurrence of a clock signal are called shift registers. These registers are
normally classified by whether they can move the information in one or two
directions, i.e., unidirectional or bidirectional.
The manner in which information is entered into and outputted from a register is
another way in which they are categorized. There are two basic ways in which
these transfers are done: serially or in parallel.
When information is transferred in a parallel manner, all the 0-1 symbols that
comprise the information are handled simultaneously as an entity in a single
unit of time. Such information transfers require as many lines as symbols being
transferred.
On the other hand, the serial handling of information involves the symbol-by-
symbol availability of the information in a time sequence. These information
transfers only require a single line to perform the transfer.
Thus, there are four possible ways registers can transfer information: serial-in/
serial-out, serial-in/parallel-out, parallel-in/parallel-out, and parallel-in/serial-
out.
The control inputs of all the flipflops are connected together to a common
synchronizing signal called the clock. Thus, upon the occurrence of a positive
edge of the clock signal, the content of each flip-flop is shifted one position to
the right.
The content of the leftmost flip-flop after the clock signal depends upon the
signal value on the serial-data-in line, and the content of the rightmost flip-flop
prior to the clock signal is lost. The output from the shift register occurs at the
rightmost flip-flop on the serial-data-out line.
For the register of Fig: 6.26, if the initial content of the four flip-flops is 1011
and a logic-0 is applied to the serial-data-in line prior to the positive edge of the
clock signal, then the content of the register becomes 0101 after the positive
edge of the clock signal. The signal value that is shifted in, i.e., the logic-0,
becomes available as an output on the serial-data-out line after four clock
pulses.
In some applications, the information within a register must be preserved, but
only a reorientation of the information is desired. To achieve this, the serial-
data-out line of Fig. 6.26 is connected to the serial-data-in line.
In this way the content of the register is again shifted one position to the right
upon the occurrence of each clock signal, but the state of the leftmost· flip-flop
is replaced by the state of the rightmost flip-flop;
For example; again, assume the initial content of the register is 1011, but the
output of the rightmost flip-flop is connected to the input of the leftmost flip-
flop; Then after the occurrence of the positive edge of the clock signal, the
register contains 1101. Shift registers having this type of connection are called
circular shift registers.
Shift registers use edge triggered or pulse-triggered, i.e., master-slave, flip-
flops. Latches are not appropriate in such an application since their outputs are
subject to changes during the entire period in which they are enabled.
into the register, i.e., serial in, the information is available as a single entity, i.e.,
parallel out, at the flip-flop output terminals.
Since information is transferred into this register serially and, after an
appropriate number of shifts, made available in parallel, this type of register
provides for the serial-to-parallel conversion of information.
Each of these operations is the result of the occurrence 0f a positive edge on the
clock line. In addition, the register̅̅ is cleared asynchronously if a logic-0 is
applied to the line labeled 𝐶𝐿𝐸𝐴𝑅̅. ̅ ̅
As an illustration of the operation of the universal shift register, according to the
table in Fig. 6.29b the register performs the shift-right operation when the logic
values on the select lines S1S0 of the multiplexers are 01.
Under this condition the I1 input of each multiplexer is connected to its f output.
Thus, as seen in Fig. 6.29a, the input to the leftmost D flip-flop is the signal on
the serial-input-for-shift-right line, the input to the second leftmost D flip-flop is
the output of the leftmost D flip-flop, the input to the third leftmost D flip-flop
is the output of the second leftmost D flip-flop, and the input to the fourth
leftmost D flipflop is the output of the third leftmost D flip-flop.
Upon the occurrence of the positive-edge signal on the clock line, the register
shifts its content one position to the right. The remaining three register
operations listed in Fig. 6.29b are easily verified in a similar manner. A symbol
for the universal shift register is given in Fig. 6.29c.
COUNTERS
Counter is a sequential circuit which is used for counting pulses. Counter is the
widest application of flip-flops. It is a group of flip-flops with a clock signal
applied. Counters are of two types. Asynchronous or ripple counters and
Synchronous counters.
Depending on the way in which the counting progresses, the synchronous or
asynchronous counters are classified as follows −Up counters, Down counters
and Up/Down counters
A counter is another example of a register. Its primary function is to produce a
specified output pattern sequence. For this reason, it is also a pattern generator.
This pattern sequence might correspond to the number of occurrences of an
event or it might be used to control various portions of a digital system. In this
latter case, each pattern is associated with a distinct operation that the digital
system must perform.
As in the case of a register, each of the 0-1 combinations that are stored in the
collection of flip-flops that comprise the counter, i.e., the output pattern, is
known as a state of the counter. The total number of states is called its modulus.
The input to the counter is a count enable signal and a series of count pulses
applied to the flip-flop associated with the lowest-order binary digit. In this
Module 3/RNSIT/ECE Page 33
Digital System Design (18EC34)
way, as long as the count enable signal is logic-1, the Q0 flip-flop changes state
on each positive edge of a count pulse.
In addition, when the Q1 flip-flop changes its state, the Q2 flip-flop is toggled by
the logic-0 to logic-1 transition appearing at the Q1-output terminal. The counter
now stores the binary number 0100.
The binary counting sequence continues until the count 1111 is reached. At that
time, a count pulse causes the Q0 flipflop to return to its 0-state. This, in turn,
causes the Q1 flip-flop to return to its 0-state. A consequence of this change
causes the Q2 flip-flop to return to its 0-state and, finally, this change returns the
Q3 flip-flop to its 0-state.
Thus, the state of the counter becomes 0000. If any further count pulses are
applied to the counter, then it repeats its counting sequence.
This counter is known as a ripple counter since a change in state of the Qi-1 flip-
flop if used to toggle the Qi flip-flop. Thus, the effect of a count pulse must
ripple through the counter.
Ripple counters are also referred to as asynchronous counters. Recalling there
is a propagation delay between the input and output of a flip-flop, this rippling
behavior affects the overall time delay between the occurrence of a count pulse
and when the stabilized count appears at the output terminals. The worst case
occurs when the counter goes from its 11…1-state to 00…0 state since toggle
signals must propagate through the entire length of the counter.
For an n-stage binary ripple counter, the worst-case settling time becomes n x
tpd where tpd is the propagation delay time associated with each flip-flop.
1. All flip flops are triggered with same Different flip flops are triggered with
clock simultaneously. different clock, not simultaneously.
4.
Also called Parallel Counter. Also called Serial Counter.
logic-1 is placed on the load enable line, regardless of the signal value on the
count enable line; then the signal values on the data input lines, i.e., D0, D1, D2,
and D3, are entered into the four flip-flops of the counter upon the occurrence
of the positive edge of the count pulse.
If alogic-0 is applied to the load enable line and a logic-1 is applied to the count
enable line, then the network of Fig. 6.34a behaves as a binary up-counter in the
same way as the counter of Fig. 6.33.
Finally, a logic-0 applied to both the load enable and count enable lines causes
the count pulses to be ignored and the counter to retain its current state since
logic-0's appear at the J and K terminals of each flip-flop.
A symbol for the counter of Fig; 6.34a is given in Fig. 6.34b.
Figure 6.35a shows how the counter of Fig. 6.34a is converted to function as a
mod-10, i.e., decimal, counter having the counting sequence given in Fig. 6.35b.
The normal counting sequence for the counter of Fig. 6.34a is that of a 4-bit
binary up-counter when enabled with a logic-1 on the count enable input. To
limit the counting sequence to the first 10 binary numbers, an and-gate is used
to detect the count of 1001.
Starting from the 0000 state, the first occurrence of Q0 = Q3 = 1 causes the
output of the and-gate to be logic-1. Since the load function takes precedence
over the count function, by connecting the and-gate output to the load enable
input the counter is loaded with 0000, i.e., the values on the Di inputs, upon the
next occurrence of a positive edge of a count pulse. In this way, the counting
sequence is 0000, 0001, ...., 1001, 0000, etc.
Also incorporated into the counter of Fig. 6.34a is a carry output, CO, in which
a logic-1 appears whenever the counter state is 1111 and the counter is in its
count mode, i.e., when the count enable signal is logic-1 and the load enable
signal is logic-0.
Sequential circuits:
Now, these are types and classifications of Sequential circuits.
Types of Sequential circuits:
The sequential circuits can be event driven, clock driven and pulse driven. There are two
main types of sequential circuits: (a) Synchronous and (b) Asynchronous.
(a). Asynchronous Sequential circuits –
Asynchronous circuits do not synchronize with positive edge or negative edge of the
clock signal, that means, the outputs of asynchronous sequential circuits do not
change or affect at the same time and change their state immediately when there is a
change in the input signal. So, these circuits are faster and independent of the internal
clock pulses. But these circuits have uncertainty in the outputs and are difficult to
design.