DL CH 4
DL CH 4
DL CH 4
• Flip – Flop is a one bit memory as storing a logic 0 and when its
element. It acts as basic building block output is set at + 5 V dc, as storing a
of a sequential circuit that forms a logic 1.
feedback path. • The flip-flop is often called a latch,
• Flip-flops are used in the construction since it will hold, or latch, in either
of registers and counters, and in stable state.
numerous other applications.
• A flip-flop is a bi stable electronic
circuit that has two stable states - that
is, its output is either 0 or +5V dc as
shown in Fig. 8.1 b.
• For instance, when the flip-flop has its
output set at 0 V dc, it can be regarded
Prepared by Praches Acharya Lalitpur Engineering College
RS NOR-Gate latch/Flip-Flop
• The SR NOR Gate flip-flop actually has two outputs Q and Q’. There are
two inputs to the flip-flop defined as R and S. The Circuit diagram and its
truth table is shown below.
• During the design process, we may need to know the transition from present
state to next state and wish to find the input conditions that will cause the
required transition. For this reason, we need a table that lists the required
inputs for a given change of state. Such a Table is called Excitation Table.
• Registers are important digital building blocks that can be used to store binary
data. They can accept data bits in either a serial or a parallel format and can,
likewise, deliver data in either serial or parallel.
• A register is composed of a group of flip-flops to store a group of bits (word). N
bit Register consists of N number of flip-flops.
• A Shift Register is a type of sequential logic circuit that can be used for storage
or transfer of the binary data. Shift register is capable of shifting bits either
towards right hand side or towards left hand side.
TYPES OF SHIFT REGISTERS
• Ripple Counters
The figure below shows a three bit binary ripple counter constructed using edge
triggered JK flip flops connected in cascade. The system clock drives flip-flop A.
The output of A drives B, and the output of B drives flip-flop C. All the J and K
inputs are tied to +Vcc· This means that each flip-flop will change state (toggle)
with a negative transition at its clock input.
• Let's assume that the flip-flops are all initially reset to produce 0 outputs. If we
consider A to be the least-significant bit(LSB) and C the most-significant bit
(MSB), we can say the contents of the counter is CBA = 000.
• Every time there is a clock NT, flip-flop A will change state. Thus at point a on
the time line, A goes high, at point b it goes back low, at c it goes back high, and
so on.
• Every time there is a clock NT, flip-flop A will change state. Thus at point a on the
time line, A goes high, at point b it goes back low, at c it goes back high, and so on.
• Since A acts as the clock for B, each time the waveform at A goes low, flip-flop B
will toggle. Thus at point b on the time line, B goes high; it then goes low at point
d and toggles back high again at point f .
• Since B acts as the clock for C, each time the waveform at B goes low, flip-flop C
will toggle. Thus C goes high at point d on the time line and goes back low again at
point h.
• Because each output condition shown in the truth table is the binary equivalent
of the number of clock NTs, the three cascaded flip-flops in Fig. 10.1 comprise a 3-
bit binary ripple counter. This counter can be used to count the number of clock
transitions up to a maximum of seven. The counter begins at count 000 and
advances one count for each clock transition until it reaches count 111. At this
point it resets back to 000 and begins the count cycle all over again. We can say
that this ripple counter is operating in a count-up mode.
• Since a binary ripple counter counts in a straight binary sequence, it is easy to
see that a counter having n flip-flops will have 2n output conditions. For
instance, the three-flip-flop counter has 23 = 8 output conditions (000 through
111). Five flip-flops would have 25 = 32 output conditions (00000 through
11111 ), and so on. The largest binary number that can be represe:1ted by n
cascaded flip-flops has a decimal equivalent of 211 - 1.
• For example, the three-flip-flop counter reaches a maximum decimal number
of 23 - 1. The maximum decimal number for five flip-flops is 25 - l = 31, while
six flip-flops have a maximum count of 63.
• A three-flip-flop counter is often referred to as a modulus-8 (or mod-8) counter
since it has eight states. Similarly, a four-flip-flop counter is a mod-16 counter,
and a six-flip-flop counter is a mod-64 counter. The modulus of a counter is the
total number of states through which the counter can progress.
R ipp le C ou nte r ( Do wn Co unt er)
• A 3bit ripple counter (down counter) is shown in Fig. 10.4. The system clock is
still used at the clock input to flip-flop A, but A’ is used to drive flipflop B,
likewise; B’ is used to drive flip-flop C.
• Flip-flop A simply toggles with each negative clock transition as before. But
flip-flop B will toggle each time A goes high! Notice that each time A goes high,
A’ goes low, and it is this negative transition on A that triggers B. On the time
line, B toggles at points a, c, e, g and i.
• Similarly, flip-flop C is triggered by B’ and so C will toggle each time B goes
high. Thus C toggles high at point a on the time line, toggles back low at point
e and goes back high again at point i.
• The counter contents become ABC= 111 at point a on the time line, change to
110 at point b, and change to 101 at point c. Notice that the counter is
operating in a count-down mode. This is still a mod-8 counter, since it has eight
discrete states, but it is connected as a down counter.
Asynchronous up-down counter
• In Synchronous Counters,
every flip-flop is triggered in
synchronism with the clock.
• Counter Modulus
• Counters have a modulus given by 2n, where n indicates the number of flip-flops. Such
counters are said to have a "natural count" of 2n.
• A mod-2 counter consists of a single flip-flop; a mod-4 counter requires two flip-flops,
and it counts through four discrete states. Three flip-flops form a mod-8 counter, while
four flip-flops form a mod-16 counter. Thus we can construct counters that have a
natural count of 2, 4, 8, 16, 32, and so on by using the proper number of flip-flops.
• A small modulus counter can always be constructed from a larger modulus counter by
skipping states. Such counters are said to have a modified count. It is first necessary to
determine the number of flip-flops required. The correct number of flip-flops is
determined choosing the lowest natural count that is greater than the desired
modified count.
• For example, a mod-7 counter requires three flip-flops, since 8 is the lowest natural
count greater than the desired modified count of 7.
* Indicate how many flip-flops are required to construct each of the following counters: (a) mod-3, (b)
mod-6, and (c) mod-9.
* What modulus counters can be constructed with the use of four flip-flops?
• Mod-3 Counter
The two flip-flops in Fig. 10.16 have been connected to provide a mod-3 counter.
Since two flip-flops have a natural count of 4, this counter skips one state. The
waveforms and the truth table in Fig. 10.16 show that this counter progresses
through the count sequence 00, 01, 10, and then back to 00. It clearly skips
count 11.