1 Unit 2 Flip Flops
1 Unit 2 Flip Flops
BEC-104
B.Tech, II Sem. First Year (ECE-AI)
❖ The three simplest gates are the AND, OR, and NOT gates.
5
Logic Gates
❖NAND and NOR are two very important gates. Their
symbols and truth tables are shown at the right.
6
Realization of Basic Gates with Universal Gates
• NAND and NOR are known as universal gates
because they are inexpensive to manufacture and
any Boolean function can be constructed using only
NAND or only NOR gates.
7
Logic Gates
• Gates can have multiple inputs and more than one
output.
– A second output can be provided for the complement of
the operation.
– We’ll see more of this later.
8
Sequential Circuits
❖Combinational logic circuits are perfect for situations
when we require the immediate application of a
Boolean function to a set of inputs.
❖ There are other times, however, when we need a
circuit to change its value with consideration to its
current state as well as its inputs.
❖These circuits have to “remember” their
current state.
❖Sequential logic circuits provide this functionality for
us.
9
Sequential Circuits
• As the name implies, sequential logic circuits
require a means by which events can be
sequenced.
• State changes are controlled by clocks.
– A “clock” is a special circuit that sends electrical
pulses through a circuit.
• Clocks produce electrical waveforms such as
the one shown below.
10
Sequential Circuits
❖State changes occur in sequential circuits only
when the clock ticks.
❖Circuits can change state on the rising edge,
falling edge, or when the clock pulse reaches its
highest voltage.
11
Sequential Circuits
• Circuits that change state on the rising edge, or
falling edge of the clock pulse are called edge-
triggered.
• Level-triggered circuits change state when
the clock voltage reaches its highest or lowest
level.
12
Sequential Circuits
❖To retain their state values, sequential circuits
rely on feedback.
❖Feedback in digital circuits occurs when an
output is looped back to the input.
❖A simple example of this concept is shown
below.
▪ If Q is 0 it will always be 0, if it is 1, it will
always be 1. Why?
13
Sequential Circuits
❖You can see how feedback works by examining
the most basic sequential logic components,
the SR flip-flop.
❖S R stands for S=SET & R=Reset.
❖Internals of an SR flip-flop are shown below,
along with its block diagram.
14
Sequential Circuits
❖Behavior of an SR flip-flop is described by a
characteristic table.
❖Q(t) means the value of the output at time t.
Q(t+1) is the value of Q after the next clock
pulse.
15
SR Flip Flop
Sequential Circuits
❖SR flip-flop actually has
three inputs: S, R, and its
current output, Q.
❖Construct a truth table for
this circuit.
❖Notice the two undefined
values. When both S
and R are 1, the SR flip-
flop is unstable.
17
Sequential Circuits
❖If we can be sure that the inputs to an SR flip-flop will
never both be 1, we will never have an unstable
circuit. This may not always be the case.
18
Sequential Circuits
❖ At the right, we see how an SR flip-flop can be modified
to create a JK flip-flop.
❖ The characteristic table indicates that the flip-flop is
stable for all inputs.
19
JK Flip Flop
Qt J K Qt+1
0 0 0 0
0 01 0
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 0
Sequential Circuits
• Another modification of the SR flip-flop is the D flip-
flop, shown below with its characteristic table.
• You will notice that the output of the flip-flop remains
the same during subsequent clock pulses. The output
changes only when the value of D changes.
21
D Flip Flop
22
T Flip Flop
23