Class 2
Class 2
Fundamentals
□ Bit: A binary digit; can have a value of 0 or 1
A out
0 1
1 0
A B Out
0 0 0
0 1 0
1 0 0
1 1 1
Logic Gates
A B Out
0 0 0
0 1 1
1 0 1
1 1 1
A B Out
0 0 0
0 1 1
1 0 1
1 1 0
Logic Gates
A B Out
0 0 1
0 1 1
1 0 1
1 1 0
A B Out
0 0 1
0 1 0
1 0 0
1 1 0
Logic Gates
A B Out
0 0 1
0 1 0
1 0 0
1 1 1
Digital Circuit Representation
□ The truth table, logic diagram and algebraic expression are
three different ways of representing a digital circuit and given
one form the other representations of the circuit can be
derived.
A B C Out
0 0 0 1
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 1
1 1 0 0
1 1 1 0
Basic Identities of Boolean algebra
K-Map
□ The complexity of a digital circuit depends on
the complexity of the corresponding algebraic
expression.
□ The karnaugh map (k-map) provides a simple
straightforward procedure for simplifying
Boolean expressions and thereby obtaining
simpler digital circuits.
K-Map
□ A diagram made up of squares, where each
square represents a minterm.
□ The output (0 or 1) for a specific minterm is
inserted in the corresponding square in the
k-map.
□ A function with n variables has a kmap with
2n squares.
Properties of k-maps
□ Each row (or column) in the k-map is labelled
by one or more bits, representing the values of
the corresponding variables for that row (or
column).
□ The minterm corresponding to a particular
square in the k-map (belonging to the ith
column and jth row) is obtained by taking the
values of the variables associated with the ith
column and jth row.
AB AB
CD 00 01 11 10
C 00 01 11 10
00
0
01
1
11
10
For example the shaded squares in figure 1 (a) and (b) correspond to minterms
111 and 0110 respectively.
Rules for simplifying k-maps
1. Plot a Boolean function on to a k-map by inserting
1’s in those squares where the corresponding
minterm has an output of 1.
AB
C 00 01 11 10
A B C F
0 0 0 1 0 1 1 0 0
1
0 0 1 1 1 0 0 1
0 1 0 1
0 1 1 0
A`B` F=A`C`+B`C
1 0 0 0
1 0 1 1
1 1 0 0
1 1 1 0
Essential PI Non-Essential PI
Example
AB
A B C D F
0 0 0 0 0 CD 00 01 11 10
0 0 0 1
0 0 1 0
0
1
00 0 1 1 1
0 0 1 1
0 1 0 0
0
1
01 0 0 1 1
0 1 0 1 0
0 1 1 0 1 0 0 1 1
0 1 1 1 0
11
1 0 0 0 1
1 0 0 1 1 10 1 1 0 1
1 0 1 0 1
1 0 1 1 1
F=AD+AB`+BC`D`+A`CD`
1 1 0 0 1
OR F=AD+ AC`+ A`BD`+B`CD`
1 1 0 1 1
1 1 1 0 0
1 1 11 1 Non-Essential PI Essential PI
Don’t Cares
□ A truth table can be expressed in compact form by simply
specifying the minterms for which the output is 1.
□ For some functions, there may be certain input conditions for
which we don’t care what output is. This situation is
represented by putting a “d” in the output for the
corresponding minterms.
□ Don’t care outputs may be treated as either a 0 or a 1, in order
to obtain a minimized circuit.
□ All minterms which are not in the given list(s) are assumed
to have an output of 0.
Function with Don’t cares
F=
A’+BC’
AB
CD 00 01 11 10 Prime Implicants
00
0 1 1 0 BC’D’(Essential)
01 A’B’C(Essential)
1 d 0 d B’D
11 A’BC’
d 0 0 d A’C’D
10
1 0 0 0
F = B’D + BC’D’ + A’B’C
Product of sums (POS)
10 1 1 0 1
Final POS expression
The same final expression can also be obtained by directly examining the groups.
Prime Implicants of F’
A’B (Essential)
AB B’CD(Essential)
A’CD
CD 00 01 11 10
00 1 0 1 1 F’=A’B+B’CD
01 1 0 1 1 F’’=(A’B+B’CD)’
F=(A’B)’.(B’CD)’
11 0 0 1 0 F=(A+B’).(B+C’+D’)
10 1 0 1 1
A
B Si
i
i
Ci
C +1
n-bit Ripple Carry Adder
□ Constructed using n 1-bit full adder blocks
in parallel.
□ Cascade the full adders so that the carry out
from one becomes the carry in to the next
higher bit position.
Example: 4-bit Ripple Carry Adder
C4 C3 C2 C1 C0
A3 A2 A1 A0
+B3 B2 B1 B0
--------------
S3 S2 S1 S0
Decoder
□ Converts binary information from n inputs to
upto 2n outputs.
□ If some input combinations are unused, the
number of outputs may be less.
□ For each input combination, only one output
is active and all other outputs are inactive.
A decoder may also have an enable input (E), as shown below.
A1 A0 D0 D1 D2 D3
0 0 1 0 0 0
0 1 0 1 0 0
1 0 0 0 1 0
1 1 0 0 0 1
b) K-maps
A1
D0 A1 0 1
0 1 D1
A0
A0 0 0 0
0
1 0 1 1 0
1
0 0
D0=A1’A0’ D1=A1’A0
D2
A1 D3
0 1 A1
0 1
A0 A0
0 0 1
0 0 0
1 0 0
1 0 1
D2=A1A0’
D3=A1A0
Combinational Logic Circuits
DECODER
2-to-4 Decoder
E A 1 A 0 D 0 D1 D2
0 0 0 D03 1 1 1
0 0 1 1 0 1 1
0 1 0 1 1 0 1
0 1 1 1 1 1 0
1 d d 1 1 1
1 D0
A D1
0
D2
A D3
E
1
Decoder Expansion:
□ Smaller decoders can be combined to form a larger one.
□ Example: Construct a 3-8 decoder using 2-4 decoders.
Multiplexer
□ A combinational circuit which takes information from one of
2n input lines and transfers it to a single output line.
□ The particular input line chosen is determined by n select
lines.
What is a Multiplexer (MUX)?
□ A MUX is a digital switch that
Multiplexer
has multiple inputs (sources) Block
and a single output Diagram
(destination).
MUX
□ The select lines determine 2 1 Outp
which input is connected to the Inp N
output. uts ut
(sources (destinatio
□ MUX Types ) n)
Truth table
k-maps
f
S,I1
0 0 01 11 10
I0
0 0 0 1 0
1
1 1 1 0
f = SI1 + S’I0
Combinational Logic Circuits
MULTIPLEXER
4-to-1 Multiplexer
Select Output
S1 S 0 Y
0 0 I0
0 1 I1
1 0 I2
1 1 I3
I0
I1
Y
I2
I3
S0
S1
4-to-1 Multiplexer (MUX)
D0
UX
D1
M
Y
D2
D3
B
A
B A Y
0 0 D0
0 1 D1
1 0 D2
1 1 D3
49
Multiplexer Expansion
□ Smaller multiplexers can be combined to form a larger one.
□ Example: Construct a 4-to-1 multiplexer using 2-to-1 multiplexers.
What is a Demultiplexer (DEMUX)?
□ A DEMUX is a digital switch Demultiplexe
with a single input (source) and r
a multiple outputs Block Diagram
(destinations).
□ The select lines determine
Inp 1 2 Outp
MU
DE
which output the input is N
X
connected to. ut uts
(source (destination
□ DEMUX Types )
Fax
Machin
e
D0
MU
X D1
DE
D2 Color
X
Inkjet
D3
Printer
B A Selected Destination
0 0 B/W Laser Printer Pen
Plotte
0 1 Fax Machine
r
1 0 Color Inkjet Printer
1 1 Pen Plotter
52
1-to-4 De-Multiplexer (DEMUX)
D0
D1
MU
DE
X
D2
X
D3
B
A
B A D0 D1 D2 D3
0 0 X 0 0 0
0 1 0 X 0 0
1 0 0 0 X 0
1 1 0 0 0 X
53
Encoders
□ An encoder performs the inverse operation of
a decoder.
□ It has (up to) 2n inputs and n outputs.
□ Each input line is mapped to a specific
combination of output lines.
□ Only one input line can be high at any given
time.
Example:
I3 I2 I1 I0 A0 A1
0 0 0 1 0 0
0 0 1 0 0 1
0 1 0 0 1 0
1 0 0 0 1 1
A 4-to-2 encoder
Combinational Logic Circuits
ENCODER/
Octal-to-Binary Encoder
D1 A
D2
0
A
D3
D4 1
D5 A
D6
2
D7
Flipflops and Sequential Circuits
□ Combinational circuits: Digital circuits
where the output depends only on the current
inputs. They consist of a interconnection of
logic gates.
00 0 0
00 1 1
01 0 0
01 1 0
10 0 1
10 1 1
11 Indeterminate
JK-FLIPFLOP
11 1 0
D-FLIPFLOP
Input Present Next
D StateQ(t) State
Q(t+1)
0 0 0
0 1 0
1 0 1
1 1 1
T-FLIPFLOP
0 0 0 0 0 0 0
0 0 1 0 1 0 1
0 1 0 1 0 1 1
0 1 1 1 1 1 0
1 0 0 0 1 1 1
1 0 1 1 1 0 1
1 1 0 1 1 0 0
1 1 1 1 1 0 0
Excitation Tables
0 0 0 d 0 0 0 d
0 1 1 0 0 1 1 d
1 0 0 1 1 0 d 1
1 1 d 0 1 1 d 0
D-FLIPFLOP T-FLIPFLOP
Excitation Tables
0 0 0 0 0 0
0 1 1 0 1 1
1 0 1
1 0 0
1 1 0
1 1 1
Sequential Circuit Design
□ The excitation tables give the required inputs to the flipflop
for a specific change of state. The steps to be followed in the
design of sequential circuits are as follows:
100 101
0 0 0 0 0 1 0 0 1
0 0 1 0 1 1 0 1 0
0 1 0 1 1 1 1 0 1
0 1 1 1 0 1 1 1 0
1 0 0 0 0 0 1 0 0
1 0 1 1 1 0 0 1 1
1 1 0 0 1 0 1 0 0
1 1 1 1 0 0 0 1 1
K-Map
TA
AB
C 00 01 11 10
0
0 1 1 1
Present state Next State FlipFlop inputs
1 0 1 0 0 A B C T A T B TC
A B C
TB TA=A’B + AC’ 0 0 0 0 0 1 0 0 1
AB 0 0 1 0 1 1 0 1 0
C 00 01 11 10
0 1 0 1 1 1 1 0 1
0 0 0 0 0
1 0 1 1 1 0 1 1 1 0
1 1 1 1
1 0 0 0 0 0 1 0 0
TB= C 1 0 1 1 1 0 0 1 1
TC
1 1 0 0 1 0 1 0 0
AB
00 01 11 10 1 1 1 1 0 0 0 1 1
C
0 1 1 0 0
1 0 0 1 1
TC=A’C’+AC
More examples of sequential circuit synthesis.
DA
AB Present Next FlipFlop
00 01 11 10
state State Inputs
x
0 0 1 0 1 A B x A B DA DB
1 1 0 1 0 0 0 0 0 1 0 1
0 0 1 1 1 1 1
DA= A’B’x+ A’Bx’+AB’x’+ABx 0 1 0 1 0 1 0
0 1 1 0 0 0 0
DB
1 0 0 1 1 1 1
AB 00 01 11 10
x 1 0 1 0 1 0 1
0 1 0 0 1
1 1 0 0 0 0 0
1 1 0 0 1
1 1 1 1 0 1 0
DB= B’
Draw the logic diagram.
2. Design a sequential circuit, using T flipflops, that has the following
state diagram
1/0 A = 00
1/0
A B B = 01
0/0 C = 10
D = 11
C
D
1/0
Fill in the excitation table corresponding to the above sequential
circuit, using T flipflops.
Q1 Q2 X Q1 Q2 T1 T2
0 0 0 0 0 0 0 0 1/0 1/0
0 0 1 0 1 0 1 0 A B
0/0
0 1 0 1 0 1 1 0
0 1 1 0 1 0 0 0 0/1 1/0 0/0 0/0
1 0 0 0 0 1 0 0
1 0 1 1 1 0 1 0 C
D
1 1 0 0 0 1 1 1 1/0
1 1 1 0 1 1 0 0
Fill in the K-maps and obtain a Boolean expression for each flipflop
input.