dsdUnit-II and remainingUnit-I
dsdUnit-II and remainingUnit-I
• Combinational Circuits
• Sequential Circuits
3-to-8-line Decoder
157
Decoder with enable input
158
Demultiplexer
A B
A decoder with an
enable input is
referred to as a
decoder/demultiplex
er. D0
Demultiplexer D1
The truth table of E
demultiplexer is the D2
same with decoder. D3
159
DEMULTIPLEXER
Cont.
3-to-8 decoder with enable implement the 4-to-16
decoder
162
Implementation of a Full Adder with a Decoder
From table 4-4, we obtain the functions for the combinational circuit in sum of minterms:
S(x, y, z) = ∑(1, 2, 4, 7)
C(x, y, z) = ∑(3, 5, 6, 7)
163
ENCODERS
Cont.
MAGNITUDE COMPARATOR
Cont.
2-Bit magnitude comparator
Cont.
Code Converters
Cont.
Sequential Circuits
SEQUENTIAL LOGIC CIRCUITS
Cont.
Cont.
Cont.
LATCHES
Cont.
Cont.
Cont.
SR Flip flop
JK Flip-Flop
Cont.
JK FF Truth Table:
Q (t+1)
J (Input) K (Input) Q (PS)
(NS)
0 0 0 0
0 1 0 0
1 0 0 1
1 1 0 1
0 0 1 1
0 1 1 0
1 0 1 1
1 1 1 0
Cont. 3. D Flip-Flop
D flip-flop is a better alternative that is very popular with digital
electronics. They are commonly used for counters, shift registers,
and input synchronization.
In the D flip-flops, the output can only be changed at the clock
edge, and if the input changes at other times, the output will be
unaffected.
Truth Table:
Q (t+1)
Clock D (Input) Q (PS)
(NS)
↓»0 0 0 1
↑»1 0 0 1
↓»0 1 0 1
↑»1 1 1 0
Cont.
4. T Flip-Flop
A T flip-flop is like a JK flip-flop. These are single-
input versions of JK flip-flops. This modified form
of the JK is obtained by connecting inputs J and
K together. It has only one input along with the
Truth Table :
clock input.
T Q (PS) Q (t+1) (NS)
These flip-flops are called T flip-flops because of
0 0 0 their ability to complement their state i.e.
1 0 1 Toggle, hence they are named Toggle flip-flops.
0 1 1
1 1 0
Cont.
Need of Master-Slave FF
Cont.
The benefit of using a master-slave flip-flop is
that it is a very reliable and secure way to
store and transfer data. This is due to the fact
that the master and the slave are completely
isolated from each other. This makes it almost
impossible for any interference from the
outside to affect the output in any way.
In addition, the master and the slave are
separated by a clock signal, which ensures
that the data is only transferred when the
clock is active.
MASTER SLAVE FLIPFLOP
Cont.
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.
Internal structure of a master-slave JK flip-flop
in terms of NAND gates and an inverter
From figure it is also evident that the
slave is driven by the outputs of the
master (M1 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 M1 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.
Truth Table
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).
Timing Diagram
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.
Conversion of Flip-Flops
Flip-flops, namely:
• SR flip-flop,
• D flip-flop,
• JK flip-flop &
• T flip-flop.
We can convert one flip-flop into the remaining three flip-flops by including some additional
logic.
So, there will be total of twelve flip-flop conversions.
https://www.tutorialspoint.com/digital_circuits/digital_circuits_conversion_of_flip_flops.htm
Flip-flop conversion steps
SR Flip-Flop to other Flip-Flop
Conversions
Cont.
Cont.
Cont.
D flip-flop to T flip-flop conversion
Cont.
Cont.
Shift Registers
• We know that one flip-flop can store one-bit of information.
• To store multiple bits of information, we require multiple flip-flops.
• The group of flip-flops, which are used to hold store the binary data is known as register.
• If the register is capable of shifting bits either towards right hand side or towards left hand
side is known as shift register.
• An ‘N’ bit shift register contains ‘N’ flip-flops. Following are the four types of shift registers
based on applying inputs and accessing of outputs.
https://www.tutorialspoint.com/digital_circuits/digital_circuits_shift_registers.htm
Serial In − Serial Out SISO
Shift Register In this shift register,
we can send the bits
serially from the input
of left most D flip-
flop. Hence, this input
is also called as serial
input. For every
positive edge
triggering of clock
signal, the data shifts
from one stage to the
next. So, we can
receive the bits
serially from the
output of right most
D flip-flop. Hence,
this output is also
called as serial
output.
Cont.
Serial In - Parallel Out SIPO
Shift Register
Parallel In − Serial Out PISO
Shift Register
Parallel In -
Parallel Out
PIPO
Shift
Register
Example
Counters
• A special type of sequential circuit
used to count the pulse is known
as a counter, or a collection of flip
flops where the clock signal is
applied is known as counters.
• The counter is one of the widest
applications of the flip flop.
• Based on the clock pulse, the
output of the counter contains a
predefined state.
• The number of the pulse can be
counted using the output of the
counter.
Asynchronous or ripple counters
Cont.
Operation
Condition 1: When both the flip flops are in reset condition.
Operation: The outputs of both flip flops, i.e., QA QB, will be 0.
A ring counter is a special type of application of the Serial IN Serial OUT Shift register.
The only difference between the shift register and the ring counter is that the last flip
flop outcome is taken as the output in the shift register. But in the ring counter, this
outcome is passed to the first flip flop as an input.
All of the remaining things in the ring counter are the same as the shift register.
No. of states in Ring counter = No. of flip-flop used
4-bit ring
counter
In this diagram, we can see that the clock pulse (CLK) is applied to all the flip-flops simultaneously.
Therefore, it is a Synchronous Counter. Also, here we use Overriding input (ORI) for each flip-flop.
Preset (PR) and Clear (CLR) are used as ORI. When PR is 0, then the output is 1. And when CLR is 0,
then the output is 0. Both PR and CLR are active low signal that always works in value 0.
CP Q1 Q2 Q3 Q4
0 0 0 0 0
1 1 0 0 0
2 1 1 0 0
3 1 1 1 0
4 1 1 1 1
5 0 1 1 1
6 0 0 1 1
7 0 0 0 1