Sequential Circuits
In this lecture, we will study
i. Flip-flops
ii. Sequential circuits (decoders and encoders, multiplexers, registers, counters,
and memory - RAM, ROM)
Sequential Circuits
9
Circuits
Combinational Sequential
Output depends on Output depends notonly
the current input on the current inputs
but also on the paststates
Needs some sort of memory
4
Sequential Circuit
5
Synchronous
Circuit output changes only at some
discrete instants of time.
A clock is needed.
Sequential Circuits
Asynchronous
Circuit output can change at any time.
No clock is needed.
6
Circuits
Sequential circuits
Combinational circuits
are made up of
are made up of GATES
GATES andFLIP-FLOPS
7
Synchronous Sequential Circuits with Flip-Flop as State Memory
8
Flip-Flops
9
SR(Set-Reset) Flip-Flop aka SR Latch
(a) Logic Diagram
An SRflip-flop has three inputs:
S (set)
R(reset)
C (clock)
It has an output Q, and sometimes (b) Graphical Symbol
has another, complemented output,
denoted by a little circle at the
other output terminal.
10
Operation of SRFlip-Flop
If there is no signal at the clock input, the output of the circuit cannot change
irrespective of the input.
When clock signal changes from 0 to 1, the following states are possible:
Characteristic Table
11
Function Table for SR Flip-Flop
12
D (Data) Flip-Flop: A slight modification of the SR flip-flop
An SRflip-flop can be converted to a D flip-flop by inserting an inverter between
Sand R, and assigning the symbol D to the single input.
The inverter makes sure that the inputs are never 1 simultaneously, thereby
eliminating the ‘indeterminate state’ that could occur in case of an SRflip-flop.
(a) Logic Diagram (b) Graphical Symbol
13
Operation of D Flip-Flop
If there is no signal at the clock input, the output of the circuit cannot change
irrespective of the input.
When clock signal changes from 0 to 1, the following states are possible:
Characteristic Table
14
Function Table for D Flip-Flop
15
JK Flip-Flop: A refinement of the SR flip-flop
Named after its inventor, Jack Kilby.
The inputs J and K behave like the inputs S and R, except when both J and K are
simultaneously 1, in which case, a clock transition switches the output of the flip-
flop to its complement state.
(a) Logic Diagram (b) Graphical Symbol
16
Operation of JK Flip-Flop
If there is no signal at the clock input, the output of the circuit cannot change
irrespective of the input.
When clock signal changes from 0 to 1, the following states are possible:
Characteristic Table
17
T (Toggle) Flip-Flop: A modification of the JKflip-flop
A T flip-flop is obtained from a JK flip-flop when inputs J and K are connected to
provide a single input (T).
(a) Logic Diagram (b) Graphical Symbol
18
Operation of T Flip-Flop
When T=0, a clock transition does not change the state of the flip-flop.
When T=1, a clock transition complements the state of the flip-flop.
Characteristic Table
19
Edge-Triggered Flip-Flops
An edge-triggered flip-flop changes states either at the positive/rising edge
or at the negative/falling edge of the clock pulse.
Positive Edge-Triggered Flip-Flop Negative Edge-Triggered Flip-Flop
20
Master-Slave Flip-Flops
Some circuits use two flip-flops; one is the MASTER and the other is the SLAVE.
The ‘master’ flip-flop responds to the POSITIVE level of the clock, while the
‘slave’ flip-flop responds to the NEGATIVE level of the clock.
21
Master-Slave JK Flip-Flop
22
Master-Slave SR Flip-Flop
23
Excitation Tables
Characteristic tables specify the next state of the flip-flop WHEN THE INPUTS
AND THE PRESENT STATEARE KNOWN.
But what about when we need to find out WHICH INPUT CONDITIONS WILL
GENERATE THE DESIRED TRANSITION?
For that, we need Excitation Tables.
24
Returning to Sequential Circuits…
25
State Diagrams
The information available in a state table can be represented
graphically using a‘State Diagram’.
In a state diagram:
• each STATEis represented by aCIRCLE
• each TRANSITION between states is represented by
DIRECTED LINES connecting the states
26
State Diagrams
27
Integrated Circuits
28
Integrated Circuits
An Integrated Circuit (IC) is a small silicon semiconductor chip that contains
electrical components for the digital gates.
Various gates are interconnected inside the chip to form the required circuit.
The chip is then mounter in a plastic or ceramic conatiner, and the
connections are welded by thin gold wires to external pins to form the
integrated circuits.
29
Integrated Circuits
30
ICs
31
Small Scale Integration (SSI)
less than 10 gates in a single package
Types of Integration Devices
Medium Scale Integration (MSI)
10-200 gates in a single package
Large Scale Integration (LSI)
between 200 to a few thousand gates
in a single package (processors, microchips)
Very Large Scale Integration (VLSI)
thousands of gates in a single package
(large memory arrays, complex microcomputer chips)
Skip to Next Component
32
TTL?
Integrated Circuits
Logic Families of
ECL?
MOS?
CMOS?
Skip to Next Component
33
Decoders
34
(Binary) Decoders
Information is represented in digital computers using binary codes;
a code of n bits can represent 2n distinct elements of information.
A binary decoder is a combinational circuit that converts binary information
from n coded inputs to a maximum of 2n unique outputs.
35
n-to-m Decoder
n-to-m line decoders (where m<=2n) have n inputs and they generate 2n (or
fewer) outputs.
36
n-to-m Decoder
(b) TruthTable
(a) Logic Diagram
37
n-to-m Decoder
with ‘enable’
(b) TruthTable
(a) Logic Diagram
38
2-to-4 Line Decoder with NAND Gates
(b) TruthTable
(a) Logic Diagram
39
Decoder Expansion
What do we do when we
need a certain-sized decoder
but only smaller decoders are
available?
We combine several
decoders with enable input
to from a larger decoder.
A 3 x 8 decoder constructed using two 2 x 4 decoders.
40
Encoders
41
(Binary) Encoders
An encoder performs the inverse operation of adecoder.
An encoder has 2n (or less) inputs and n output lines.
42
Octal to Binary Encoder
This encoder has eight inputs,
one for each of the octal digits,
and three outputs that
generate the corresponding
binary number.
Only one of the inputs has the
value of 1 at a time; otherwise,
the circuit has no meaning.
(a) Logic circuit
43
Octal to Binary Encoder
A=D 4 +D 5 +D 6 +D 7
B=D 2 +D 3 +D 6 +D 7
C=D 1 +D 3 +D 5 +D 7
(b) Truthtable
(a) Boolean functions
44
Multiplexers
45
Multiplexers
A multiplexer is a combinational circuit that receives binary
information from one of 2n input data lines and directs it to a single
output line.
46
4-to-1 Line Multiplexer
(a) Logic circuit (b) Function table
47
Quadruple 2-to-1 Line Mux
(a) BlockDiagram (b) Function Table
56
Registers
49
Registers
A register is a group of flip-flops, where each flip-flop holds one bit of
binary information.
A register may also contain additional combinational gates.
The flip-flops hold the binary information, while the gates control
when and how the new information istransferred into the register.
50
A Simple 4-Bit Register
This register is constructed
with four D flip-flops.
It has no gates.
A common clock triggers all
the flip-flops, and the binary
information available at the
four inputs is transferred
into the 4-bit register.
The clear input is used to
clear the register. 59
Register Load
The transfer of new information into the register is referred to asthe
‘loading of register’.
If all the bits of the register are loaded simultaneously with a common
clock pulse, we say that the loading is ‘done in parallel’.
52
4-Bit Register
with Parallel Load
53
Shift Registers
54
Shift Register
A register capable of shifting its binary information in one or more
directions is known as a ahift register.
Shift registers consist of a chain of flip-flops in cascade, with the output
of one flip-flop connected to the input of thenext.
All flip-flops receive a common clock pulse that initiates the shift from
one stage to the next.
55
A 4-Bit Shift Register
A simple 4-bit shift register with four cascading D flip-flops and a single clock.
56
Bidirectional Shift Register
With Parallel Load
Function Table
57
Binary Counters
58
Counter
A registers that goes through a predetermined sequence of states upon
the application of input pulses is called a counter.
The input pulse may be a clock or may come from an external source,
and may occur at uniform intervals of time or at random.
Counters are useful for counting the number of occurrences of an
event or for generating timing signals to control the sequence of
operations in a computer.
59
Types of Counters
AsynchronousCounters
(aka Ripple Counters)
Clock pulses are applied
SynchronousCounters
to the first flip-flop only;
all subsequent flip-flops All flip-flops receive
are clocked by the output a common clock pulse.
produced by the
preceding flip-flop.
60
4-Bit Asynchronous Counter (Ripple Counter)
61
Memory Unit
62
Memory
A memory unit is a collection of storage cells,
together with the associated circuits that areneeded
to transfer information in and out of the storage cells.
Memory stores information in groups of bits called WORDS.
(1 word = ? Bytes)
A word is the smallest entity that can be moved in/out of the memory.
63
Major Types of Memory
used in Computers
RAM ROM
Random AccessMemory Read Only Memory
64
RAM
In RAM,any random memory cell can be accessed directly.
That is, the process of locating a word in the memory is the same
and takes the same amount of time, regardless of the physical
location of the memory cell that holds the desired word.
RAM is volatile.
65
RAM
The two operations RAM can perform are READ and WRITE.
The ‘write’ signal specifies a transfer-in operation.
A ‘read’ operation specifies a transfer-out operation.
66
Block Diagram of RAM
67
Block Diagram of RAM
8 data input lines
In an m x n RAM
chip, ‘n’ is the
number of data 7 addresslines
Read
128 x 8
lines and ‘k’ is
Write RAM
the number of
address lines,
where 2 k = m
8 data output lines
68
Steps for transferring a word in or out of the memory
The ‘Transfer-In’Process:
The ‘Transfer-Out’Process:
i.Apply the binary addressof the
desired word into the address lines.
i. Apply the binary address of the
ii.Apply the data bits that must be
desired word into the address
stored in memory into the data
lines.
input lines.
iii. Activate the ‘write’ input. ii. Activate the ‘read’ input.
69
ROM
ROM is a memory unit that only performs the read operation; it does
not have a write capability.
The binary information stored in a ROM is made permanent when
the hardware is produced, and this information cannot* be altered
afterwards.
Unlike RAM, ROM is non-volatile.
* Atleast not without special equipment.
70
Block Diagram of ROM
71
72