Вы находитесь на странице: 1из 66

EE207: Digital Systems

I, Semester I 2003/2004

CHAPTER 2-i:
Combinational Logic Circuits
(Sections 2.1 2.5)

Overview
Binary logic and Gates
Boolean Algebra
Basic Properties
Algebraic Manipulation

Standard and Canonical Forms


Minterms and Maxterms (Canonical forms)
SOP and POS (Standard forms)

Karnaugh Maps (K-Maps)


2, 3, 4, and 5 variable maps
Simplification using K-Maps

K-Map Manipulation
Implicants: Prime, Essential
Dont Cares
26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

Binary Logic

Deals with binary variables that take 2


discrete values (0 and 1), and with logic
operations
Three basic logic operations:
AND, OR, NOT

Binary/logic variables are typically


represented as letters: A,B,C,,X,Y,Z

26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

Binary Logic Function

F(vars) = expression
Operators

set of binary

variables

+, , ' )

Variables

Constants

( 0, 1 )

Groupings (parenthesis)

Example: F(a,b) = ab + b
G(x,y,z) = x(y+z)
26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

Basic Logic Operators

1-bit logic AND resembles binary


multiplication:
0 0 = 0,
1 0 = 0,

0 1 = 0,
11 =1

1-bit logic OR resembles binary addition,


except for one operation:
0 + 0 = 0, 0 + 1 = 1,
1 + 0 = 1, 1 + 1 = 1 ( 102)

26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

Truth Tables for logic operators


Truth table: tabular form that uniquely represents the
relationship between the input variables of a function and its
output
2-Input AND

A
0
0
1
1
26Mar-

2-Input OR

B F=AB
0 0
1
0
0 0
1
1

A
0
0
1
1

B F=A+B
0 0
1
1
0 1
1
1

Chapter 2-i: Combinational Logic Circuits


(2.1-- 2.5)

NOT

A F=A
0
1
1
0
6

Truth Tables (cont.)

Q: Let a function F() depend on n


variables. How many rows are there in the
truth
of F() ?
table
2n

A:
rows, since there
patterns/combinations

26Mar-

are

2n

possible binary
for the n variables

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

Logic Gates

Logic gates are abstractions of electronic circuit


components that operate on one or more input
signals to produce an output signal.

2-Input AND

F = AB
26Mar-

2-Input OR

G = A+B
Chapter 2-i: Combinational
Logic

Circuits (2.1-2.5)

NOT (Inverter)

H = A
8

Timing Diagram
t0
Input

signals

Gate
Output

Signals

26Mar-

t1

t2

t3

t4

t5

t6
1
0
1

F=AB

1
0

G=A+B

1
0
1
0

H=A

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

Transitions

Basic
Assumption:
Zero time for
signals to
propagate
Through gates

Combinational Logic Circuit


from Logic Function
Consider function F = A + BC + AB
A combinational logic circuit can be constructed to
implement appropriately connecting input signals and logic
gates:
B, C)

F, by

