DLD Computer Science Lecture 4
DLD Computer Science Lecture 4
G. Kassahun B.
Introduction
• Latches
• Flip-Flops
2
4. Sequential Logic circuits
Introduction
• A sequential circuit consists of a feedback path, and employs
G. Kassahun B.
some memory elements.
Combinational Memory
logic elements
External inputs 3
Sequential circuit = Combinational logic + Memory Elements
4. Sequential Logic circuits
Introduction
• Based on timing signal sequential circuits can be classified into
G. Kassahun B.
I. Asynchronous sequential circuit and
II. Synchronous sequential circuits
G. Kassahun B.
I. Asynchronous SLC
• A sequential logic whose behavior can be defined from the
knowledge of its signal at discrete time.
• Its behavior depends upon the input signal at any instant of time
5
4. Sequential Logic circuits
Introduction
G. Kassahun B.
II. Synchronous SLC
• Employs signals that affect the storage element at discrete
instants of time.
• Synchronization is achieved by a clock generator that provides a
6
4. Sequential Logic circuits
Introduction
• To remember the past inputs and state of logic, sequential
G. Kassahun B.
logic circuits require memory element.
• Memory element is just like CLC but differ only in there
G. Kassahun B.
• A single latch or flip-flop can store only one bit of information.
This bit of information that is stored in a latch or flip-flop is
referred to as the state of the latch or flip-flop.
8
4. Sequential Logic circuits
LATCHES AND FLIP-FLOPS
The main difference between a latch and a flip-flop
G. Kassahun B.
• for a Latch, its state or output is constantly affected by its
input as long as its enable signal is asserted.
• In other words, when a latch is enabled, its state changes
9
4. Sequential Logic circuits
LATCHES AND FLIP-FLOPS
G. Kassahun B.
The main difference between a latch and a flip-flop
• On the other hand, a Flip – Flop changes state only at the
active edge of its enable signal i.e., at precisely the moment
10
4. Sequential Logic circuits
LATCHES AND FLIP-FLOPS
• In a microprocessor system, changes usually occur at precisely
G. Kassahun B.
the same moment.
• Hence, flip-flops are used more often than latches, since they
11
4. Sequential Logic circuits
LATCHES AND FLIP-FLOPS
• Basically, there are four main types of flip-flops
G. Kassahun B.
• SR, D, JK, and T
• The major differences between them are the number of
12
4. Sequential Logic circuits
Bistable element
G. Kassahun B.
• The simplest memory circuit constructed by connecting two
inverters in series,
• Has two symmetrical nodes labeled Q and Q' both which can
13
4. Sequential Logic circuits
Bistable element
G. Kassahun B.
• Bistable element circuit and state table are shown bellow
14
4. Sequential Logic circuits
SR Latch
G. Kassahun B.
• A circuit with two cross coupled NAND gate or NOR gate
• Is of two type
• Active – HIGH input SR Latch and
15
4. Sequential Logic circuits
SR Latch
• Active – LOW input 𝑆’𝑅’ Latch
G. Kassahun B.
ECENG 3101 Lecture 4
• Active – HIGH input SR Latch
16
4. Sequential Logic circuits
Clocked S - R Latch
• Adding two NAND gates to the basic S - R NAND latch gives
G. Kassahun B.
the clocked S – R latch:
• C is “control” or “clock”.
17
4. Sequential Logic circuits
D LATCH
G. Kassahun B.
• Eliminates the undesirable condition of the indeterminate
state in SR – Latch.
• Achieved by adding an inverter to SR – Latch
G. Kassahun B.
• Flip-flops: synchronous bistable devices
• Output changes state at a specified point on a triggering input
called the clock.
Clock signal
G. Kassahun B.
• S-R, D and J-K edge-triggered flip-flops. Note the “>” symbol at
the clock input.
G. Kassahun B.
❖ S=HIGH (and R=LOW) a SET state
❖ R=HIGH (and S=LOW) a RESET state
❖ both inputs LOW a no change
21
4. Sequential Logic circuits
S-R Flip – Flops
G. Kassahun B.
▪ It comprises 3 parts:
❖ a basic NAND latch
❖ a pulse-steering circuit
22
4. Sequential Logic circuits
D Flip – Flops
G. Kassahun B.
▪ D flip-flop: single input D (data)
❖ D=HIGH a SET state
❖ D=LOW a RESET state
23
4. Sequential Logic circuits
D Flip – Flop
▪ Application: Parallel data transfer.
G. Kassahun B.
To transfer logic-circuit outputs X, Y, Z to flip-flops Q1, Q2 and
Q3 for storage.
G. Kassahun B.
▪ J-K flip-flop: Q and Q' are fed back to the pulse-steering NAND
gates.
▪ No invalid state.
25
4. Sequential Logic circuits
J-K Flip-flop
G. Kassahun B.
ECENG 3101 Lecture 4
26
4. Sequential Logic circuits
T Flip-flop
G. Kassahun B.
ECENG 3101 Lecture 4
27
4. Sequential Logic circuits
T Flip – Flop
G. Kassahun B.
ECENG 3101 Lecture 4
28
4. Sequential Logic circuits
S-R Master-Slave Flip-Flop
G. Kassahun B.
• Consists of two clocked
S-R latches in series
with the clock on the
29
4. Sequential Logic circuits
SR Master – slave Flip – Flops
• The change in the flip-flop output is delayed by the pulse
G. Kassahun B.
width which makes the circuit slower or
• S and/or R are permitted to change while C = 1
• Suppose Q = 0 and S goes to 1 and then back to 0 with
G. Kassahun B.
• Use edge-triggering instead of master-slave
• An edge-triggered flip-flop ignores the pulse while it is at a
constant level and triggers only during a transition of the clock
31
4. Sequential Logic circuits
Edge-Triggered D Flip-Flop
• The edge-triggered D flip-flop is the
G. Kassahun B.
same as the master-slave D flip-flop
• It can be formed by:
• Replacing the first clocked S-R latch with a clocked D latch or
G. Kassahun B.
• Formed by
adding inverter
to clock input
33
4. Sequential Logic circuits
Flip – Flops with Asynchronous Inputs
▪ S-R, D and J-K inputs are synchronous inputs, as data on these
G. Kassahun B.
inputs are transferred to the flip-flop’s output only on the
triggered edge of the clock pulse.
▪ Asynchronous inputs affect the state of the flip-flop
G. Kassahun B.
• A J-K flip-flop with active-LOW preset and clear inputs
G. Kassahun B.
• Example showing how a clocked flip-flop responds to asynchronous
inputs.
G. Kassahun B.
• Example: construct the following sequential logic circuit sing D
flip flop
• 𝐷𝐴 = 𝐴 ⊗ 𝑥 ⊗ 𝑦
G. Kassahun B.
such as oscillators, timers and flip-flops. It is characterized by two amplifying
devices (transistors, electron tubes or other devices) cross-coupled by resistors
and capacitors.
• There are three types of multivibrator circuit:
G. Kassahun B.
ECENG 3101 Lecture 4
39
4. Sequential Logic circuits
Astable Multivibrator:
G. Kassahun B.
• An astable multivibrators is also called a free-running
multivibrators.
• The astable multivibrators generates a continuous flow of
40
4. Sequential Logic circuits
• Astable Multivibrators
G. Kassahun B.
• 555 timer IC wired as a astable multivibrator
G. Kassahun B.
• A monostable multivibrator is also called a one-shot
multivibrator.
• When the one-shot is triggered, the multivibrator generates a
42
4. Sequential Logic circuits
Monostable Multivibrator:
G. Kassahun B.
• 555 timer IC wired as a one shot
G. Kassahun B.
ECENG 3101 Lecture 4
44