Documentos de Académico
Documentos de Profesional
Documentos de Cultura
T Flip-Flop:
Q T Qn Qn+1 1 J Q
↑ 0 1
T FF
↑ 1 0 T CLK FF
K Q
Fig.: T flip-flop – logic symbol, truth table and implementation from J-K FF.
The output of a toggle flip-flop, also called a T flip-flop, changes state every time it is triggered at its T input, called
the toggle input. That is, the output becomes 1 if it was 0 and 0 if it was 1.
When both J and K inputs of the J-K flip-flop are tied to their active level, the flip-flop behaves like a toggle flip-flop,
with its clock input serving as the T input.
[Ref.: Digital Electronics Principles, Devices and Applications, Anil K. Maini]
Asynchronous Inputs:
Most flip-flops have both synchronous and asynchronous inputs.
Synchronous inputs are those whose effect on the flip-flop output is synchronized with the clock input. R, S, J, K and
D inputs are all synchronous inputs.
Asynchronous inputs are those that operate independently of the synchronous inputs and the input clock signal.
These are in fact override inputs as their status overrides the status of all synchronous inputs and also the clock
input. They force the flip-flop output to go to a predefined state irrespective of the logic status of the synchronous
inputs.
PRESET
J
1 3 Q
CLK
2 4 Q
K
PRESET
CLEAR
J Q
CLK
PRESET CLEAR FF response
1 1 Clocked operation*
K Q 0 1 Q=1 (regardless of CLK)
1 0 Q=0 (regardless of CLK)
0 0 Not used
CLEAR
*Q will respond to J, K and CLK
Fig.: Clocked J-K flip-flop with asynchronous inputs.
Lec-22, Pg-01 In case of any query or suggestion please contact Sazzad, Lecturer, APECE, DU (url: sazzadmsi.webs.com)
`~ivjvcbx t Telephone :
wc,G,we,G·, 9661920-73/4980 PABX : 9661920-73/4980
Figure shows a J-K flip-flop with two asynchronous inputs designated as PRESET and CLEAR . Their effects can
be examined as –
(1) PRESET = CLEAR =1. The asynchronous inputs are inactive and the FF is free to respond to the J, K and
CLK inputs.
(2) PRESET =0, CLEAR =1. The PRESET is activated and Q is immediately set to 1 no matter what
conditions are present at the J, K and CLK inputs.
(3) PRESET =1, CLEAR =0. The CLEAR is activated and Q is immediately cleared to 0 independent of the
conditions on the J, K or CLK inputs.
(4) PRESET = CLEAR =0. This conditions should not be used, since it can result in an ambiguous response.
[Ref.: Digital Systems Principles and Applications, R.J. Tocci and N.S. Widmer]
Master/Slave Flip-Flops:
Whenever the width of the pulse clocking the flip-flop is greater than the propagation delay of the flip-flop, the change
in state at the output is not reliable. This phenomenon is referred to as the race problem.
In the case of edge-triggered flip-flops, this pulse width would be the trigger pulse width generated by the edge
detector portion of the flip-flop and not the pulse width of the input clock signal.
J Q J Q
Master Slave
CLK FF CLK FF
K Q K Q
Lec-22, Pg-02 In case of any query or suggestion please contact Sazzad, Lecturer, APECE, DU (url: sazzadmsi.webs.com)
`~ivjvcbx t Telephone :
wc,G,we,G·, 9661920-73/4980 PABX : 9661920-73/4980
Switch Debouncing:
+V
+V
Switch
2
1
0
Bounce
Fig.: Switch bounce phenomenon.
Owing to the switch bounce phenomenon, the mechanical switch cannot be used as such to produce a clean voltage
transition. When the switch is moved from position 1 to position 2, what is desired at the output is a clean voltage
transition from 0 to +V volts. But the output makes several transitions between 0 and +V volts for a few milliseconds
owing to contact bounce before it finally settles at +V volts.
Similarly, when it is moved from position 2 back to position 1, it makes several transitions before coming to rest at 0V.
+V +V
Switch +V 0
2
1
Switch Switch
moved moved
from Pos-1 from Pos-2
to Pos-2 to Pos-1
Fig.: Switch debounce circuit.
A NAND or a NOR latch can solve this problem and provide a clean output transition. When the switch is in position
1, the output is at a 0 level. When it is moved to position 2, the output goes to a 1 level within a few nanoseconds
after its first contact with position 2. When the switch contact bounces, it makes and breaks contact with position 2
before it finally settles at the intended position. Making of contact always leads to a 1 level at the output, and breaking
of contact also leads to a 1 level at the output owing to the fact that the contact break produces a 1 level at both
inputs of the latch which forces the output to hold its existing logic state.
When the switch is brought back to position 1 the output makes a neat transition to a 0 level.
D Q
A
FF
B
CLK
Lec-22, Pg-03 In case of any query or suggestion please contact Sazzad, Lecturer, APECE, DU (url: sazzadmsi.webs.com)
`~ivjvcbx t Telephone :
wc,G,we,G·, 9661920-73/4980 PABX : 9661920-73/4980
Figure shows how a flip-flop can be used to detect whether a positive-going edge A follows or precedes another
positive-going edge B. The two edges are respectively applied to D and clock inputs of a positively edge-triggered D
flip-flop.
If edge A arrives first than on arrival of edge B, the output goes from 0 to 1. If it is otherwise, it stays at a 0 level.
[Ref.: Digital Electronics Principles, Devices and Applications, Anil K. Maini]
Shift-Registers:
A shift register is a group of FFs arranged so that the binary numbers stored in the FFs are shifted from one FF to the
next for every clock pulse. It is some kinds of cascade arrangement of flip-flops that has no specified sequence of
states.
DATA
IN
J X3 J X3 J X3 J X3
K X3 K X2 K X1 K X0
Shift
pulses 1
Shift pulses
0
T1 T2 T3 T4
DATA IN
X3
X2
X1
X0
Lec-22, Pg-04 In case of any query or suggestion please contact Sazzad, Lecturer, APECE, DU (url: sazzadmsi.webs.com)
`~ivjvcbx t Telephone :
wc,G,we,G·, 9661920-73/4980 PABX : 9661920-73/4980
X CLK Q1
Combinational Y
logic circuit D Q1 Q2=Y
Z
CLK Q2
D Q1 Q3=Z
1
TRANSFER
0 CLK Q3
0 D X2 D X1 D X0 D Y2 D Y1 D Y0
X2 X1 X0 Y2 Y1 Y0
1 0 1 0 0 0 ←Before pulses applied
0 1 0 1 0 0 ←After first pulse
0 0 1 0 1 0 ←After second pulse
0 0 0 1 0 0 ←After third pulse
Fig.: Serial transfer of information from X register into Y register.
X0, the last FF of register X, is connected to the D input of Y2, the first FF of register Y. Thus, as the shift pulses are
applied, the information transfer takes place as follows – X2X1X0Y2Y1Y0.
To illustrate, let us assume that before any shift pulses are applied, the contents of the X register are 101 and the Y
register is at 000.
On the NGT of each pulse, each FF takes on the value that was stored in the FF on its left prior to the occurrence of
the pulse.
Lec-22, Pg-05 In case of any query or suggestion please contact Sazzad, Lecturer, APECE, DU (url: sazzadmsi.webs.com)
`~ivjvcbx t Telephone :
wc,G,we,G·, 9661920-73/4980 PABX : 9661920-73/4980
After three pulses, the 1 that was initially in X2 is in Y2, the 0 initially in X1 is in Y1, and the 1 initially in X0 is in Y0. The
101 stored in the X register has now been shifted into the Y register. The X register is at 000 and lost its original data.
Asynchronous/Ripple Counters:
A ripple counter is a cascaded arrangement of flip-flop where the output of one flip-flop drives the clock input of the
following flip-flop.
In a ripple counter, also called an asynchronous counter or a serial counter, the clock input is applied only to the first
flip-flop, also called the input flip-flop, in the cascaded arrangement. The clock input to any subsequent flip-flop
comes from the output of its immediately preceding flip-flop.
1 1 1 1
J A J B J C J D
K A K B K C K D
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
CLOCK
D
DCBA (count) 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 0000 0001 0010
Lec-22, Pg-06 In case of any query or suggestion please contact Sazzad, Lecturer, APECE, DU (url: sazzadmsi.webs.com)
`~ivjvcbx t Telephone :
wc,G,we,G·, 9661920-73/4980 PABX : 9661920-73/4980
Lec-22, Pg-07 In case of any query or suggestion please contact Sazzad, Lecturer, APECE, DU (url: sazzadmsi.webs.com)