0% found this document useful (0 votes)
108 views

DL & CO _ Unit 2 Material_Digital Logic Circuits-II) (1)

Uploaded by

indhureddy444
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
108 views

DL & CO _ Unit 2 Material_Digital Logic Circuits-II) (1)

Uploaded by

indhureddy444
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 21

Sequential Circuit

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).

A combinational circuit produces an output based on input variables only, but


a sequential circuit produces an output based on current input and previous output
variables. That means sequential circuits include memory elements that are capable of
storing binary information. That binary information defines the state of the sequential circuit
at that time. A latch capable of storing one bit of information.

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

Advantages of Sequential Circuits


1. Memory: Sequential circuits have the ability to store binary values, which makes them
ideal for applications that require memory elements, such as timers and counters.
2. Timing: Sequential circuits are commonly used to implement timing and synchronization
in digital systems, making them essential for real-time control applications.
3. State machine implementation: Sequential circuits can be used to implement state
machines, which are useful for controlling complex digital systems and ensuring that they
operate as intended.
4. Error detection: Sequential circuits can be designed to detect errors in digital systems and
respond accordingly, improving the reliability of digital systems.
Disadvantages of Sequential Circuits
1. Complexity: Sequential circuits are typically more complex than combinational circuits
and require more components to implement.
2. Timing constraints: The design of sequential circuits can be challenging due to the need
to ensure that the timing of the inputs and outputs is correct.
3. Testing and debugging: Testing and debugging sequential circuits can be more difficult
compared to combinational circuits due to their complex structure and state-dependent
outputs.
Applications
Sequential circuits find application in virtually almost every digital system today because of
their capacity to handle state information. Some common applications include:
 Counters: Appearing in commonly in digital clocks, frequency counters, and event
counters.
 Registers: Found in microprocessors and digital systems as a storage medium, a transfer
medium and a medium for manipulating data.
 Memory Elements: Used in RAM and other storage devices to keep data in a temporary
hold.
 State Machines: Made use in control systems, communication processes, and different
digital devices for state control.
 Timers: It is applied in time measurement, delay production, and scheduling functions in
digital circuits.

Difference between combinational and sequential


circuit

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:

S-R Flip Flop


In the flip flop, with the help of preset and clear when the power is switched ON, the
states of the circuit keeps on changing, that is it is uncertain. It may come to set(Q=1) or
reset(Q’=0) state. In many applications, it is desired to initially set or reset the flip flop that is
the initial state of the flip flop that needs to be assigned. This thing is accomplished by the
preset(PR) and the clear(CLR).
Block Diagram of S-R Flip Flop
Given Below is the Block Diagram of S-R Flip Flop

S-R Flip Flop

Circuit Diagram and Truth Table of S-R Flip Flop


Given Below is the Diagram of S-R Flip Flop with its Truth Table
Operations of S-R Flip Flop
Given Below is the Operations of S-R Flip Flop
 Case 1(PR=CLR=1): The asynchronous inputs are inactive and the flip flop responds freely
to the S,R and the CLK inputs in the normal way.
 Case 2(PR=0 and CLR=1):This is used when the Q is set to 1.
 Case 3(PR=1 and CLR=0):This is used when the Q’ is set to 1.
 Case 4(PR=CLR=0): This is an invalid state.
Characteristics Equation for SR Flip Flop
QN+1 = QNR’ + SR’

J-K Flip Flop


In JK flip flops, The basic structure of the flip flop which consists of Clock (CLK),
Clear (CLR), Preset (PR).
Block Diagram of J-K Flip Flop
Given Below is Block Diagram of J-K Flip Flop

J-K Flip Flop

Circuit Diagram and Truth Table of J-K Flip Flop


Given Below is the Diagram of J-K Flip Flop with its Truth Table
Operations of J-K Flip Flop
Given Below is the Operations of J-K Flip Flop
 Case 1 (PR=CLR=0 ):This condition is in its invalid state.
 Case 2 (PR=0 and CLR=1):The PR is activated which means the output in the Q is set to 1.
Therefore, the flip flop is in the set state.
 Case 3 (PR=1 and CLR=0):The CLR is activated which means the output in the Q’ is set to
1. Therefore, the flip flop is in the reset state.
 Case 4 (PR=CLR=1):In this condition the flip flop works in its normal way whereas the PR
