Digital Logic Design-ch2 2010

Digital Logic Design-ch2 2010 - 
...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 9/21/10
 Boolean
Algebra
and
Logic
Gates
 Chapter
2
 EECE
256
 Dr.
Sidney
Fels
 Steven
Oldridge
 Topics
 •  DefiniGons
of
Boolean
Algebra
 •  Axioms
and
Theorems
of
Boolean
Algebra
 –  two
valued
Boolean
Algebra
 •  Boolean
FuncGons
 –  simplificaGon
 •  Canonical
forms
 –  minterm
and
maxterms
 •  Other
logic
gates
 9/18/10
 (c)
S.
Fels,
since
2010
 2
 Boolean
Algebra
 •  Allows
us
to
define
and
simplify
funcGons
of
 binary
variables
 •  Important
for
designers
to
create
complex
 circuits
 –  funcGons
of
computer
 –  ASIC
devices
 –  programmable
logic
 –  determine
machine
state
transiGons
 9/18/10
 (c)
S.
Fels,
since
2010
 3
 1
 9/21/10
 Boolean
Algebra
 •  Adheres
to
the
laws
of
an
algebra
 –  closure
 –  associaGve
 –  commutaGve
 –  idenGty
 –  inverse
 –  distribuGve
 +
for
addiGon
(0
is
idenGty)

 
for
mulGplicaGon
(1
is
idenGty)

 9/18/10
 (c)
S.
Fels,
since
2010
 4
 Axioms
of
Boolean
Algebra
 •  closure
for
+
and
 •  IdenGty:
 




x
+
0
=











x




1
=


 •  commutaGve
 
x
+
y
=















x



y
=
y




x
 •  distribuGve
 
x
(y
+
z)
=















x
+
(y
z)
=

 9/18/10
 (c)
S.
Fels,
since
2010
 5
 Axioms
of
Boolean
Algebra
 •  Complement
 •  two
elements
for
Two‐Valued
Boolean
Algebra
 –  x
+
x’
=

1






x



x’
=

0
 •  switching
algebra
(Shannon,
1928)
 •  Precedence:
 9/18/10
 0
and
1;

0
!=
1
 AND
=


,
OR
=
+

,
NOT
=
inverse
 ‐  check
with
Truth
tables
and
you’ll
see
it
meets
all
the
 axioms
 –  basis
of
all
digital
computers
 –  parentheses,
NOT,
AND,
OR
 (c)
S.
Fels,
since
2010
 6
 2
 9/21/10
 Theorems
and
ProperGes
of
Boolean
 Algebra
 idenGty
 complement
 idempotent
 0
and
1
ops
 9/18/10
 (c)
S.
Fels,
since
2010
 7
 Theorems
and
ProperGes
of
Boolean
 Algebra
 idenGty
 complement
 idempotent
 0
and
1
ops
 Duality:
interchange
0
for
1
and
AND
and
OR
 9/18/10
 (c)
S.
Fels,
since
2010
 8
 Theorems
and
ProperGes
of
Boolean
 Algebra
 idenGty
 complement
 idempotent
 0
and
1
ops
 Duality:
interchange
0
for
1
and
AND
and
OR
 Theorems
used
to
simplify
complex
funcGons
of
binary
variables
 9/18/10
 (c)
S.
Fels,
since
2010
 9
 3
 9/21/10
 Useful
Theorems
 •  SimplificaGon
Theorems:
 –  X

Y
+
X

Y’
=

 –  X
+
X
Y
=
 –  (X
+
Y’)

Y
=
 
 

 –  (X
+
Y)’
=


 •  DeMorgan’s
Law:
 •  Theorems
for
MulGplying
and
Factoring:
 –  (X
+
Y)

(X’
+
Z)
=
X
Z
+
X’
Y
 •  Proofs
by
algebra
complicated
 –  use
truth
tables
instead
 9/18/10
 (c)
S.
Fels,
since
2010
 10
 Some
