The combinational circuits that modify the binary data into N output lines are known as Encoders.
The combinational circuits
that convert the binary data into 2N output lines are called Decoders.
How does encoder decoder work?
The encoder network maps the input data into a numerical representation that captures the important information from the
input. Thee numerical representation of the input data is also called as hidden state. The numerical representation (hidden
state) is then fed into what's called as the decoder network.
Types of Sequential Circuits
Following are the two types of sequential circuits −
Asynchronous sequential circuits
Synchronous sequential circuits
Asynchronous sequential circuits Synchronous sequential circuits
If some or all the outputs of a sequential If all the outputs of a sequential circuit
circuit do not change affect change affect
with respect to active transition of clock with respect to active transition of clock
signal, then that sequential circuit is called signal, then that sequential circuit is called
as Asynchronous sequential circuit. That as Synchronous sequential circuit. That
means, all the outputs of asynchronous means, all the outputs of synchronous
sequential circuits do not change affect sequential circuits change affect
at the same time. Therefore, most of the at the same time. Therefore, the outputs
outputs of asynchronous sequential of synchronous sequential circuits are in
circuits are not in synchronous with either synchronous with either only positive
only positive edges or only negative edges edges or only negative edges of clock
of clock signal. signal.
Clock Signal and
Triggering
Clock signal
Clock signal is a periodic signal and its ON time and OFF time need not be the same. We can represent the clock signal as a
square wave, when both its ON time and OFF time are same. This clock signal is shown in the following figure.
the above figure, square wave is considered as clock signal. This signal stays at logic High 5V
for some time and stays at logic Low 0V
for equal amount of time. This pattern repeats with some time period. In this case, the time period will be equal to either
twice of ON time or twice of OFF time.
We can represent the clock signal as train of pulses, when ON time and OFF time are not same. This clock signal is shown
in the following figure.
In the above figure, train of pulses is considered as clock signal. This signal stays at logic High 5V
for some time and stays at logic Low 0V
for some other time. This pattern repeats with some time period. In this case, the time period
will be equal to sum of ON time and OFF time.
The reciprocal of the time period of clock signal is known as the frequency of the
clock signal. All sequential circuits are operated with clock signal. So, the
frequency at which the sequential circuits can be operated accordingly the clock
signal frequency has to be chosen.
Types of Triggering
Following are the two possible types of triggering that are used in
sequential circuits.
•Level triggering
•Edge triggering
Level triggering
There are two levels, namely logic High and logic Low in
clock signal. Following are the two types of level
triggering.
Positive level triggering
Negative level triggering
If the sequential circuit is operated with the
clock signal when it is in Logic Low, then that
type of triggering is known as Negative level
triggering. It is highlighted in the following
figure.
Edge triggering
There are two types of transitions that occur in clock signal. That means, the clock signal
transitions either from Logic Low to Logic High or Logic High to Logic Low.
Following are the two types of edge triggering based on the transitions of clock signal.
Positive edge triggering
Negative edge triggering
If the sequential circuit is operated with the clock
signal that is transitioning from Logic Low to Logic
High, then that type of triggering is known as
Positive edge triggering. It is also called as rising
edge triggering. It is shown in the following figure.
If the sequential circuit is operated with the clock
signal that is transitioning from Logic High to Logic
Low, then that type of triggering is known as Negative
edge triggering. It is also called as falling edge
triggering. It is shown in the following figure.
There are two types of memory elements based on the type of triggering that is suitable
to operate it.(stores 1 bit information 0 or 1)
Latches
Flip-flops
In the same way that gates are the building blocks of combinatorial circuits, latches and flip-
flops are the building blocks of sequential circuits.
While gates had to be built directly from transistors, latches can be built from gates, and
flip-flops can be built from latches. This fact will make it somewhat easier to understand
latches and flip-flops.
Both latches and flip-flops are circuit elements whose output depends not only on the current
inputs, but also on previous inputs and outputs. The difference between a latch and a flip-
flop is that a latch does not have a clock signal, whereas a flip-flop always does.
Latches
A latch has positive feedback. Here is an example of a simple latch:
This latch is called SR-latch, which stands for set and reset.
The SR-latch is meant to have at most one of its inputs equal to 1 at any time. When both of its inputs
are 0 it has two different stable states possible. Either x is 0, in which case we have the following signal
values:
or else x is 1, in which case we have the following signal values:
Now suppose that s is 1 (and therefore r is 0 since we allow at most one input to be 1 at any time). We get the
following signal values:
The 1 on the s input makes sure the output of the upper nor-gate is 0, and the two 0s on the input of the
lower nor-gate make sure the x output is 1.
Now suppose the s input goes from 1 to 0, while the r input remains at 0. The second input
of the upper nor-gate is 1, so the transition from 1 to 0 of the s input, does not make any
difference. The x output remains at 1. In this case, if the s and r inputs are both 0, there is
only one possible stable state, the one that gives x the value 1.
Conversely, suppose that r is 1 (and therefore s is 0 since we allow at most one input to be 1
at any time). We get the following signal values:
The 1 on the r input makes sure the x output is 0, and the two 0s on the input of the upper
nor-gate make sure the output of the upper nor-gate is 0.
Now suppose the r input goes from 1 to 0, while the s input remains at 0. The second input of
the lower nor-gate is 1, so the transition from 1 to 0 of the r input, does not make any
difference. The output of the upper nor-gate remains at 1. In this case, if the s and r inputs are
both 0, there is only one possible stable state, the one that gives x the value 0.
From the discussion above, we conclude that the SR-latch is able to remember the last state
of the inputs, in the sense that it remembers which of the two inputs, s or r, last had the value
of 1.
When we need to draw an SR-latch, we use the following symbol:
Flip-flops
Latches are asynchronous, which means that the output changes very soon after the input changes. Most
computers today, on the other hand, are synchronous, which means that the outputs of all the sequential circuits
change simultaneously to the rhythm of a global clock signal.
A flip-flop is a synchronous version of the latch. To complicate the situation even more, there are several
fundamental types of flip-flops. Here, we shall only consider a type called master-slave flip-flop.
In addition to the fundamental types of flip-flops, there are minor variations depending on the number of inputs
and how they control the state of the flip-flop. Here, we shall only consider a very simple type of flip-flop called a
D-flip-flop. A master-slave D-flip-flop is built from two SR-latches and some gates. Here is the circuit diagram:
FLIP-FLOP
A flip-flop in digital electronics is a circuit with two stable states that can be used to store binary
data. The stored data can be changed by applying varying inputs. Flip-flops and latches are
fundamental building blocks of digital electronics systems used in computers, communications, and
many other types of systems. Both are used as data storage elements.
Flip-flops and latches are used as data storage elements to store a single bit (binary
digit) of data; one of its two states represents a "one" and the other represents a "zero".
Such data storage can be used for storage of state, and such a circuit is described as
sequential logic in electronics.
There are four basic types of flip-flops. They are: Latch or Set-Reset (SR) flip-flop. JK flip-flop. T (Toggle) flip-flop.