and CLR gets deactivated.

Race Around Condition in J-K Flip Flop


When the J and K both are set to 1, the input remains high for a longer duration of time,
then the output keeps on toggling. Toggle means that switching in the output instantly i.e. Q=0,
Q’=1 will immediately change to Q=1 and Q’=0 and this continuation keeps on changing. This
change in output leads to race around condition.
Characteristics Equation for JK Flip Flop
QN+1 = JQ’N + K’QN

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

Circuit Diagram and Truth Table of D Flip Flop


Given Below is the Diagram of D Flip Flop with its Truth Table

Operation of the D Flip-Flop


Given Below is the operation of D Flip-Flip
 Case 1 (PR=CLR=0):This conditions is represents as invalid state where both PR(present)
and CLR(clear) inputs are inactive.
 Case 2 (PR=0 and CLR=1):This state is set state in which PR is inactive (0) and CLR is
active(1) and the output Q is set to 1.
 Case 3 (PR=1 and CLR=0):This state is reset state in which PR is active (1) and CLR is
inactive (0) and the complementary output Q’ is set to 1.
 Case 4 (PR=CLR=1):In This state the flip flop behaves as normal, both PR and CLR inputs
are active(1).
Characteristics Equation for D Flip Flop
QN+1 = D

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

Circuit Diagram and Truth Table of T Flip Flop


Given Below is the Circuit Diagram and Truth Table of T Flip Flop

Operation of the T Flip-Flop


Given Below is the Operation of T Flip-Flop
 Case 1 (T=0):In this condition the flip-flop remains in its current state regardless of clock
input,Also the Output Q will remain unchanged unit the value of T will not change.
 Case 2 (T=1):In this condition the flip flop will change when T input is 1,At each rising or
falling edge of the clock signal the output Q will be in complementary state.
Characteristics Equation for T Flip Flop
QN+1 = Q’NT + QNT’ = QN XOR T

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

Counters are broadly divided into two categories


1. Asynchronous counter
2. Synchronous counter
1. Asynchronous Counter
In asynchronous counter we don’t use universal clock, only first flip flop is driven by main
clock and the clock input of rest of the following flip flop is driven by output of previous flip
flops. We can understand it by following diagram-

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.

Synchronous counter circuit

Timing diagram synchronous 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

Serial-In Serial-Out Shift Register (SISO)

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.

Serial-In Serial-Out Shift Register (SISO)

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.

Serial-In Parallel-Out Shift Register (SIPO)

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.

Serial-In Parallel-Out shift Register (SIPO)

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.

Parallel-In Serial-Out Shift Register (PISO)

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.

Parallel-In Parallel-Out Shift Register (PIPO)

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.

Parallel-In Parallel-Out Shift Register (PIPO)

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.

Bidirectional Shift Register

Universal Shift Register


Universal Shift Register is a type of register that contains the both right shift and the
left shift. It has also parallel load capabilities. Generally, these types of registers are taken as
memory elements in computers. But, the problem with this type of register is that it shifts only
in one direction. In simple words, you mean that the universal shift register is a combination of
the bidirectional shift register and the unidirectional shift register.

Universal Shift Register


N-bit universal shift register consists of flip-flops and multiplexers. Both are N in size.
In this, all the n multiplexers share the same select lines and this select input selects the
suitable input for flip-flops.
Shift Register Counter
Shift Register Counters are the shift registers in which the outputs are connected back to the
inputs in order to produce particular sequences. There are basically two types:
 Ring Counter
 Johnson Counter
Ring Counter
A ring 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 output of the last flip-flop is again fed back to
the input of the first flip-flop, thus the name ring counter. The data pattern within the shift
register will circulate as long as clock pulses are applied. The logic circuit given below shows
a Ring Counter.

Ring Counter Truth Table

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.

Johnson Counter Truth Table

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

Applications of Shift Registers


 The shift registers are used for temporary data storage.
 The shift registers are also used for data transfer and data manipulation.
 The serial-in serial-out and parallel-in parallel-out shift registers are used to produce time
delay to digital circuits.
 The serial-in parallel-out shift register is used to convert serial data into parallel data thus
they are used in communication lines where demultiplexing of a data line into several
parallel lines is required.
 A Parallel in Serial out shift register is used to convert parallel data to serial data.

You might also like