Circuit input signals from function variables (A,

Circuit output signal function output


(F) Logic gates from logic operations

26Mar-

Chapter 2-i: Combinational Logic Circuits


(2.1-- 2.5)

10

Combinational Logic Circuit


from Logic Function (cont.

In order to design a cost-effective


and efficient circuit, we must
minimize the circuits size (area)
and propagation delay (time
required for an input signal
change to be observed at the
output line)
Observe the truth table of F=A +
BC + AB and G=A + BC
Truth tables for F and G are
identical same function
Use G to implement the logic
circuit (less components)
26Mar-

Chapter 2-i: Combinational Logic Circuits


(2.1-- 2.5)

11

Circuit
from Logic Function
(cont.)
C

B
C
B
A

26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

12

Boolean Algebra

VERY nice machinery used to manipulate


(simplify) Boolean functions
George Boole (1815-1864): An
investigation of the laws of thought
Terminology:
- Literal: A variable or its complement
- Product term: literals connected by
- Sum term: literals connected by +

26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

13

Boolean Algebra Properties

Let X: boolean variable, 0,1: constants

1.
2.
3.
4.

26Mar-

X+0=X
X1 =X
X+1 =1
X0 =0

-- Zero Axiom
-- Unit Axiom
-- Unit Property
-- Zero Property

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

14

Boolean Algebra
Properties (cont.)
Let X: boolean variable, 0,1: constants

5.
6.
7.
8.
9.
26Mar-

X+X=X
XX =X
X + X = 1
X X = 0
(X) = X

-- Idepotence
-- Idepotence
-Complement
-- Complement
-- Involution
Chapter 2-i: Combinational
Logic

Circuits (2.1-2.5)

Unchanged in
value following
multiplication by
itself

15

The Duality Principle

The dual of an expression is obtained by


exchanging ( and +), and (1 and 0) in it,
is
provided that the precedence of operations
not
changed.

Cannot exchange x with x


Example:
- Find H(x,y,z), the dual of F(x,y,z) = xyz + xyz
- H = (x+y+z) (x+y+ z)

Dual does not always equal the original


expression

If a Boolean equation/equality is valid, its dual is also


valid
26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

16

The Duality Principle (cont.)

With respect to duality, Identities

following relationship:

X+0=X
3. X + 1 = 1

2.

5.

6.

1.

7.

26Mar-

X=X
X +
X = 1
X+

4.
8.

1 8 have the

X 1 =X

(dual of 1)

X 0 =0

(dual of 3)

X X =X

(dual of 5)

X X = 0 (dual of 8)

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

17

More Boolean Algebra

Propertie
s

Let X,Y, and Z: boolean variables


10.
12.
14.

X+Y=Y+X
X + (Y+Z) = (X+Y) + Z
X(Y+Z) = XY + XZ

XY=YX
-- Commutative
13. X(YZ) = (XY)Z -- Associative
15. X+(YZ) = (X+Y) (X+Z)
11.

-- Distributive
16.

(X + Y) = X Y

17.

(X Y) = X + Y

In general,
( X1 + X2 + + X ) = X X X ,
n
1
2
n
( X X X ) = X + X + + X
1
2
n
1
2
n

26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

-- DeMorgans

and

18

Absorption Property

(Covering)

1. x + xy = x
2. x(x+y) = x (dual)
Proof:
x + xy = x1 + xy
= x(1+y)
= x1
=x
QED (2 true by duality)

26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

19

Consensus Theorem

1. xy + xz + yz = xy + xz
2. (x+y)(x+z)(y+z) = (x+y)(x+z) -- (dual)
Proof:
xy + xz + yz = xy + xz + (x+x)yz
= xy + xz + xyz + xyz
= (xy + xyz) + (xz + xzy)
= xy + xz
QED (2 true by duality).
26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

20

Truth Tables (revisited)

Enumerates all possible


combinations of variable
values and the corresponding
function value
Truth tables for some arbitrary
functions
F1(x,y,z), F2(x,y,z), and
F3(x,y,z) are shown to the right.

26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

x
0
0
0
0
1
1
1
1

y
0
0
1
1
0
0
1
1

z
0
1
0
1
0
1
0
1

F1 F2 F3

0
0
0
0
0
0
0
1

1
0
0
1
1
1
0
0

1
1
1
1
0
0
0
1

21

Truth Tables (cont.)

Truth table: a unique representation of a


Boolean function
If two functions have identical truth tables, the
functions are equivalent (and vice-versa).
Truth tables can be used to prove equality
theorems.

However, the size of a truth table grows


exponentially
with
the number
variablesthe
involved, hence
unwieldy.
Thisofmotivates
use of Boolean Algebra.

26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

22

Boolean expressions-NOT

uniqu
e

Unlike truth tables, expressions


representing a Boolean function are
NOT unique.
Example:
- F(x,y,z) = xyz + xyz + xyz
- G(x,y,z) = xyz + yz

The corresponding truth tables for F()


and G() are to the right. They are
identical!
Thus, F() = G()
26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

x
0
0
0
0
1
1
1
1

y
0
0
1
1
0
0
1
1

z
0
1
0
1
0
1
0
1

F
1
0
1
0
0
0
1
0

G
1
0
1
0
0
0
1
0
23

Algebraic Manipulation

Boolean algebra is a useful tool for


simplifying digital circuits.
Why do it? Simpler can mean
cheaper, smaller, faster.
Example: Simplify F = xyz + xyz + xz.
F = xyz + xyz + xz
= xy(z+z) + xz
= xy1 + xz
= xy + xz
26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

24

Algebraic Manipulation

(cont.)

Example: Prove
xyz + xyz + xyz = xz + yz
Proof:
xyz+ xyz+ xyz
= xyz + xyz + xyz + xyz
= xz(y+y) + yz(x+x)
= xz1 + yz1
= xz + yz
QED.

26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

25

Complement

of a Function

The complement of a function is derived


by interchanging ( and +), and (1 and 0),
and complementing each variable.
Otherwise, interchange 1s to 0s in
the truth table column showing F.
The complement of a function IS NOT
THE SAME as the dual of a function.

26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

26

Complementation: Example

Find G(x,y,z), the complement of


F(x,y,z) = xyz + xyz
G = F = (xyz + xyz)
DeMorgan
= (xyz) (xyz)
= (x+y+z) (x+y+z) DeMorgan again
Note: The complement of a function can also be
derived by finding the functions dual, and then
complementing all of the literals
26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

27

Canonical and Standard

Form
s
We need to consider formal techniques for
the simplification of Boolean functions.
-

26Mar-

Minterms and Maxterms


Sum-of-Minterms and Product-of-Maxterms
Product and Sum terms
Sum-of-Products (SOP) and Product-of-Sums
(POS)

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

28

Definitions

Literal: A variable or its complement


Product term: literals connected by
Sum term: literals connected by +
Minterm: a product term in which all the
variables appear exactly once, either

complemented or uncomplemented
Maxterm: a sum term in which all the
variables appear exactly once, either
complemented or uncomplemented
26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

29

Minterm

Represents exactly one combination in the truth


table.
Denoted by mj, where j is the decimal equivalent
of the minterms corresponding binary
combination (bj).

26Mar-

A variable in mj is complemented if its value in bj


is 0, otherwise
is and
uncomplemented.
=
011
its corresponding minterm is
Then, bj
Example: Assume 3 variables (A,B,C), and j=3.
by mj = ABC
denoted
Chapter 2-i: Combinational
Logic

Circuits (2.1-2.5)

30

Maxterm

Represents exactly one combination in the truth


table.
Denoted by Mj, where j is the decimal equivalent
of the maxterms corresponding binary
combination (bj).

26Mar-

A variable in Mj is complemented if its value in bj


is 1, otherwise
is and
uncomplemented.
=
011
its corresponding maxterm is
Then, bj
Example: Assume 3 variables (A,B,C), and j=3.
by Mj = A+B+C
denoted
Chapter 2-i: Combinational
Logic

Circuits (2.1-2.5)

31

Truth Table notation for


Minterms and Maxterms
x
Minterms and
0
Maxterms are
0
easy to
denote
using a truth table0.
0
Example:
1
Assume 3
variables x,y,z 1
1
(order is
1
fixed)
26Mar-

Minterm

Maxterm

xyz = m0

x+y+z = M0

xyz = m

x+y+z = M

xyz = m

x+y+z = M

xyz = m3

x+y+z= M3

xyz = m

x+y+z = M

xyz = m

x+y+z = M

xyz = m

x+y+z = M

xyz = m7

x+y+z = M7

1
2

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

1
2

4
5
6

32

Canonical Forms (Unique)

Any Boolean function F( ) can be


expressed as a unique sum of minterms
and a unique product of maxterms
(under a fixed variable ordering).
In other words, every function F() has two
canonical forms:
- Canonical Sum-Of-Products (sum of
minterms)
- Canonical Product-Of-Sums (product of
maxterms)

26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

33

Canonical Forms (cont.)

Canonical Sum-Of-Products:
The minterms included are those mj
that
suchF( ) = 1 in row j of the truth table for F(
).
Canonical Product-Of-Sums:
The maxterms included are those M
such
j
that
for F(
F( ) = 0 in row j of the truth table
).
26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

34

Example
Truth table for f (a,b,c) at right
1

The canonical sum-ofproducts f1 is

a
form for
0
0
f1(a,b,c) = m1 + m2 + m4 + m6
0
=
abc
+
abc
+
abc
+
abc
The canonical product-of-sums form for
0
f1 is
1
f1(a,b,c) = M0 M3 M5 M7
1
= (a+b+c)(a+b+c)

1
(a+b+c)(a+b+c).
1
26Mar-

Observe that: mj = M
Chapter
2-i: Combinational
j
Logic

Circuits (2.1-2.5)

b
0
0
1
1
0
0
1
1

c
0
1
0
1
0
1
0
1

f
1
0
1
1
0
1
0
1
0
35

Shorthand: and

f1(a,b,c) = m(1,2,4,6), where indicates that


this is a sum-of-products form, and m(1,2,4,6)
indicates that the minterms to be included are
m1, m2, m4, and m6.

f1(a,b,c) = M(0,3,5,7), where indicates


that this isthat
indicates
a product-of-sums
the maxterms toform,
be included
and
are
M(0,3,5,7)
M0, M3, M5, and M7.

Since mj = Mj for any j,


m(1,2,4,6) = M(0,3,5,7) = f1(a,b,c)
26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

36

Conversion Between

Canonical Forms

that
appeared
the(or
original
form with
Replace
within
vice versa)
andthose that do not.
Example:
replace those js
= abc + abc + abc + abc
f1(a,b,c)
= m1 + m2 + m4 + m6
= (1,2,4,6)
= (0,3,5,7)
=
(a+b+c)(a+b+c)(a+b+c)(a+b+c)

26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

37

Standard Forms (NOT Unique)

Standard forms are like canonical forms,


except that not all variables need appear
in the individual product (SOP) or sum
(POS) terms.
Example:
f1(a,b,c) = abc + bc + ac

is a standard sum-of-products form


f1(a,b,c) = (a+b+c)(b+c)(a+c)
26Mar-

is a standard product-of-sums form.


Chapter 2-i: Combinational
Logic

Circuits (2.1-2.5)

38

Conversion of SOP from

standard to canonical
form
Expand non-canonical terms by inserting
equivalent of 1 in each missing variable x:
(x + x) = 1
Remove duplicate minterms
f (a,b,c) = abc + bc + ac
1
= abc + (a+a)bc + a(b+b)c
= abc + abc + abc + abc +
= abc + abc
abc + abc + abc
26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

39

Conversion of POS from

standard to canonical
form

Expand noncanonical terms by adding 0 in terms


of missing variables (e.g., xx = 0) and using the
distributive law
Remove duplicate maxterms
f1(a,b,c) = (a+b+c)(b+c)(a+c)
= (a+b+c)(aa+b+c)(a+bb+c)
= (a+b+c)(a+b+c)(a+b+c)
(a+b+c)(a+b+c)
= (a+b+c)(a+b+c)(a+b+c)(a+b+c)
26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

40

Karnaugh Maps

Karnaugh maps (K-maps) are graphical


representations of boolean functions.
One map cell corresponds to a row in the
truth table.
Also, one map cell corresponds to a
minterm or a maxterm in the boolean
expression
Multiple-cell areas of the map correspond
to standard terms.
26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

41

Two-Variable Map
x1

x2

x1

m0
2

x2

m1
3

m2

m3

OR

m0
1

NOTE: ordering of variables is


for f(x1,x2), x1 is the row, x2 is

m2
3

m1

m3

IMPORTANT

the column.

Cell 0 represents x1x2; Cell 1 represents


x1x2; etc. If a minterm is present in the
function, then
26Mar-

a 1 is placed in the

corresponding cell.

Chapter 2-i: Combinational

42

Two-Variable Map (cont.)

Any two adjacent cells in the map differ by


ONLY one variable, which appears
complemented in one cell and
uncomplemented in the other.
Example:
and
m (=x x ) is adjacent to m (=x x )
0

m2 (=x1x2) but NOT m3 (=x1x2)

26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

43

2-Variable Map --

Example

f(x ,x ) = x x + x x + x x
1 2
1 2
1 2
1 2

= m0 + m 1 + m 2

x2

= x1 + x2

1s placed in K-map for


specified minterms m0, m1, m2

Grouping (ORing) of 1s allows


simplification
What (simpler) function is
represented by each dashed
rectangle?
Note m0 covered twice
26Mar-

- a1 = m 0 + m 1
- a2 = m 0 + m 2

x1

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

0
1

1
2

1
3

0
44

Minimization as SOP
using K-map

Enter 1s in the K-map for each product


term in the function
Group adjacent K-map cells
1s
to
obtain a product with fewer variables.
containing
Groups must be in power of 2 (2, 4, 8,
)
or
moreboundary
variables. wrap for K-maps of 3
Handle
Realize that answer may not be
unique
26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

45

Three-Variable
yz
x
0
1

00
0
4

01
1

m0
m4

11
3

m1
m5

Map

10
2

m3

m7

-Note: variable ordering


column, x specifies row.

m2

xz

m6

is (x,y,z); yz specifies

-Each cell is adjacent to three other cells (left


right or top or bottom or edge wrap)
26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

or
46

Three-Variable Map

(cont.)
minterm

The types of structures


that are either minterms or
are generated by repeated
application of the
minimization
on a
Groups of 1,theorem
2, 4, 8 are
three
variable map
are of 2 terms
group
possible.
shown at right.
26Mar-

group of 4 terms
Chapter 2-i:
Combinational Logic
Circuits (2.1-2.5)

47

Simplification

Enter minterms of the Boolean function


into the map, then group terms
Example: f(a,b,c) = ac + abc + bc
Result: f(a,b,c) = ac+ b
a bc
0

26Mar-

00

01

10

1
1

1
00

1
11

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

01

10

1
1
11

48

More Examples

f (x, y, z)
1
f1(x,

26Mar-

y,

00

01

0
1

y, z) = xy + xz

f (x, y, z)
2
f2(x,

= m(2,3,5,7)

yz

11

10

= m (0,1,2,3,6)
1

z) = x+yz
Chapter 2-i: Combinational
Logic

Circuits (2.1-2.5)

1
49

Four-Variable Maps

YZ

WX

00
01
11
10

00

01

11

10

m0

m1

m3

m2

m4

m5

m7

m6

m12

m13

m15

m14

m8

m9

m10

m11

xz

Top cells are adjacent to bottom cells. Left-edge


cells are adjacent to right-edge cells.
Note variable ordering (WXYZ).
26Mar-

Chapter 2-i: Combinational Logic Circuits


(2.1-- 2.5)

50

Four-variable Map

Simplificatio
n

One square represents a minterm of 4 literals.


A rectangle of 2 adjacent squares represents a
product term of 3 literals.
A rectangle of 4 squares represents a product
term of 2 literals.
A rectangle of 8 squares represents a product
term of 1 literal.
A rectangle of 16 squares produces a function
that is equal to logic 1.

26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

51

Example

Simplify the following Boolean function


(A,B,C,D) = m(0,1,2,4,5,7,8,9,10,12,13).
First put the function g( ) into the map, and then
group as many 1s as possible.
ab

00
01

11
10

cd
00
1

01
1

11

10
1

g(A,B,C,D)
26Mar-

00

01

11

10

1
1

= c+bd+abd

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

52

5-Variable K-Map

BC

BC

DE
A=1

DE
0

12

13

15

16

17

19

18

20

21

23

22

29

31

30

25

27

26

28
24

2
6
14

ABCDE
11

10

A=0

26Mar-

ABCDE

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

53

Implicants and
Prime Implicants (PIs)
An Implicant (P) of a function F is a product
term which implies F, i.e., F(P) = 1.
An implicant (PI) of F is called a Prime
Implicant of F if any product term obtained
by deleting a literal of PI is NOT an
implicant of F
Thus, a prime implicant is not contained in
any larger implicant.
26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

54

Example
Consider function f(a,b,c,d) whose Kmap is shown at right.
ab is not a prime implicant because
it is contained in b.
cd ab 1
acd is not a prime implicant because
1
it is contained in ad.
b, ad, and acd are prime implicants. 1
ab

acd
26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

b
ad
1
1

acd
55

Essential Prime
Implicants (EPIs)
If a minterm of a function F is included in ONLY
one prime implicant p, then p is an essential
prime implicant of F.
An essential prime implicant MUST appear in
all possible SOP expressions of a function
To find essential prime implicants:
- Generate all prime implicants of a function
- Select those prime implicants that contain at least one
1 that is not covered by any other prime implicant.

For the previous example, the PIs are b, ad,


and acd; all of these are essential.
26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

1
1

ad

1
1

b
1

1
1

1
1

acd

56

Another Example

Consider f (a,b,c,d), whose


K-map
2
is shown below.
The only essential PI is bd.
cd

ab
1
1

1
1

26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

57

Systematic Procedure for

1.
2.
3.

4.

26Mar-

Simplifying Boolean
Functions
Generate
all PIs of the function.
Include all essential PIs.
For remaining minterms not included in
the essential PIs, select a set of other
PIs to cover them, with minimal
in the
set.
overlap
simplified function is the
The
the product terms
resulting
selected
logical
OR
of
above.
Chapter 2-i: Combinational
Logic

Circuits (2.1-2.5)

58

Example

f(a,b,c,d) =
m(0,1,2,3,4,5,7,14,15).
Five grouped terms, not all

ab

cd
1

needed.

1
1

3 shaded cells covered by only


one term
is
3 EPIs, since each shaded cell
different
term.
covered
F(a,b,c,d)by=aab
+ ac +
ad + abc
26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

59

Product of Sums

Simplification
Use sum-of-products simplification on the
zeros of the function in the K-map to get
F.
Find the complement of F, i.e. (F) = F
- Recall that the complement of a boolean
function can be obtained by (1) taking the
dual and (2) complementing each literal.
- OR, using DeMorgans Theorem.

26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

60

POS Example
ab

cd

F(a,b,c,d) = ab

Find dual of F, dual(F) = (a+b)(a+c)(a+b+c+d)


Complement of literals in dual(F) to get F

26Mar-

+ ac + abcd

F = (a+b)(a+c)(a+b+c+d)

(verify that this is the same as in slide 60)


Chapter 2-i: Combinational

61

Don't Care Conditions

There may be a combination of input values which


- will never occur
- if they do occur, the output is of no concern.

The function value for such combinations is called a


don't care.
They are usually denoted with x. Each x may be
arbitrarily assigned the value 0 or 1 in an
implementation.
Dont cares can be used to further simplify a
function
26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

62

Minimization using Dont

Care
Treat don't caressas if they are 1s to
generate PIs.
Delete PI's that cover only don't care
minterms.
Treat the covering of remaining don't care
minterms as optional in the selection
process (i.e. they may be, but need
be,
not
covered).

26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

63

ab

Example

00

Simplify the function f(a,b,c,d)


whose K-map is shown at the right.
f = acd+ab+cd+abc
or
f = acd+ab+cd+abd
The middle two terms are EPIs, while
the first and last terms are selected
to
cover the minterms m1, m4, and m5.
(Theres a third solution!)
26Mar-

cd

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

01
11
10

00 01 11 10

0 0 x x
1
0
1
0
1

1
0

x x
0
0

x x
1 x
x

0
1

1
0

64

Another Example

Simplify the function


g(a,b,c,d) whose K-map
is shown at
right.
g = ac+ ab
or
g = ac+bd

cd
ab x 1 0 0
1 x 0 x
1 x x 1
0 x x 0
x
1

0 0

x 0 x
x

0 x x 0
x
1
1

0 0

x 0
x x

x
1

0 x x 0
26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

65

Algorithmic minimization

What do we do for functions with more


than 4-5 variables?
You can code up a minimiser
(ComputerAided Design,
CAD)
- Quine-McCluskey algorithm
- Iterated consensus

We wont discuss these


techniques

26Mar-

Chapter 2-i: Combinational


Logic

Circuits (2.1-2.5)

here

66

Вам также может понравиться