Unit 2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

Unit 2

Sequential Circuits
Sequential Circuit
• Digital Electronics
• Combinational Circuit
• Sequential Circuit
• Sequential circuits are digital circuits that
store and use previous state information to
determine their next state.
• It include memory elements that are capable
of storing binary information.
• Types
• Asynchronous Sequential Circuit
• Synchronous Sequential Circuit
• These are used to implement
• state machines
• timers,
• Counters
• Memory
Components of Sequential Circuit
• Logic Gates
• The logic gates like AND, OR, NOT, etc. are used to implement the data
processing mechanism of the sequential circuits.
• These logic gates are interconnected in a specific manner to implement
combinational circuits to perform logical operations on input data.
• Memory Element
• Memory element holds the history of circuit operation.
• Generally, flip-flops are used as the memory element in sequential circuits.
• A feedback path is provided between the output and the input that
transfers information from output end to the memory element and
from memory element to the input end.
Asynchronous Sequential Circuit
• A type of sequential circuit whose operation does not depend on the
clock signals is known as an asynchronous sequential circuit.
• It operates using the input pulses which means their state changes with
the change in the input pulses.
• Its component includes un-clocked flip flops and combinational logic
circuits.
• These circuits are faster than synchronous sequential circuits
• It is used when speed of operation is important and independent of
internal clock pulse.
• These are relatively difficult to design and sometimes they produce
uncertain output.
• The ripple counter is a common example of asynchronous sequential
circuit.
Synchronous Sequential Circuit
• A synchronous sequential circuit is a type of sequential circuit in which all the
memory elements are synchronized by a common clock signal.
• Hence, synchronous sequential circuits take a clock signal along with input
signals.
• The duration of the output pulse is equivalent to the duration of the clock pulse
applied.
• The major disadvantage is that their operation is quite slow. This is because, every
time the circuit has to wait for a clock pulse for the operation to take place.
• The most significant advantage of synchronous sequential circuits is that they have
a reliable and predictable operation.
• Some common examples of synchronous sequential circuits include counters,
registers, memory units, control units, etc.
Diagram

Asynchronous Sequential Circuit Synchronous Sequential Circuit


Difference
Combinational Circuit Sequential Circuit

The circuit whose output at any instant depends only on The circuit whose output at any instant depends not only
the input present at that instant only is known as on the input but also on the previous output is known as
combinational circuit. sequential circuit.
It has no memory unit. It has memory unit which stores previous output.
This is time independent. This is time dependent.
Elementary building blocks: Logic gates Elementary building blocks: Flip-flops
It is faster in speed because delay is only due to It is slower compared to combinational circuit beacuase
propagation delay of gates. delay is due to propagation delay of gates and due to
memory element
Used for arithmetic as well as boolean operations. Mainly used for storing data.
Ex: Half adder, Full adder, Multiplexer, Demultiplexer etc Ex: Flip flop, registers, counter etc
It is designed easy. It is designed tough as compared to combinational circuits.
They don’t have capability to store any state. They have the capability to store any state or to retain
earlier state.
As these don’t have clock, they don’t require triggering. As these are clock dependent so they need triggering.
It is easy to use and handle. It is not easy to use and handle.
Advantages
1.Memory: It can store binary values, which makes them ideal for
applications that require memory elements, such as timers and counters.
2.Timing: These are used to implement timing and synchronization in digital
systems, making them essential for real-time control applications.
3.State machine implementation: It 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.
Disadvantage
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
• 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.
Flip flop
• A flip-flop is a sequential digital electronic circuit having two stable states that can
be used to store one bit of binary data.
• It 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.
• Types:
• S-R Flip-Flop
• J-K Flip-Flop
• D Flip-Flop
• T Flip-Flop
SR Flip flop
• This is the simplest flip-flop circuit.
• It has a set input (S) and a reset input (R).
• When in this circuit when S is set as active, the output Q would be high and the Q'
will be low.
• If R is set to active then the output Q is low and the Q' is high.
• Once the outputs are established, the results of the circuit are maintained until S or
R get changed, or the power is turned off.
Characteristics Table of S-R Flip-Flop

S R Q(t) Q(t+1) Truth Table of S-R Flip-Flop

0 0 0 0 S R Q(t+1) State

0 0 1 1 0 0 Q(t) No Change
0 1 0 Reset
0 1 0 0
1 0 1 Set
0 1 1 0
1 1 X Indeterminant
1 0 0 1

