Professional Documents
Culture Documents
03a Boolean Algebra
03a Boolean Algebra
03a Boolean Algebra
03a-Boolean Algebra
Irmawan
Semester-IV 2008 - 2009
Road Map
3
Boolean Algebra
Finite-State
Machines
2
Binary Systems
& Data Represent.
8
Generalized FSM
Logic Design
Techniques
Combinatorial 5
Components
6
Sequential Design
Techniques
Storage
Components
8
Register-Transfer
Design
Processor
Components
9
2
Boolean values
AND (product)
of two inputs
Expression:
xy, or xy
Truth table:
OR (sum) of
two inputs
x+y
xy
x+y
x+yB
x+0=x
x+y=y+x
x(y + z) = xy + xz
x + x = 1
At least 2 elements: x,y B
xyB
x1=x
xy=yx
x + yz = (x + y)(x + z)
x x = 0
such that x y
Closure
Identity
Commutativity
Distributivity
Complement
Cardinality
x+x=x
x+1=1
yx + x = x
(x) = x
x + (y + z) = (x + y) + z
(x + y) = xy
xx=x
x0=0
(y + x) x = x
x(yz) = (xy)z
(xy) = x + y
Idempotency
Absorption
Involution
Associative
DeMorgans
Idempotency: x + x = x
Proof:
x + x = (x + x) 1
= (x + x) (x + x)
= x + x x
=x+0
=x
by identity
by complement
by distributivity
by complement
by identity
Idempotency: x x = x
Proof:
x x = (x x) + 0
= (x x) + (x x)
= x (x + x)
=x1
=x
by identity
by complement
by distributivity
by complement
by identity
Duality principle
x+yB
x+0=x
x+y=y+x
x(y + z) = xy + xz
x + x = 1
At least 2 elements: x,y B
xyB
x1=x
xy = yx
x + yz = (x + y)(x + z)
x x = 0
such that x y
Closure
Identity
Commutativity
Distributivity
Complement
Cardinality
x+x=x
x+1=1
yx + x = x
(x) = x
x + (y + z) = (x + y) + z
(x + y) = xy
xx=x
x0=0
(y + x) x = x
x(yz) = (xy)z
(xy) = x + y
Idempotency
Absorption
Involution
Associative
DeMorgans
Boolean Functions
Computers take inputs and produce outputs, just like functions in math!
Mathematical functions can be expressed in two ways:
An expression is
finite but not unique
f(x,y) = 2x + y
=x+x+y
= 2(x + y/2)
= ...
A function table is
unique but infinite
x
f(x,y)
23
41
87
Boolean expressions
10
Truth tables
f(0,0,0)
f(0,0,1)
f(0,1,0)
f(0,1,1)
f(1,0,0)
f(1,0,1)
f(1,1,0)
f(1,1,1)
= (0 + 1)0 + 1
= (0 + 1)1 + 1
= (0 + 0)0 + 1
= (0 + 0)1 + 1
= (1 + 1)0 + 0
= (1 + 1)1 + 0
= (1 + 0)0 + 0
= (1 + 0)1 + 0
=1
=1
=1
=1
=0
=1
=0
=1
f(x,y,z)
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
1
1
1
1
0
1
0
1
11
Complement of a function
f(x,y,z)
f(x,y,z)
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
0
0
0
1
0
0
1
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
1
1
1
1
0
1
1
0
12
You can use DeMorgans law to keep pushing the complements inwards
f(x,y,z) = x(yz + yz)
f(x,y,z) = ( x(yz + yz) )
= x + (yz + yz)
= x + (yz) (yz)
= x + (y + z)(y + z)
You can also take the dual of the function, and then complement each
literal
If f(x,y,z) = x(yz + yz)
the dual of f is x + (y + z)(y + z)
then complementing each literal gives x + (y + z)(y + z)
so f(x,y,z) = x + (y + z)(y + z)
13
Algebraic manipulation
[ Distributive; xy + xy = x(y + y) ]
[ Axiom 5; y + y = 1 ]
[ Axiom 2; x1 = x ]
[ Distributive ]
[ Axiom 5; x + x = 1 ]
[ Axiom 2 ; x1 = x]
14
Canonical Forms
15
Minterms
xyz
xyz
xyz
xyz
xyz
xyz
Is true when
x=0, y=0, z=0
x=0, y=0, z=1
x=0, y=1, z=0
x=0, y=1, z=1
x=1, y=0, z=0
x=1, y=0, z=1
x=1, y=1, z=0
x=1, y=1, z=1
Shorthand
m0
m1
m2
m3
m4
m5
m6
m7
16
f(x,y,z)
f(x,y,z)
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
1
1
1
1
0
0
1
0
0
0
0
0
1
1
0
1
17
18
Maxterms
x + y + z
x + y + z
x + y + z
x + y + z
x+ y + z
x+y+z
19
f(x,y,z)
f(x,y,z)
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
1
1
1
1
0
0
1
0
0
0
0
0
1
1
0
1
f = (x + y + z)(x + y + z)(x + y + z)
= M4 M5 M7
= (4,5,7)
f = (x + y + z)(x + y + z)(x + y + z)
(x + y + z)(x + y + z)
= M0 M1 M2 M3 M6
= (0,1,2,3,6)
f contains all the maxterms not in f
20
21
Shorthand
m0
m1
m2
m3
m4
m5
m6
m7
Maxterm
x+y+z
x + y + z
x + y + z
x + y + z
x + y + z
x + y + z
x + y + z
x + y + z
Shorthand
M0
M1
M2
M3
M4
M5
M6
M7
22
f
f
= (0,1,2,3,6)
= (4,5,7)
= m4 + m5 + m7
(f) = (m4 + m5 + m7)
f = m4 m5 m7
[ DeMorgans law ]
= M4 M5 M7
[ By the previous page ]
= (4,5,7)
23
Standard Forms
25
Weve already seen all the basic Boolean operations and the associated
primitive logic gates.
There is a few additional gates that are often used in logic design.
They are all equivalent to some combination of primitive gates.
But they have some interesting properties in their own right.
Operation:
Expressions:
Truth table:
NAND
(NOT-AND)
(xy) = x + y
NOR
(NOT-OR)
XOR
(eXclusive OR)
(x + y) = x y
x y = xy + xy
y (xy)
(x+y)
xy
0
26