algebraic
proofs
 Proving
Theorems
via
axioms
of
Boolean
Algebra:
 e.g.,
Prove:
X
Y
+
X

Y’
=
X
 e.g.,
Prove:
X
+
X

Y
=
X
 e.g.,
Prove:
(X
+
Y)

(X’
+
Z)
=
X
Z
+
X’
Y
 9/18/10
 (c)
S.
Fels,
since
2010
 11
 Some
algebraic
proofs
 Proving
Theorems
via
axioms
of
Boolean
Algebra:
 e.g.,
Prove:
X
Y
+
X

Y’
=
X
 
LHS
=
X
(Y
+
Y’)


distribuGve
 
 



=
X(1)










complement
 
 



=

X
=
RHS


idenGty
 e.g.,
Prove:
X
+
X

Y
=
X
 
 
 
LHS
=
X
(1+Y)




distribuGve
 
 
 
 
=
X(1)

 
 
idenGty
 
 
 
 
=
X
=
RHS
 9/18/10
 (c)
S.
Fels,
since
2010
 12
 4
 9/21/10
 Some
algebraic
proofs
 e.g.,
Prove:
(X
+
Y)

(X’
+
Z)
=
X
Z
+
X’
Y 

 LHS
=
(X+Y)X’
+
(X+Y)Z



distribuGve
 
 
=
XX’
+
YX’
+
XZ
+
YZ

distribuGve
 
 
=
0
+
X’Y
+
XZ
+
YZ



complement,
associaGve,
distribuGve
 
 
=
X’Y(Z
+
Z’)
+
XZ
(Y
+
Y’)
+
YZ
(X
+
X’)


idenGty/complement
 
 
=
X’YZ
+
X’YZ’
+
XYZ
+
XY’Z
+
XYZ
+
X’YZ


distribuGve,
associaGve
 
 
=
XZ(Y+Y’)
+
X’Y(Z+Z’)




idempotent,
associaGve,
distribuGve
 
 
=
XZ
+
X’Y

=
RHS




complement
 9/18/10
 (c)
S.
Fels,
since
2010
 13
 Some
proofs
using
truth
tables
 DeMorgan’s
Law
 X
 0
 0
 1
 1
 Y
 0
 1
 0
 1
 X’
 1
 1
 0
 0
 Y’
 1
 0
 1
 0
 (X+Y)
 (X+Y)’
 X’*Y’
 (X
+Y)’
=
X’

Y’
 (X

Y)’
=
X’
+
Y’
 X
 0
 0
 1
 1
 Y
 0
 1
 0
 1
 X’
 1
 1
 0
 0
 Y’
 1
 0
 1
 0
 (X
*Y)
 (X*Y)’
 X’+Y’
 9/18/10
 (c)
S.
Fels,
since
2010
 14
 Some
proofs
using
truth
tables
 DeMorgan’s
Law
 X
 0
 0
 1
 1
 Y
 0
 1
 0
 1
 X’
 1
 1
 0
 0
 Y’
 1
 0
 1
 0
 (X+Y)
 0
 1
 1
 1
 (X+Y)’
 1
 0
 0
 0
 X’*Y’
 1
 0
 0
 0
 (X
+Y)’
=
X’

Y’
 (X

Y)’
=
X’
+
Y’
 X
 0
 0
 1
 1
 Y
 0
 1
 0
 1
 X’
 1
 1
 0
 0
 Y’
 1
 0
 1
 0
 (X
*Y)
 0
 0
 0
 1
 (X*Y)’
 1
 1
 1
 0
 X’+Y’
 1
 1
 1
 0
 15
 9/18/10
 (c)
S.
Fels,
since
2010
 5
 9/21/10
 DeMorgan’s
Thereom
 Example:
 Z
=
A’B’C
+
A’BC
+
AB’C
+
ABC’
 Z’
=
(A+B+C’)

(A+B’+C’)

