Module - 3 DSDV
Module - 3 DSDV
Basic latchis a feedback connection of two NOR gates or two NAND gates
It can store one bit of information
It can be set to 1 using the S input and reset to 0 using the R input
Master Slave flip flop are the cascaded combination of two flip-flops among which
the first is designated as master flip-flop while the next is called slave flip-flop
(Figure 1). Here the master flip-flop is triggered by the external clock pulse train
while the slave is activated at its inversion i.e. if the master is positive edge-
triggered, then the slave is negative-edge triggered and vice-versa. This means that
the data enters into the flip-flop at leading/trailing edge of the clock pulse while it is
obtained at the output pins during trailing/leading edge of the clock pulse. Hence a
master-slave flip-flop completes its operation only after the appearance of one full
clock pulse for which they are also known as pulse-triggered flip-flops.
Further the outputs of N1 and N2 gates are connected as the inputs for the criss-cross
connected gates N3 and N4. These four gates together (N1, N2, N3 and N4) form the
master-part of the flip-flop while a similar arrangement of the other four gates N 5,
N6, N7 and N8 form the slave-part of it.
From figure it is also evident that the slave is driven by the outputs of the master (M 1
and M2), which is in accordance with its name master-slave flip-flop. Further the
master is active during the positive edge of the clock due to which M 1 and M2 change
their states; depending on the values of J and K. However at this instant the outputs
of the overall system (master-slave JK flip-flop) remains unchanged as the slave will
be inactive due to positive-edge of the clock pulse. Similar to this, the slave decides
on its outputs Q and Q̅ depending on its inputs M1 and M2, during the negative edge
of the clock during which the master will be inactive.
The truth table corresponding to the working of the flip-flop shown in Figure 2 is
given by Table I. Here it is seen that the outputs at the master-part of the flip-flop
(data enclosed in red boxes) appear during the positive-edge of the clock (red
arrow). However at this instant the slave-outputs remain latched or unchanged. The
same data is transferred to the output pins of the master-slave flip-flop (data
enclosed in blue boxes) by the slave during the negative edge of the clock pulse
(blue arrow). The same principle is further emphasized in the timing diagram of
master-slave flip-flop shown by Figure 3. Here the green arrows are used to indicate
that the slave-output is nothing but the master-output delayed by half-a-clock cycle.
Moreover it is to be noted that the working of any other type of master-slave flip-
flop is analogous to that of the master slave JK flip-flop explained here.
Excitation Tables
Conversions of flip-flops
Registers and Counters
• An n-bit register is a cascade of n flip-flops and can store an n-bit binary data
• A counter can count occurrences of events and can generate timing intervals for
control purposes
In digital circuits, a shift register is a cascade of flip-flops sharing the same clock, in
which the output of each flip-flop is connected to the "data" input of the next flip-
flop in the chain, resulting in a circuit that shifts by one position the "bit array"
stored in it, shifting in the data present at its input and shifting out the last bit in the
array, at each transition of the clock input. More generally, a shift register may be
multidimensional, such that its "data in" and stage outputs are themselves bit arrays:
this is implemented simply by running several shift registers of the same bit-length
in parallel.
Shift registers can have both parallel and serial inputs and outputs. These are often
configured as serial-in, parallel-out (SIPO) or as parallel-in, serial-out (PISO). There
are also types that have both serial and parallel input and types with serial and
parallel output. There are also bi- directional shift registers which allow shifting in
both directions: L→R or R→L. The serial input and last output of a shift register can
also be connected to create a circular shift register
Shift registers are a type of logic circuits closely related to counters. They are
basically for the storage and transfer of digital data.
Buffer register:
The buffer register is the simple set of registers. It is simply stores the binary word.
The buffer may be controlled buffer. Most of the buffer registers used D Flip-flops.
The figure shows a 4-bit buffer register. The binary word to be stored is applied to
the data terminals. On the application of clock pulse, the output word becomes the
same as the word applied at the terminals. i.e., the input word is loaded into the
register by the application of clock pulse.
When the positive clock edge arrives, the stored word becomes:
Q4Q3Q2Q1=X4X3X2X1
Q=X
Controlled buffer register:
If goes LOW, all the FFs are RESET and the output becomes, Q=0000.
When is HIGH, the register is ready for action. LOAD is the control input. When
LOAD is HIGH, the data bits X can reach the D inputs of FF‘s.
Q4Q3Q2Q1=X4X3X2X1 Q=X
When load is low, the X bits cannot reach the FF‘s.
When serial data is transferred into a register, each new bit is clocked into the first
FF at the positive going edge of each clock pulse. The bit that was previously stored
by the first FF is transferred to the second FF. the bit that was stored by the Second
FF is transferred to the third FF.
In this type of register, the data bits are entered into the register serially, but the data
stored in the register is shifted out in parallel form.
Once the data bits are stored, each bit appears on its respective output line and all
bits are available simultaneously, rather than on a bit-by-bit basis with the serial
output. The serial-in, parallel out, shift register can be used as serial-in, serial out,
shift register if the output is taken from the Q terminal of the last FF.
For a parallel-in, serial out, shift register, the data bits are entered simultaneously
into their respective stages on parallel lines, rather than on a bit-by-bit basis on one
line as with serial data bits are transferred out of the register serially. On a bit-by-bit
basis over a single line.
There are four data lines A,B,C,D through which the data is entered into the register
in parallel form. The signal shift/ load allows the data to be entered in parallel form
into the register and the data is shifted out serially from terminalQ4 Parallel-in,
parallel-out, shift register
In a parallel-in, parallel-out shift register, the data is entered into the register in
parallel form, and also the data is taken out of the register in parallel form. Data is
applied to the D input terminals of the FF‘s. When a clock pulse is applied, at the
positive going edge of the pulse, the D inputs are shifted into the Q outputs of the
FFs. The register now stores the data. The stored data is available instantaneously
for shifting out in parallel form.
A universal shift register can be realized using multiplexers. The below fig shows
the logic diagram of a 4-bit universal shift register that has all capabilities. It consists
of 4 D flip-flops and four multiplexers. The four multiplexers have two common
selection inputs s1 and s0. Input 0 in each multiplexer is selected when S1S0=00,
input 1 is selected when S1S0=01 and input 2 is selected when S1S0=10 and input 4 is
selected when S1S0=11. The selection inputs control the mode of operation of the
register according to the functions entries. When S1S0=0, the present value of the
register is applied to the D inputs of flip-flops. The condition forms a path from the
output of each flip-flop into the input of the same flip-flop. The next clock edge
transfers into each flip-flop the binary value it held previously, and no change of
state occurs. When S1S0=01, terminal 1 of the multiplexer inputs have a path to the
D inputs of the flip-flop. This causes a shift-right operation, with serial input
transferred into flip-flopA4. When S1S0=10, a shift left operation results with the
other serial input going into flip-flop A1. Finally when S1S0=11, the binary
information on the parallel input lines is transferred into the register simultaneously
during the next clock cycle
Figure: logic diagram 4-bit universal shift register
Counters:
Counter is a device which stores (and sometimes displays) the number of times
particular event or process has occurred, often in relationship to a clock signal. A
Digital counter is a set of flip flops whose state change in response to pulses applied
at the input to the counter. Counters may be asynchronous counters or synchronous
counters. Asynchronous counters are also called ripple counters
In electronics counters can be implemented quite easily using register-type circuits
such as the flip-flops and a wide variety of classifications exist:
Asynchronous (ripple) counter – changing state bits are used as clocks to subsequent
state flip-flops
Synchronous counter – all state bits change under control of a singleclock
Decade counter – counts through ten states per stage
Up/down counter – counts both up and down, under command of a control
input
Ring counter – formed by a shift register with feedback connection in a ring
Johnson counter – a twisted ring counter Cascaded counter
Modulus counter.
Each is useful for different applications. Usually, counter circuits are digital in
nature, and count in natural binary Many types of counter circuits are available as
digital building blocks, for example a number of chips in the 4000 series implement
different counters.
Occasionally there are advantages to using a counting sequence other than the
natural binary sequence such as the binary coded decimal counter, a linear feed-
back shift register counter, or a gray-code counter.
Counters are useful for digital clocks and timers, and in oven timers, VCR clocks,
etc.
Asynchronous counters:
An asynchronous (ripple) counter is a single JK-type flip-flop, with its J (data) input
fed from its own inverted output. This circuit can store one bit, and hence can count
from zero to one before it overflows (starts over from 0). This counter will increment
once for every clock cycle and takes two clock cycles to overflow, so every cycle it
will alternate between a transition from 0 to 1 and a transition from 1 to 0. Notice
that this creates a new clock with a 50% duty cycle at exactly half the frequency of
the input clock. If this output is then used as the clock signal for a similarly arranged
D flip-flop (remembering to invert the output to the input), one will get another 1 bit
counter that counts half as fast. Putting them together yields a two-bit counter:
Two-bit ripple up-counter using negative edge triggered flip flop:
Two bit ripple counter used two flip-flops. There are four possible states from 2 – bit
up- counting I.e. 00, 01, 10 and 11.
· The counter is initially assumed to be at a state 00 where the outputs of the tow
flip-flops are noted as Q1Q0. Where Q1 forms the MSB and Q0 forms the LSB.
· For the negative edge of the first clock pulse, output of the first flip-flop FF1 toggles
its state. Thus Q1 remains at 0 and Q0 toggles to 1 and the counter state are now
read as 01.
· During the next negative edge of the input clock pulse FF1 toggles and Q0 = 0. The
output Q0 being a clock signal for the second flip-flop FF2 and the present transition
acts as a negative edge for FF2 thus toggles its state Q1 = 1. The counter state is now
read as 10.
· For the next negative edge of the input clock to FF1 output Q0 toggles to 1. But this
transition from 0 to 1 being a positive edge for FF2 output Q1 remains at 1. The
counter state is now read as 11.
· For the next negative edge of the input clock, Q0 toggles to 0. This transition from 1
to 0 acts as a negative edge clock for FF2 and its output Q1 toggles to 0. Thus the
starting state 00 is attained. Figure shown below
Two-bit ripple down-counter using negative edge triggered flip flop:
Basically, counters in shift registers are classified into two types such as ring counter
as well as Johnson counter.
Ring Counter
Basically, this is a shift register counter in which the first FF output can be connected
to the second FF and so on The last FF output is once more fed back to the first flip
flop input, that is ring counter.
The data model in the shift register will move until the CLK pulses are applied. The
circuit diagram of the ring counter is shown above. This circuit can be designed with
4-FFs, so the data model will do again after each 4- CLK pulses as shown in the
following truth table. Generally, this counter is used for self-decoding, there is no
additional decoding is not necessary to decide the status of the counter.
Johnson Counter
Basically, this is a shift register counter in which the first FF output can be allied to
the second FF and so on and the last flip flop’s inverted output can be once more fed
back to the first flip flop’s input.
The circuit diagram of the Johnson Counter is shown above, and this circuit can be
designed with 4-D flip-flops. A Johnson counter with n-stage defers a calculate
series of 2n dissimilar states. Because this circuit can be built with 4-FFs, and the
data model will do again each 8-CLK pulses as shown in the following truth table.
The main benefit of this counter is, it requires n-number of FFs evaluated to the ring
counter to move a given data for producing a series of 2n states.
Step4: obtain the minimal expressions: From the excitation table we can conclude
that J1=1 and K1=1, because all the entries for J1and K1 are either X or 1. The K-maps
for J3, K3,J2 and K2 based on the excitation table and the minimal expression
obtained from them are shown in fig.
Step5: draw the logic diagram: a logic diagram using those minimal expressions can
be drawn as shown in fig.
Design of a synchronous modulo-6 gray cod counter:
Step 1: the number of flip-flops: we know that the counting sequence for a modulo-6
gray code counter is 000, 001, 011, 010, 110, and 111. It requires n=3FFs (N≤2n, i.e.,
6≤23). 3 FFs can have 8 states. So the remaining two states 101 and 100 are invalid.
The entries for excitation corresponding to invalid states are don‘t cares.
Step2: the state diagram: the state diagram of the mod-6 gray code converter is
drawn as shown in fig.
Step3: type of flip-flop and the excitation table: T flip-flops are selected and the
excitation table of the mod-6 gray code counter using T-flip-flops is written as
shown in fig.
Step4: The minimal expressions: the K-maps for excitations of FFs T3,T2,and T1 in
terms of outputs of FFs Q3,Q2, and Q1, their minimization and the minimal
expressions for excitations obtained from them are shown if fig
Step5: the logic diagram: the logic diagram based on those minimal expressions is
drawn as shown in fig.
MOD 10 Synchronous Counter using D Flip-flop
Step 5: Draw the circuit using flip-flops and other gates correspond to the
minimized expressions Circuit for MOD 10 or Decade Synchronous Counter using
D Flip-flop:
R3=Q3Q0
S2=Q2’Q1Q0
R2=Q2Q1Q0
S1=Q3¯¯¯¯¯¯Q1¯¯¯¯¯¯Q0
R1=Q1Q0R1=Q1Q0
S0=Q0¯¯¯¯¯¯
R0=Q0