dld unit4
dld unit4
Meaning and It is a type of circuit that generates It is a type of circuit in which the output does not
Definition an output by relying on the input it only rely on the current input. It also relies on the
receives at that instant, and it stays previous ones.
independent of time.
Feedback A Combinational Circuit requires no The output of a Sequential Circuit, on the other
feedback for generating the next hand, relies on both- the previous feedback and
output. It is because its output has the current input. So, the output generated from
no dependency on the time the previous inputs gets transferred in the form of
instance. feedback. The circuit uses it (along with inputs) for
generating the next output.
Performance We require the input of only the In the case of a Sequential Circuit, the
current state for a Combinational performance is very slow and also comparatively
Circuit. Thus, it performs much lower. Its dependency on the previous inputs
faster and better in comparison makes the process much more complex.
with the Sequential Circuit.
Complexity It is very less complex in This type of circuit is always more complex in its
comparison. It is because it nature and functionality. It is because it
basically lacks implementation of implements the feedback, depends on previous
feedback. inputs and also on clocks.
Elementary Logic gates form the building/ Flip-flops form the building/ elementary blocks of a
Blocks elementary blocks of a Sequential Circuit.
Combinational Circuit.
Operation One can use these types of circuits You can mainly make use of these types of circuits
for both- Boolean as well as for storing data.
Arithmetic operations.
Counters
1. Compare Asynchronous counter and Synchronous counter
Ans: Let’s see the difference between these two counters:
The truth table of the count obtained on every positive edge is as shown.
A 3-bit Ripple counter using a JK flip-flop is as follows:
In the circuit shown in the above figure, Q0(LSB) will toggle for every clock pulse
because JK flip-flop works in toggle mode when both J and K are applied 1, 1, or
high input. The following counter will toggle when the previous one changes from
1 to 0.
The 3-bit ripple counter used in the circuit above has eight different states, each
one of which represents a count value. Similarly, a counter having n flip-flops can
have a maximum of 2 to the power n states. The number of states that a counter
owns is known as its mod (modulo) number. Hence a 3-bit counter is a mod-8
counter.
Timing diagram
The timing diagram shows the transition of the outputs on every positive edge of the clock.
Let us assume that the clock is positive edge triggered so the above the counter
will act as an up counter because the clock is positive edge triggered and output
is taken from Q.
of Step1:
counter
hasflip-flops
8 requires
determine
required.
three
theA
FFs.
number
3-bit
It
3.Design of a synchronous 3-bit up-down counter using JK flip-flops:
Ans:
Step1: determine the number of flip-flops required.
Step3: select the type of flip flop and draw the excitation table: JK flip-flops are selected and the
excitation table of a 3-bit up-down counter using JK flip-flops is drawn as shown in fig.
Step4: obtain the minimal expressions: From the excitation table we can conclude that J1=1 and
K1=1, because all the entries for J1and K1 are either X or 1. The K-maps for J3, K3,J2 and K2
based on the excitation table and the minimal expression obtained from them are shown in fig
Step5: draw the logic diagram: a logic diagram using those minimal expressions can be drawn
as shown in fig.
Que.4. Implement synchronous 3 bit up counter using JK flip flop.
Sate diagram:
Q Q t+1 J K
0 0 0 X
0 1 1 X
1 0 X 1
1 1 X 0
000 001 0X 0X 1X
001 010 0X 1X X1
010 101 0X X0 1X
011 100 1X X1 X1
100 101 X0 0X 1X
101 110 X0 1X X1
110 111 X0 X0 1X
111 000 X1 X1 X1
K Map
Logic Diagram for 3 bit UP counter
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
type daisy-chain
Shift Registers are used for data storage or for the movement of data and are
therefore commonly used inside calculators or computers to store data such
as two binary numbers before they are added together, or to convert the data
from either a serial to parallel or parallel to serial format. The individual data
latches that make up a single shift register are all driven by a common clock
( Clk ) signal making them synchronous devices.
Generally, shift registers operate in one of four different modes with the basic
movement of data through a shift register being:
Serial-in to Parallel-out (SIPO) – the register is loaded with serial
data, one bit at a time, with the stored data being available at the output in
parallel form.
Serial-in to Serial-out (SISO) – the data is shifted serially “IN” and
“OUT” of the register, one bit at a time in either a left or right direction under
clock control.
Parallel-in to Serial-out (PISO) – the parallel data is loaded into the
register simultaneously and is shifted out of the register serially one bit at a
time under clock control.
Parallel-in to Parallel-out (PIPO) – the parallel data is loaded
simultaneously into the register, and transferred together to their respective
outputs by the same clock pulse.
The operation is as follows. Lets assume that all the flip-flops ( FFA to FFD )
have just been RESET ( CLEAR input ) and that all the outputs QA to QD are at
logic level “0” ie, no parallel data output.
If a logic “1” is connected to the DATA input pin of FFA then on the first clock
pulse the output of FFA and therefore the resulting QA will be set HIGH to logic
“1” with all the other outputs still remaining LOW at logic “0”. Assume now that
the DATA input pin of FFA has returned LOW again to logic “0” giving us one
data pulse or 0-1-0.
The second clock pulse will change the output of FFA to logic “0” and the
output of FFB and QB HIGH to logic “1” as its input D has the logic “1” level on
it from QA. The logic “1” has now moved or been “shifted” one place along the
register to the right as it is now at QA.
When the third clock pulse arrives this logic “1” value moves to the output
of FFC ( QC ) and so on until the arrival of the fifth clock pulse which sets all
the outputs QA to QD back again to logic level “0” because the input to FFA has
remained constant at logic level “0”.
The effect of each clock pulse is to shift the data contents of each stage one
place to the right, and this is shown in the following table until the complete
data value of 0-0-0-1 is stored in the register. This data value can now be
read directly from the outputs of QA to QD.
Then the data has been converted from a serial data input signal to a parallel
data output. The truth table and following waveforms show the propagation of
the logic “1” through the register from left to right as follows.
Clock Pulse No QA QB QC QD
0 0 0 0 0
1 1 0 0 0
2 0 1 0 0
3 0 0 1 0
4 0 0 0 1
5 0 0 0 0
Note that after the fourth clock pulse has ended the 4-bits of data ( 0-0-0-1 )
are stored in the register and will remain there provided clocking of the
register has stopped. In practice the input data to the register may consist of
various combinations of logic “1” and “0”. Commonly available SIPO IC’s
include the standard 8-bit 74LS164 or the 74LS594.
You may think what’s the point of a SISO shift register if the output data is
exactly the same as the input data. Well this type of Shift Register also acts as
a temporary storage device or it can act as a time delay device for the data,
with the amount of time delay being controlled by the number of stages in the
register, 4, 8, 16 etc or by varying the application of the clock pulses.
Commonly available IC’s include the 74HC595 8-bit Serial-in to Serial-out
Shift Register all with 3-state outputs.
Definition A Mealy Machine changes its output on A Moore Machine’s output depends only on
the basis of its present state and current the current state. It does not depend on the
input. current input.
Output Mealy Machine places its output on the Moore machine also places its output on the
transition. transition.
States It has comparatively fewer or the same It has comparatively fewer or the same states
states as that of the Moore machine. as that of the Mealy machine.
Value of the When the input logic is done in the Whenever a change occurs in the state, the
Output Function present state, then the value of the output function’s value becomes the function
output function becomes a function of of its current state along with the changes at
transitions and changes. the edges of the clock.
Reaction to the A Mealy machine reacts comparatively In a Moore Machine, one requires more logic
Inputs faster to inputs than the Moore for decoding the output. As a result, it leads to
machine. Generally, it reacts in the very more delays in the circuit. Generally, these
same clock cycle. react after one clock cycle.
State and The asynchronous generation of output The state and output- both change the
Output through its state alters to synchronous synchronous to its clock edge.
on the present clock.
Requirement of A Mealy Machine generally requires The states for synthesis required for this
States only a very few states for the process of machine are also more.
synthesis.
Requirement of It requires very little hardware for One requires more hardware to design a
Hardware designing a Mealy Machine. Moore Machine.
Counter You cannot refer to the counter as a You can refer to the counter as a Moore
Mealy Machine. Machine.