(A’…..
 9/18/10
 (c)
S.
Fels,
since
2010
 16
 Boolean
FuncGons
 •  Now,
we
have
everything
to
make
Boolean
 FuncGons
 –  F
=
f(x,y,z…)

where
x,
y,
z
etc.
are
binary
values
 (0,1)
with
Boolean
operators
 –  circuits
can
implement
the
funcGon
 –  algebra
used
to
simplify
the
funcGon
to
make
it
 easier
to
implement
 9/18/10
 (c)
S.
Fels,
since
2010
 17
 •  F1
=
x
+
y’z
 x
 0
 0
 0
 0
 1
 1
 1
 1
 9/18/10
 Example
 x+y’z
 y
 0
 0
 1
 1
 0
 0
 1
 1
 z
 0
 1
 0
 1
 0
 1
 0
 1
 y’z
 (c)
S.
Fels,
since
2010
 18
 6
 9/21/10
 •  F1
=
x
+
y’z
 x
 0
 0
 0
 0
 1
 1
 1
 1
 9/18/10
 Example
 x+y’z
 0
 1
 0
 0
 1
 1
 1
 1
 (c)
S.
Fels,
since
2010
 19
 y
 0
 0
 1
 1
 0
 0
 1
 1
 z
 0
 1
 0
 1
 0
 1
 0
 1
 y’z
 0
 1
 0
 0
 0
 1
 0
 0
 SimplificaGon
allows
for
different
 implementaGons
 •  F
=
AB
+
C(D
+
E)
=




requires
3
levels
of
gates
 9/18/10
 (c)
S.
Fels,
since
2010
 20
 2‐level
implementaGon
 •  F
=
AB
+
C(D
+
E)
=
AB
+
CD
+
CE
 9/18/10
 (c)
S.
Fels,
since
2010
 21
 7
 9/21/10
 Canonical
Forms
 •  Express
all
Boolean
funcGons
as
one
of
two
 canonical
forms
 –  enumerates
all
combinaGons
of
variables
as
either
 •  Sum
of
Products,
i.e.,
m1
+
m2
+
m3
…
etc
 •  Product
of
Sums,
i.e.,
M1

M2

M3
…
etc
 –  each
variable
appears
in
normal
form
(x)
or
its
 complement
(x’)
 –  if
it
is
a
product
it
is
called
a
MINTERM
 –  if
is
is
a
sum
it
is
called
a
MAXTERM
 –  n
variables
‐>
2n
MINTERMS
or
MAXTERMS
 9/18/10
 (c)
S.
Fels,
since
2010
 22
 Canonical
Forms
 9/18/10
 (c)
S.
Fels,
since
2010
 23
 Canonical
Form
Example
 9/18/10
 (c)
S.
Fels,
since
2010
 24
 8
 9/21/10
 Canonical
Form
Example
 m1
 m3
 m4
 m5
 m6
 m7
 m7
 9/18/10
 (c)
S.
Fels,
since
2010
 25
 Canonical
Form
Example:
Sum
of
 Products
(Minterms)
 •  So
we
can
read
off
of
TT
directly
 •  Sum
of
products
is
sum
of
Minterms
 ∑m € i F1
=
m1
+
m4
+
m7
 
 
 
=
x’y’z
+
xy’z’
+
xyz
 
F2 
=
m3
+
m5
+
m6
+
m7
 
 
 
=
x’yz
+
xy’z
+
xyz’
+
xyz
 9/18/10
 (c)
S.
Fels,
since
2010
 26
 Canonical
Form
Example
 M0
 M2
 M3
 M5
 M6
 M0
 M1
 M2
 M4
 9/18/10
 (c)
S.
Fels,
since
2010
 27
 9
 9/21/10
 Canonical
Form
Example:
Product
of
 Sums
(Maxterms)
 •  So
we
can
read
off
of
TT
directly
 •  Product
of
sums
is
product
of
Maxterms
 

 

 ∏M i F1
=
M0

M2

M3

M5

M6
 € =
(x
+
y
+
z)(x
+
y’
+
z)(x
+
y’
+
z’)(x’
+
y
+
z’)(x’+y’+z)
 F2
=
M0M1M2M4
 =
(x+y+z)(x+y+z’)(x+y’+z)(x’+y+z)
 9/18/10
 (c)
S.
Fels,
since
2010
 28
 ConverGng
between
them
 •  You
can
use
complement
and
deMorgan’s
 theorem
 –  if
F=m1
+
m3
+
m5
i.e.
Σ(1,
3,
5)
then
 –  F’
=
m0
+
m2
+
m4
+
m6
+m7
 •  F
=
(m0
+
m2
+
m4
+
m6
+m7)’
 –  use
DeMorgan’s
now
to
get
Product
of
Sum
 •  F
=
Π(0,2,4,6,7)
 •  Remember
to
include
all
Minterms/Maxterms
 –  n
variables,
2n
terms
 9/18/10
 (c)
S.
Fels,
since
2010
 29
 Standard
form
 •  Sum
of
Products
with
one,
two,
three
or
more
variables
in
product
 form
 –  F1
=
y’
+
xy
+
x’yz’
 •  Product
of
Sum
with
one,
two,
three
or
more
variables
in
sum
form
 –  F2
=
x

(y’+z)

(x’+y+z’)
 •  NoGce:
canonical
and
standard
form
are
2‐level
implementaGons
 –  but
may
have
many
inputs
for
gate
 •  called
fan‐in;
limited
by
pins
on
IC
and
manufacturing
 9/18/10
 (c)
S.
Fels,
since
2010
 30
 10
 9/21/10
 Other
logical
operaGons
 •  for
2
input
gates,
you
can
have
16
different
 logic
operaGons
22n
where
n
=
2
 9/20/10
 (c)
S.
Fels,
since
2010
 31
 Other
logical
operaGons
 9/20/10
 (c)
S.
Fels,
since
2010
 32
 Digital
Logic
Gates
 9/20/10
 (c)
S.
Fels,
since
2010
 33
 11
 9/21/10
 Extending
to
mulGple
inputs
 •  works
fine
for
 –  AND,
OR;
no
problem
–
commute
and
associate
 –  NAND,
NOR
–
commute
but
don’t
associate

 •  so,
be
careful
when
using
them
cascaded
 •  instead:

 –  define
mulG‐input
NAND
as
mulG‐input
AND
that
is
inverted
at
 the
end
 »  x
NAND
y
NAND
z
=
(xyz)’
 –  define
mulG‐input
NOR
as
mulG‐input

OR
that
is
inverted
at
 the
end
 »  x
NOR
y
NOR
Z
=
(x+y+z)’
 9/20/10
 (c)
S.
Fels,
since
2010
 34
 Extending
to
mulGple
inputs
 9/20/10
 (c)
S.
Fels,
since
2010
 35
 Extending
to
mulGple
inputs
 9/21/10
 (c)
S.
Fels,
since
2010
 36
 12
 9/21/10
 Summary
 •  two‐valued
Boolean
algebra
supports
 –  switching
logic
 –  simplificaGon
postulates
and
theorems
 –  digital
logic
gates
 •  Truth
tables
can
be
used
to
define
funcGon
 •  Canonical
and
standard
forms
make
it
easy
to
 create
funcGons
that
can
be
implemented
 •  finite
number
of
2
input
gates
 •  2
input
gates
can
be
extended
to
mulGple
inputs
 9/21/10
 (c)
S.
Fels,
since
2010
 37
 –  easy
to
implement
larger
complex
funcGons
 9/21/10
 (c)
S.
Fels,
since
2010
 38
 13
 ...
View Full Document

This note was uploaded on 12/21/2010 for the course EECE EECE 256 taught by Professor Sidney during the Spring '10 term at UBC.

Ask a homework question - tutors are online