1 0 1 1
Excitation table of S-R Flip-Flop
1 1 0 X
Q(t) Q(t+1) S R
1 1 1 X 0 0 0 X
0 1 1 0
1 0 0 1
1 1 X 0
JK Flip Flop
• Because of the invalid state corresponding to S=R=1 in the SR flip-flop, there is a
need of another flip-flop.
• The operation of the JK flip-flop is similar to the SR flip-flop. When the input J
and K are different then the output Q takes the value of J at the next clock edge.
• When J and K both are low then NO change occurs at the output. If both J and K
are high, then at the clock edge, the output will toggle from one state to the other.
Characteristics Table of JK Flip-Flop Truth Table of JK Flip-Flop

J K Q(t) Q(t+1) J K Q(t+1) State


0 0 0 0 0 0 0 No Change
0 0 1 1 0 1 0 Reset
0 1 0 0 1 0 1 Set
0 1 1 0 1 1 Toggles Toggle
1 0 0 1

1 0 1 1 Excitation Table of JK Flip-Flop


1 1 0 1
Q(t) Q(t+1) J K
1 1 1 0
0 0 0 X
0 1 1 X
1 0 X 1
1 1 X 0
D Flip flop
• In a D flip-flop, the output can only be changed at positive or negative clock
transitions, and when the inputs changed at other times, the output will remain
unaffected.
• The D flip-flops are generally used for shift-registers and counters.
• The change in output state of D flip-flop depends upon the active transition of
clock. The output (Q) is same as input and changes only at active transition of
clock.
Characteristics Table of D Flip-Flop Truth Table of D Flip-Flop

D Q(t+1)
D Q(t) Q(t+1) 0 0
1 1
0 0 0

0 1 0 Excitation Table of D Flip-Flop

Q(t+1) Q(t) D
1 0 1

0 0 0
1 1 1

0 1 1

1 0 0

1 1 1
T Flip Flop
• A T flip-flop (Toggle Flip-flop) is a simplified version of JK flip-flop.
• The T flop is obtained by connecting the J and K inputs together.
• The flip-flop has one input terminal and clock input.
• These flip-flops are said to be T flip-flops because of their ability to
toggle the input state. These are mostly used in counters.
Characteristics Table of T Flip-Flop
Truth Table of T Flip-Flop

T Q(t) Q(t+1) T Q(t+1)


0 Q(t)
0 0 0 1 Q(t)

0 1 1
Excitation Table of T Flip-Flop
1 0 1
Q(t+1) Q(t) T
1 1 0
0 0 0

0 1 1

1 0 1

1 1 0
Master Slave Flip flop
• Master Slave JK Flip Flop is a combination of two JK flip flops which are
connected in the cascaded manner.
• In this combination of two JK flip flop, one acts as a master flip flop and the other
acts as a slave flip flop.
• In this master-slave flip flop, the outputs of the master JK flip flop are connected
to the inputs of the slave JK flip flop. The outputs of the slave flip flop are fed
back to the inputs of the master JK flip flop.
• In the master-slave JK flip flop, a NOT gate (Inverter) is also used which is
connected to clock signal in a manner that the inverted clock signal is applied to
the slave flip flop.
• Therefore, when clock signal to master flip flop is 0, then for slave flip flop the
clock signal is 1, and if the clock signal to master flip flop is 1, then for the slave
flip flop it 0.
Block Diagram for Master Slave

Timing Diagram for Master Slave


Truth Table for Master Slave

Inputs Output
Comment
J K Qn+1
0 0 Qn No Change
0 1 0 Reset
1 0 1 Set
1 1 Qn ' Toggle
Shift Registers
• The Shift Register is another type of sequential logic circuit that can be used for
the storage or the transfer of binary data.
• This sequential device loads the data present on its inputs and then moves or
“shifts” it to its output once every clock cycle, hence the name Shift Register.
• A shift register basically consists of several single bit “D-Type Data Latches”, one
for each data bit, either a logic “0” or a “1”, connected together in a serial
arrangement so that the output from one data latch becomes the input of the next
latch and so on.
• 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”.
• These are used in: Computer and Data Communication, Serial and parallel
communication, Multibit number storage, basic arithmetic, logical operations
Cont..
Types
• 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
Serial-In Serial-Out
• 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 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 Parallel-Out
• 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 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.
• 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
• 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 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.
• A Parallel in Serial Out (PISO) shift register is used to convert parallel data to
serial data.
Parallel-In parallel-Out
• 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 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.
Cont...
Bidirectional shift registers
• 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 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.
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.

You might also like