DL & CO _ Unit 2 Material_Digital Logic Circuits-II) (1)
DL & CO _ Unit 2 Material_Digital Logic Circuits-II) (1)
Sequential circuits are digital circuits that store and use previous state information to
determine their next state. They are commonly used in digital systems to implement state
machines, timers, counters, and memory elements and are essential components in digital
systems design. Sequential circuits are commonly used in digital systems to implement
state machines, timers, counters, and memory elements. The memory elements in
sequential circuits can be implemented using flip-flops, which are circuits that store binary
values and maintain their state even when the inputs change.
Sequential circuit is a combinational logic circuit that consists of inputs variable (X), logic
gates (Computational circuit), and output variable (Z).
As shown in the figure, there are two types of input to the combinational logic :
1. External inputs which are not controlled by the circuit.
2. Internal inputs, which are a function of a previous output state.
Secondary inputs are state variables produced by the storage elements, whereas secondary
outputs are excitations for the storage elements.
Types of Sequential Circuits
There are two types of sequential circuits
Asynchronous Sequential Circuit
These circuits do not use a clock signal but uses the pulses of the inputs. These circuits
are faster than synchronous sequential circuits because there is clock pulse and change
their state immediately when there is a change in the input signal. We use asynchronous
sequential circuits when speed of operation is important and independent of internal clock
pulse.
But these circuits are more difficult to design and their output is uncertain.
Synchronous Sequential Circuit
These circuits uses clock signal and level inputs (or pulsed) (with restrictions on pulse
width and circuit propagation). The output pulse is the same duration as the clock pulse for
the clocked sequential circuits. Since they wait for the next clock pulse to arrive to perform
the next operation, so these circuits are bit slower compared to asynchronous. Level output
changes state at the start of an input pulse and remains in that until the next input or clock
pulse.
We use synchronous sequential circuit in synchronous counters, flip flops, and in the design
of MOORE-MEALY state management machines. We use sequential circuits to design
Counters, Registers, RAM, MOORE/MEALY Machine and other state retaining machines.
Clock Signal and Triggering
Clock signal is a kind of control signal that allows the elements of synchronous circuits to be
in phase or phenomena that occur in circuits. It is derived from the square wave that has a
high and a low level, it helps in measuring the sequential changes in the circuit states. The
clock signal also makes a pulse simultaneously on all the circuit parts that are needed for
the proper work of synchronous sequential circuits.
Types of Triggering
In Sequential circuits, triggering denotes the way, in terms of which the state changes take
place. There are two main types of triggering
Level Triggering
Level triggering happens when the change of state is from the level of the clock signal is
high or low. The circuit depends on the level of the clock signal rather than the rising or the
falling edge of it. There are two types of level triggering:
1. Positive Level Triggering: The circuit changes state when it is high time in the clock
cycle i.e. when the clock signal is high.
2. Negative Level Triggering: The circuit changes state when the clock signal is in the low
state.
Edge Triggering
Edge triggering occurs when the state change is initiated by the transition (rising or falling
edge) of the clock signal. The circuit responds to the clock signal’s edges rather than its
levels. There are two types of edge triggering:
1. Positive Edge Triggering: The circuit changes state on the rising edge (transition from
low to high) of the clock signal.
2. Negative Edge Triggering: The circuit changes state on the falling edge (transition
from high to low) of the clock signal.
Edge Triggering
S.N
o
Combinational Circuit Sequential circuit
1 In this output depends only upon present In this output depends upon present as
input. well as past input.
2 Speed is fast. Speed is slow.
3 It is designed easy. It is designed tough as compared to
combinational circuits.
4 There is no feedback between input and There exists a feedback path between
output. input and output.
5 This is time independent. This is time dependent.
6 Elementary building blocks: Logic gates Elementary building blocks: Flip-flops
7 Used for arithmetic as well as boolean Mainly used for storing data.
operations.
8 Combinational circuits don’t have Sequential circuits have capability to store
capability to store any state. any state or to retain earlier state.
9 As combinational circuits don’t have As sequential circuits are clock dependent
clock, they don’t require triggering. they need triggering.
10 These circuits do not have any memory These circuits have memory element.
element.
11 It is easy to use and handle. It is not easy to use and handle.
12 Examples – Encoder, Decoder, Examples – Flip flops, Registers, Counter
Multiplexer, Demultiplexer
Flip-Flop
The flip-flop is a circuit that maintains a state until directed by input to change the
state. A basic flip-flop can be constructed using four-NAND or four-NOR gates. Flip-flop is
popularly known as the basic digital memory circuit. It has its two states as logic 1(High) and
logic 0(low) states. A flip flop is a sequential circuit which consist of single binary state of
information or data. The digital circuit is a flip flop which has two outputs and are of opposite
states. It is also known as a Bistable Multivibrator .
Types of Flip-Flops
Given Below are the Types of Flip-Flop
SR Flip Flop
JK Flip Flop
D Flip Flop
T Flip Flop
Logic diagrams and truth tables of the different types of flip-flops are as follows:
D Flip Flop
The D Flip Flop Consists a single data input(D), a clock input(CLK),and two outputs: Q
and Q’ (the complement of Q).
Block Diagram of D Flip Flop
Given Below is the Block Diagram of D Flip Flop
D FLIP FLOP
T Flip Flop
The T Flip Flop consists of data input (T), a clock input (CLK), and two outputs: Q and
Q’ (the complement of Q).
Block Diagram of T Flip Flop
Given Below is the Block Diagram of T Flip Flop
T FLIP FLOP
Applications of Flip-Flops
These are the various types of flip-flops being used in digital electronic circuits and the
applications of Flip-flops are as specified below.
Counters: The Flip Flop are used in the Counter Circuits for Counting pulse or events.
Frequency Dividers: The Flip Flop are used in Frequency Dividers to divide the frequency
of a input signal by a specific factor.
Shift Registers: The Shift registers consist of interconnected flip-flops that shift data
serially.
Storage Registers: The Storage Resistor uses Flip Flop to store data in binary information.
Bounce elimination switch: The Flip Flop are used in Bounce elimination switch to
eliminate the contact bounce.
Data storage: The Flip Flop are used in the Data Storage to store binary data temporarily or
permanently.
Data transfer: The Flip Flops are used for data transfer in different electronic parts .
Latch: The Latches are the Sequential circuit which uses Flip Flop for temporary storage of
data
Registers: The Registers are mode from the array of flip flop which are used to store data
temporarily.
Memory: The Flip Flops are the main components in the memory unit for data storage.
Counter
A Counter is a device which stores (and sometimes displays) the number of times a
particular event or process has occurred, often in relationship to a clock signal. Counters are
used in digital electronics for counting purpose, they can count specific event happening in the
circuit. For example, in UP counter a counter increases count for every rising edge of clock.
Not only counting, a counter can follow the certain sequence based on our design like any
random sequence 0,1,3,2… .They can also be designed with the help of flip flops. They are
used as frequency dividers where the frequency of given pulse waveform is divided. Counters
are sequential circuit that count the number of pulses can be either in binary code or BCD
form. The main properties of a counter are timing , sequencing , and counting. Counter works
in two modes
Up counter
Down counter
Counter Classification
It is evident from timing diagram that Q0 is changing as soon as the rising edge of
clock pulse is encountered, Q1 is changing when rising edge of Q0 is encountered(because Q0
is like clock pulse for second flip flop) and so on. In this way ripples are generated through
Q0,Q1,Q2,Q3 hence it is also called RIPPLE counter and serial counter. A ripple counter is
a cascaded arrangement of flip flops where the output of one flip flop drives the clock input of
the following flip flop
2. Synchronous Counter
Unlike the asynchronous counter, synchronous counter has one global clock which
drives each flip flop so output changes in parallel. The one advantage of synchronous counter
over asynchronous counter is, it can operate on higher frequency than asynchronous counter as
it does not have cumulative delay because of same clock is given to each flip flop. It is also
called as parallel counter.
Decade Counter
A decade counter counts ten different states and then reset to its initial states. A simple
decade counter will count from 0 to 9 but we can also make the decade counters which can go
through any ten states between 0 to 15(for 4 bit counter).
Clock pulse Q3 Q2 Q1 Q0
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
10 0 0 0 0
Ring Counter
A ring counter is a typical application of the Shift register. The ring counter is almost
the same as the shift counter. The only change is that the output of the last flip-flop is
connected to the input of the first flip-flop in the case of the ring counter but in the case of the
shift register it is taken as output. Except for this, all the other things are the same.
No. of states in Ring counter = No. of flip-flop used
So, for designing a 4-bit Ring counter we need 4 flip-flops.
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.
PR = 0, Q = 1
CLR = 0, Q = 0
These two values are always fixed. They are independent of the value of input D and
the Clock pulse (CLK). Working – Here, ORI is connected to Preset (PR) in FF-0 and it is
connected to Clear (CLR) in FF-1, FF-2, and FF-3. Thus, output Q = 1 is generated at FF-0,
and the rest of the flip-flop generates output Q = 0. This output Q = 1 at FF-0 is known as Pre-
set 1 which is used to form the ring in the Ring Counter.
Register
A register serves as a quick memory for accepting, storing, and sending data and
instructions that the CPU will need right away. A register is a collection of flip-flops, Single bit
digital data is stored using flip-flops. By combining many flip-flops, the storage capacity can be
extended to accommodate a huge number of bits. We must utilize an n-bit register with n flip
flops if we wish to store an n-bit word.
The gates govern the flow of information, i.e., when and how the information is sent into
a register, whereas the flip-flops store the binary information.
Working of Registers:
When we provide the system with input, that input is stored in registers, and when the
system returns results after processing, those results are also drawn from the registers. so that
the CPU can use them to process the data that the user provides.
Registers are performed based on three operations:
Fetch: The Fetch Operation is used to retrieve user-provided instructions that have been
stored in the main memory. Registers are used to fetch these instructions.
Decode: The Decode Operation is used to interpret the Instructions, which means that the
CPU will determine which Operation has to be carried out on the Instructions after the
Instructions have been decoded.
Execute: The CPU manages the Execute Operation. The results that the CPU generates are
then stored in the memory before being presented on the user screen.
Types of Registers:
Status and control registers.
General-purpose data registers.
Special purpose register.
Shift Register
Flip flops can be used to store a single bit of binary data (1 or 0). However, in order to
store multiple bits of data, we need multiple flip-flops. N flip flops are to be connected in order
to store n bits of data. A Register is a device that is used to store such information. It is a
group of flip-flops connected in series used to store multiple bits of data. The information
stored within these registers can be transferred with the help of shift registers.
Shift Register is a group of flip flops used to store multiple bits of data. The bits stored in such
registers can be made to move within the registers and in/out of the registers by applying clock
pulses. An n-bit shift register can be formed by connecting n flip-flops where each flip-flop
stores a single bit of data. The registers which will shift the bits to the left are called “Shift left
registers”. The registers which will shift the bits to the right are called “Shift right registers”.
Shift registers are basically of following types.
Types of Shift Registers
Serial In Serial Out shift register
Serial In parallel Out shift register
Parallel In Serial Out shift register
Parallel In parallel Out shift register
Bidirectional Shift Register
Universal Shift Register
Shift Register Counter
The shift register, which allows serial input (one bit after the other through a single data
line) and produces a serial output is known as a Serial-In Serial-Out shift register. Since there
is only one output, the data leaves the shift register one bit at a time in a serial pattern, thus the
name Serial-In Serial-Out Shift Register. The logic circuit given below shows a serial-in serial-
out shift register. The circuit consists of four D flip-flops which are connected in a serial
manner. All these flip-flops are synchronous with each other since the same clock signal is
applied to each flip-flop.
The above circuit is an example of a shift right register, taking the serial data input from the
left side of the flip flop. The main use of a SISO is to act as a delay element.
The shift register, which allows serial input (one bit after the other through a single data
line) and produces a parallel output is known as the Serial-In Parallel-Out shift register. The
logic circuit given below shows a serial-in-parallel-out shift register. The circuit consists of
four D flip-flops which are connected. The clear (CLR) signal is connected in addition to the
clock signal to all 4 flip flops in order to RESET them. The output of the first flip-flop is
connected to the input of the next flip flop and so on. All these flip-flops are synchronous with
each other since the same clock signal is applied to each flip-flop.
The above circuit is an example of a shift right register, taking the serial data input from the
left side of the flip-flop and producing a parallel output. They are used in communication lines
where demultiplexing of a data line into several parallel lines is required because the main use
of the SIPO register is to convert serial data into parallel data.
The shift register, which allows parallel input (data is given separately to each flip flop
and in a simultaneous manner) and produces a serial output is known as a Parallel-In Serial-
Out shift register. The logic circuit given below shows a parallel-in-serial-out shift register.
The circuit consists of four D flip-flops which are connected. The clock input is directly
connected to all the flip-flops but the input data is connected individually to each flip-flop
through a multiplexer at the input of every flip-flop. The output of the previous flip-flop and
parallel data input are connected to the input of the MUX and the output of MUX is connected
to the next flip-flop. All these flip-flops are synchronous with each other since the same clock
signal is applied to each flip-flop.
Parallel-In Serial-Out Shift Register (PISO)
A Parallel in Serial Out (PISO) shift register is used to convert parallel data to serial data.
The shift register, which allows parallel input (data is given separately to each flip flop
and in a simultaneous manner) and also produces a parallel output is known as Parallel-In
parallel-Out shift register. The logic circuit given below shows a parallel-in-parallel-out shift
register. The circuit consists of four D flip-flops which are connected. The clear (CLR) signal
and clock signals are connected to all 4 flip-flops. In this type of register, there are no
interconnections between the individual flip-flops since no serial shifting of the data is
required. Data is given as input separately for each flip flop and in the same way, output is also
collected individually from each flip flop.
A Parallel in Parallel out (PIPO) shift register is used as a temporary storage device and like
SISO Shift register it acts as a delay element.
Bidirectional Shift Register
If we shift a binary number to the left by one position, it is equivalent to multiplying the
number by 2 and if we shift a binary number to the right by one position, it is equivalent to
dividing the number by 2. To perform these operations we need a register which can shift the
data in either direction. Bidirectional shift registers are the registers that are capable of shifting
the data either right or left depending on the mode selected. If the mode selected is 1(high), the
data will be shifted toward the right direction and if the mode selected is 0(low), the data will
be shifted towards the left direction. The logic circuit given below shows a Bidirectional shift
register. The circuit consists of four D flip-flops which are connected. The input data is
connected at two ends of the circuit and depending on the mode selected only one gate is in the
active state.
The circuit consists of four D flip-flops which are connected. Since the circuit consists
of four flip-flops the data pattern will repeat after every four clock pulses as shown in the truth
table. A Ring counter is generally used because it is self-decoding. No extra decoding circuit is
needed to determine what state the counter is in.
Ring Counter
Johnson Counter
A Johnson counter is basically a shift register counter in which the output of the first
flip flop is connected to the next flip flop and so on and the inverted output of the last flip flop
is again fed back to the input of the first flip flop. They are also known as twisted ring
counters. The logic circuit given below shows a Johnson Counter. The circuit consists of four
D flip-flops which are connected.
An n-stage Johnson counter yields a count sequence of 2n different states, thus also known as a
mod-2n counter. Since the circuit consists of four flip-flops the data pattern will repeat every
eight clock pulses as shown in the truth table. The main advantage of the Johnson counter is
that it only needs n number of flip-flops compared to the ring counter to circulate a given data
to generate a sequence of 2n states.
Johnson Counter