Flip Flop Counters PDF
Flip Flop Counters PDF
JK flip – flop is named after Jack Kilby, the electrical engineer who invented IC.
A JK flip – flop is called a Universal Programmable flip – flop because, using its inputs J, K
Preset and Clear, function of any other flip – flop can be imitated.
A JK flip – flop is the modification of SR flip – flop with no illegal state. In this the J input is
similar to the SET input of SR flip – flop and the K input is similar to the RESET input of SR
flip – flop.
The design of the JK flip – flop is such that the three inputs to one NAND gate are J, clock
signal along with a feedback signal from Q’ and the three inputs to the other NAND are K,
clock signal along with a feedback signal from Q. This arrangement eliminates the
indeterminate state in SR flip – flop.
Truth Table
Operation
Case 1 : When both the inputs J and K are LOW, then Q returns its previous state
value i.e. it holds the previous data.
When we apply a clock pulse to the J K flip flop and the J input is low(0) then irrespective of
the other NAND gates, the NAND gate-1 output becomes HIGH(1). In the same manner, if
the K input is low(0) then output of NAND gate-2 is also HIGH(1). So thus the output
remains in the same state i.e. no change in the state of flip flop.
Case 2 : When J is LOW and K is HIGH, then flip flop will be in Reset state i.e. Q
= 0, Q’ = 1.
When we apply a clock pulse to the J K flip flop and the inputs are J is low and K is high the
output of the NAND gate connected to J input becomes 1. Then Q becomes 0. This will reset
the flip flop again to its previous state. So the Flip flop will be in RESET state.
Case 3 : When J is HIGH and K is LOW, then flip – flop will be in Set state i.e. Q
= 1, Q’ = 0
When we apply a clock pulse to the J K flip flop and the inputs are J is high and K is low the
output of the NAND gate connected to K input becomes 1. Then Q’ becomes 0. This will set
the flip flop with the high clock input. So the Flip flop will be in SET state.
Case 4 : When both the inputs J and K are HIGH, then flip – flop is in Toggle
state. This means that the output will complement of the previous state.
Truth Table
The truth table of JK flip – flop is shown below.
1. We can avoid the Race around condition by setting up the clock-on time less than the
propagation delay of the flip flop. It can be achieved by edge triggering.
2. By making the flip flop to toggle over one clock period. This concept is introduced in
Master Slave J K flip flop.
Construction
A master slave JK flip – flop is a cascaded combination of two SR flip – flops with the
feedbacks from output of the slave to the input of the master. The circuit of master – slave
flip – flop is shown below
Positive clock pulses are applied to the master flip flop and they are inverted before applying
to slave i.e. master flip – flop is active during positive transition while slave flip – flop is
active during negative transition. During the positive edge of the clock, the data from inputs J
and K are passed to the master flip – flop and are held there till the occurrence of negative
edge transition of the clock. Then the data or information is passed to the slave flip – flop,
here the output is collected.
The symbolic representation of a master – slave JK flip – flop with two JK flip – flops is
shown below.
The truth table of master – slave JK flip – flop along with preset and clear inputs is shown
below.
When the clock input is low, and the two inputs of master flip flop i.e. J and K inputs will
have no effect on the output of Master Slave flip flop.
Timing Diagram
The width of the input pulse may be less or more than the propagation delay of the flip flop, it
doesn’t affect the output state. But the value of J and K inputs at the instance of positive edge
of clock will affect the output state of master – slave flip – flop provided the setup and hold
time are not violated.
Applications
JK flip – flops are one of the most widely used flip – flops in digital electronics. This is
because of their universal programmable feature.
Some of the applications of JK flip – flop include
• Shift Registers
• Frequency Dividers
• Switching Applications
• Parallel Data Transfer
• Serial Data Transfer
• Binary Counter
• Sequence Detector
T flip – flop is also known as “Toggle Flip – flop”. To avoid the occurrence of intermediate
state in SR flip – flop, we should provide only one input to the flip – flop called Trigger input
or Toggle input (T). Then the flip – flop acts as a Toggle switch. Toggling means ‘Changing
the next state output to complement of the present state output’.
We can design the T flip – flop by making simple modifications to the JK flip – flop. The T
flip – flop is a single input device and hence by connecting J and K inputs together and giving
them with single input called T we can convert a JK flip – flop into T flip – flop. So a T flip –
flop is sometimes called as single input JK flip – flop.
The logic symbol of T flip – flop is shown below. It has one Toggle input (T) & one clock
signal input (CLK).
Construction
T flip – flop can be constructed by modifying D flip – flop. In D flip – flop, the output
QPREV is XORed with the T input and given at the D input. The circuit of a T flip – flop
constructed from a D flip – flop is shown below.
The simplest of the constructions of a D flip – flop is with JK flip – flop. The J input and K
input of the JK flip – flop are connected together and provided with the T input. The logic
circuit of a T flip – flop constructed from a JK flip – flop is shown below.
Working
T flip – flop is an edge triggered device i.e. the low to high or high to low transitions on a
clock signal of narrow triggers that is provided as input will cause the change in output state
of flip – flop.
As mentioned earlier, T flip – flop is an edge triggered device. For example, consider a T flip
– flop made of NAND SR latch as shown below.
If the output Q = 0, then the upper NAND is in enable state and lower NAND gate is in
disable condition. This allows the trigger to pass the S inputs to make the flip – flop in SET
state i.e. Q = 1.
If the output Q = 1, then the upper NAND is in disable state and lower NAND gate is in
enable condition. This allows the trigger to pass the R inputs to make the flip – flop in
RESET state i.e. Q =0.
When the T input is low, then the next sate of the T flip flop is same as the present state.
When the T input is high and during the positive transition of the clock signal, the next state
of the T flip – flop is the inverse of present state.
As each incoming trigger alternately changes the set and reset inputs, the flip – flop toggles.
So to complete one full cycle of output wave form it need two triggers. This means that the T
flip flop produces the output at exactly half of the frequency of input frequency. So a T flip –
flops will act as “Frequency Divider Circuit”.
The main disadvantage of T flip – flop is that the state of the flip – flop at an applied trigger
pulse is known only when the previous state is known.
Generally, T flip flops are not available as ICs. So they can be constructed by using JK flip –
flop and SR flip – flop and D flip – flop. The symbol of T flip – flop made from JK flip – flop
is shown below.
Applications
Introduction to Counters
Like shift registers and other combinational circuits, there is another important element in
digital electronics which we use most. They are counters. Counters are used not only for
counting but also for measuring frequency and time ; increment memory addresses .
Counting means incrementing or decrementing the values of an operator, with respect to its
previous state value. So to perform the mathematical operation we use no devices other than
counters. We cannot perform this action (counting) with any other logic devices rather than
counters.
Types of counters
There are two types of counters available for digital circuits, they are
1. Synchronous counters
2. Asynchronous counters
Synchronous counters
The counters which use clock signal to change their transition are called “Synchronous
counters”. This means the synchronous counters depends on their clock input to change state
values. All flip flops in the synchronous counters are triggered by same clock signal.
Features:
Their construction is very simple in design. All the flip flops are interconnected and will
be driven by same clock signal.
The state output of the previous flip flop determines the state change of the present flip
flop.
As all the flip flops will work synchronously, the synchronous counters don’t require
settling.
We require number of logic gates to implement the synchronous counters.
Their operation is fast.
Asynchronous counters
Definition: The counters in which the change in transition doesn’t depend upon the clock
signal input is known as “Asynchronous counters”. In these counters, the first flip flop is
connected to the external clock signal, and the rest are clocked by the state outputs (Q & Q’)
of the previous flip flop.
Features:
Let’s compare the operation and features of synchronous and asynchronous counters. Their
differences are listed below.
The propagation delay is very low. Propagation delay is higher than that of
synchronous counters.
high. low.
These are faster than that of ripple These are slow in operation.
counters.
SYNCHRONOUS COUNTERS ASYNCHRONOUS COUNTERS
Large number of logic gates are Less number of logic gates required.
required to design
design.
Standard logic packages available for For asynchronous counters, Standard logic
For suppose, in our kitchen appliances, we use microwave ovens. In that we set some
temperature to heat the food item kept in it. Internally the counter calculates the increase
or decrease in temperature and time. If it reaches the pre-set temperature, then it
prevents from further heating and spoiling of that food item.
Washing machines: We use counters in washing machines also. Similar to the counting
operation in microwave oven, the counter in washing machine counts the time which we
set it to operate.
In both microwave oven and washing machine, we set the device to particular time, and
it starts decreasing for every second. When the value of counter becomes zero, it
activates the switch ON / OFF. Thus the operation of the device is controlled by
counters.
Some other applications of counters: To calculate the number of people entering and leaving
a stadium or auditorium we use , counters at entry gate or door. These counters will count the
persons. For entry of each person, the value of counter increases by 1. In the same manner,
for every leaving of each person, the counter value decreases by 1.
Applications of counters
Counter found their applications in many digital electronic devices. Some of their
applications are listed below.
Frequency counters
Digital clocks
Analog to digital convertors.
With some changes in their design, counters can be used as frequency divider circuits.
The frequency divider circuit is that which divides the input frequency exactly by ‘2’.
In time measurement. That means calculating time in timers such as electronic devices
like ovens and washing machines.
We can design digital triangular wave generator by using counters.
Step 2: After that, we need to construct state table with excitation table.
Note: To construct excitation table from state table you should know the excitation table of
respective flip flip in this case it is T flip flop. So check the excitation table for T flip flop
Which is:
0 0 0
0 1 1
1 0 1
1 1 0
0 0 0 0 0 1 0 0 1
0 0 1 0 1 0 0 1 1
0 1 0 0 1 1 0 0 1
0 1 1 1 0 0 1 1 1
1 0 0 1 0 1 0 0 1
1 0 1 1 1 0 0 1 1
1 1 0 1 1 1 0 0 1
1 1 1 0 0 0 1 1 1
When Q3 =0 which is present state and Q3'=0 which is next state then T3 become 0 [As per
excitation table, have a look ]
Similarly, if Q3 is 0 and Q3' is 1 then T3 become 1.
In similar way it goes on .
Step 3: After making the excitation table the next thing to do is dig out the equation from the
boolean algebra or K map for the design of the counter. So, for T1 , T2 and T3 we got
1, Q1 and Q1.Q2
K-Map
T3= Q1.Q2
T1=1
Step 4: Lastly according to the equation got from K map create the design for 3 bit
synchronous up counter.
In above design T1 is getting input 1 and T2 is getting input from output of the T1 flip flop and
lastly, T3 is getting input from the output of T1 and T2 . A clock is attached to it which is in
blue color.