Combinational & Sequential Logics
Combinational & Sequential Logics
SEQUENTIAL CIRCUITS
COMBINATIONAL CIRCUITS
Digital Components
4
Combinational Circuits
• We have designed a circuit that implements the
Boolean function:
5
Combinational Circuits
6
Combinational Circuits
7
Combinational Circuits
8
Combinational Circuits
9
Combinational Circuits
10
SEQUENTIAL CIRCUITS
LOGIC CIRCUITS
Combinational Logic
o The main characteristic of combinational logic circuits is that their output values depend
on their present input values ONLY like in adders.
Sequential Logic
o Sequential logic circuits differ from combinational logic circuits because they contain
memory elements so that their output values depend on both present and past input
values.
TIME
• Until now: In Combinational circuits, we have essentially ignored the issue
of time.
• We have assumed that our digital logic circuits perform their computations
instantaneously.
• Our digital logic circuits have been “stateless” – Once you present a new
input, they forget everything about previous inputs.
• In reality, time is an important issue.
• Even our logic gates induce a small amount of delay (on the order of a few
nanoseconds).
• For much of what we do – we actually want our circuits to have some form
of memory.
ASYNCHRONOUS VS SYNCHRONOUS
Latches
A latch is a memory element whose excitation signals (input control
signals) control the state of the device.
A latch has 2 stages set and reset.
o Set stage sets the output to 1.
Flip-flops
A flip-flop is a memory device that has clock signals control the state
of the device.
MEMORY DEVICES
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.
SEQUENTIAL CIRCUITS
• Asynchronous
Inputs Outputs
Combinational
Circuit
Memory
Elements
• Synchronous
Inputs Outputs
Combinational
Circuit
Flip-flops
Clock
LATCH
1
0 Q
S
Initial Value
SR - Latch
S R Q0 Q Q’
0 0 0 0 1 Q = Q0
0 0 1 1 0 Q = Q0
Initial Value
R 0 1
Q
S Q
0 0
SR - Latch
S R Q0 Q Q’
0 0 0 0 1
Q = Q0
0 0 1 1 0
Initial Value 0 1 0 0 1 Q=0
R 1 0
Q
S Q
0 1
SR - Latch
S R Q0 Q Q’
S=R=0
0 0 0 0 1
Q = Q0
0 0 1 1 0
Initial Value 0 1 0 0 1 Q=0
R 1
R=1
1 0 1 1 0 1 Q=0
Q
S Q
0 0
SR - Latch
S R Q0 Q Q’
S=R=0
0 0 0 0 1
Q = Q0
0 0 1 1 0
Initial Value 0 1 0 0 1
R 0
Q=0 R=1
0 0 1 1 0 1
Q 1 0 0 1 0 Q=1
S Q
1 1
SR - Latch
S R Q0 Q Q’
0 0 0 0 1
Q = Q0
0 0 1 1 0
Initial Value 0 1 0 0 1
R 0
Q=0
1 0 1 1 0 1
Q 1 0 0 1 0 Q=1
1 0 1 1 0 Q=1
S Q
1 0
SR - Latch
S R Q0 Q Q’
0 0 0 0 1
Q = Q0
0 0 1 1 0
Initial Value 0 1 0 0 1
R 1
Q=0
0 0 1 1 0 1
Q 1 0 0 1 0
Q=1
1 0 1 1 0
1 1 0 0 0 Q = Q’
S Q
1 10
SR - Latch
S R Q0 Q Q’
0 0 0 0 1
Q = Q0
0 0 1 1 0
Initial Value 0 1 0 0 1
R 1
Q=0
10 0 1 1 0 1
Q 1 0 0 1 0
Q=1
1 0 1 1 0
1 1 0 0 0 Q = Q’
1 1 1 0 0 Q = Q’
S Q
1 0
SR - Latch
S R Q
0 0 Q0 No change
0 1 0 Reset
1 0 1 Set
1 1 Q=Q’=0 Invalid
Once set, the output will remain at 1 (remembers its state) even though the S input goes
low.
Similarly, Once reset, the output will remain at 0 (remembers its state) even though the R
input goes low.
Invalid input shows that we could have ideally 1 input high & 1 input low in order to set &
reset. Also Q & its complement cannot be same for same value of inputs. So it is an invalid
condition.
SR Flip Flop
Clock controlled flip-flop changes its state only when the clock C is high.
C S R Q
R R
Q 0 x x Q0 No change
C 1 0 0 Q0 No change
S Q 1 0 1 0 Reset
S
1 1 0 1 Set
1 1 1 Q=Q’ Invalid
D Flip Flop
• The D flip-flop is the modification of the SR flip flop which is shown in the figure.
• The input D goes directly into the input S and the complement of the input D goes
to the input R.
• The D input is sampled during the existence of a clock pulse.
– If it is 1, then the flip-flop is switched to the set state.
D S
Q
C
R Q
D Flip Flop
• D Flip Flop (D = Data) Timing Diagram
Q follows D, when clock is high
C
D S
Q D
C
R Q
Q
C D Q Output may
0 x Q0 No change change
1 0 0 Reset
1 1 1 Set
Flip Flop Vs Latch
Latches are building blocks of sequential circuits & these can be made by Logic Gates
Whereas Flip Flops are also building blocks of sequential circuits but these can be built
from Latches.
Latch continuously checks for inputs & changes the output whenever there is a change
in input. Flip Flop also continuously checks input, but changes the output time
determined by clock. [so, even though if inputs are changed, it may not change the
output at the same time].
When there are multiple inputs/outputs, flip flop is used, that controls the sequence of
the circuit with the help of a clock.
That is Flip Flop mechanism is used to synchronize circuits so that the data does not
change unnecessarily.
ALLAH HAFIZ