3 Flip Flops and Sequential Circuits
3 Flip Flops and Sequential Circuits
2
1. F(A, B, C, D) = Σ (1, 3, 7, 8, 9, 12, 13, 14, 15)
C, D
A, B 00 01 11 10
00 0 1 1 0
01 0 0 1 0
11 1 1 1 1
10
1 1 0 0
F = AB+A’B’D+BCD+AC’
3
2. F(A, B, C, D) = Π(0, 2, 4, 5, 8, 10, 12, 13)
C, D
A, B 00 01 11 10
00 0 1 1 0
01 0 0 1 1
11 0 0 1 1
10
0 1 1 0
F = (B’+C)(B+D)
4
Homework 2 from Previous Lecture
5
Boolean Function Truth Table
x y x’ y’ x’y’ x+x’y’
(=F)
0 0 1 1 1 1
0 1 1 0 0 0
F = x + x’ y’
1 0 0 1 0 1
1 1 0 0 0 1
6
x’ x+x’y’
x
x’y’
y’
y
7
In this lecture, we will study
i. Flip-flops
9
Circuits
Combinational Sequential
11
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.
12
Circuits
Sequential circuits
Combinational circuits
are made up of
are made up of GATES
GATES and FLIP-FLOPS
13
Synchronous Sequential Circuits with Flip-Flop as State Memory
14
Flip-Flops
15
SR (Set-Reset) Flip-Flop aka SR Latch
S (set)
R (reset)
C (clock)
16
Operation of SR 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
Function Table for SR Flip-Flop
18
D (Data) Flip-Flop: A slight modification of the SR flip-flop
The inverter makes sure that the inputs are never 1 simultaneously, thereby
eliminating the ‘indeterminate state’ that could occur in case of an SR 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
20
Function Table for D Flip-Flop
21
JK Flip-Flop: A refinement of the SR flip-flop
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.
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
23
T (Toggle) Flip-Flop: A modification of the JK flip-flop
When T=0, a clock transition does not change the state of the flip-flop.
Characteristic Table
25
Edge-Triggered 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.
27
Master-Slave JK Flip-Flop
28
Master-Slave SR Flip-Flop
29
Excitation Tables
Characteristic tables specify the next state of the flip-flop WHEN THE INPUTS
AND THE PRESENT STATE ARE KNOWN.
But what about when we need to find out WHICH INPUT CONDITIONS WILL
GENERATE THE DESIRED TRANSITION?
30
Excitation Tables
31
Returning to Sequential Circuits…
32
State Tables
State Table
33
State Diagrams
In a state diagram:
34
State Diagrams
35
Integrated Circuits
36
Integrated Circuits
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.
37
Integrated Circuits
38
ICs
39
Small Scale Integration (SSI)
less than 10 gates in a single package
Integrated Circuits
Logic Families of
ECL?
MOS?
CMOS?
Skip to Next Component
41
Decoders
42
(Binary) Decoders
43
n-to-m Decoder
n-to-m line decoders (where m<=2n) have n inputs and they generate 2n (or
fewer) outputs.
44
n-to-m Decoder
45
n-to-m Decoder
with ‘enable’
47
Decoder Expansion
What do we do when we
need a certain-sized decoder
but only smaller decoders are
available?
We combine several
encoders with enable input
to from a larger decoder.
48
Encoders
49
(Binary) Encoders
50
Octal to Binary Encoder
A=D1+D3+D5+D7
B=D2+D3+D6+D7
C=D4+D5+D6+D7
(a) Boolean functions (b) Truth table
52
Multiplexers
53
Multiplexers
54
4-to-1 Line Multiplexer
57
Registers
The flip-flops hold the binary information, while the gates control
when and how the new information is transferred into the register.
58
A Simple 4-Bit 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’.
60
4-Bit Register
with Parallel Load
61
Shift Registers
62
Shift Register
All flip-flops receive a common clock pulse that initiates the shift from
one stage to the next.
63
A 4-Bit Shift Register
A simple 4-bit shift register with four cascading D flip-flops and a single clock.
64
Bidirectional Shift Register
With Parallel Load
Function Table
65
Binary Counters
66
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.
68
Designing a 2-Bit Binary Counter: Step 2
69
Designing a 2-Bit Binary Counter: Step 3
Now we know the present and next states for this counter. In other words,
we know the exact state transitions we need from this counter.
70
Designing a 2-Bit Binary Counter: Step 3
Excitation Table
Present Next
State State
71
Designing a 2-Bit Binary Counter: Step 3
Excitation Table
Present Next
State State
72
Designing a 2-Bit Binary Counter: Step 3
Excitation Table
Present Next
State State
73
Designing a 2-Bit Binary Counter: Step 3
Excitation Table
Present Next
State State
74
Designing a 2-Bit Binary Counter: Step 3
Excitation Table
Present Next
State State
75
Designing a 2-Bit Binary Counter: Step 3
Now, since the inputs to the counter are represented in terms of x, A, and B,
and the inputs to the two flip-flops are represented as JA, KA, JB, and KB,
we need to find a way to represent JA, KA, JB, and KB in terms of A, B, and x.
Using the excitation table for the binary counter that we generated in Step 3,
we construct four K-maps, one each for JA, KA, JB, and KB.
78
Designing a 2-Bit Binary Counter: Step 4
B, x
A 00 01 11 10
0 0 0 1 0
1 x x x x
K-Map for JA
JA=Bx
79
Designing a 2-Bit Binary Counter: Step 4
B, x B, x
A 00 01 11 10 A 00 01 11 10
0 0 0 1 0 0 x x x x
1 x x x x 1 0 0 1 0
JA=Bx KA=Bx
B, x B, x
A 00 01 11 10 A 00 01 11 10
0 0 1 x x 0 x x 1 0
1 0 1 x x 1 x x 1 0
JB=x KB=x
80
Designing a 2-Bit Binary Counter: Step 5
JA=Bx JB=x
KA=Bx KB=x
Boolean Expressions
Logic diagram for two-bit counter
81
Create state diagram
Asynchronous Counters
(aka Ripple Counters)
Clock pulses are applied
Synchronous Counters
to the first flip-flop only;
All flip-flops receive
all subsequent flip-flops
a common clock pulse.
are clocked by the output
produced by the
preceding flip-flop.
83
4-Bit Asynchronous Counter (Ripple Counter)
84
4-Bit Synchronous
Binary Counter
85
Memory Unit
86
Memory
A word is the smallest entity that can be moved in/out of the memory.
87
Major Types of Memory
used in Computers
RAM ROM
Random Access Memory Read Only Memory
88
RAM
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.
89
RAM
The two operations RAM can perform are READ and WRITE.
90
Block Diagram of RAM
91
Block Diagram of RAM
In an m x n RAM
chip, ‘n’ is the
7 address lines
number of data
Read
128 x 8
lines and ‘k’ is Write RAM
the number of
address lines,
where 2 k = m
8 data output lines
92
Steps for transferring a word in or out of the memory
ROM is a memory unit that only performs the read operation; it does
not have a write capability.
94
Block Diagram of ROM
95
Types of ROM
96
ROM
Utility of ROM?
97
98
Homework
2. How many 128x8 memory chips are needed to provide a memory capacity of
4096x16?
99