CSE 205 - Chapter2
CSE 205 - Chapter2
DESIGN
BOOLEAN (BINARY) LOGIC
Deals with binary variables and binary logic
functions
Has two discrete values
0, False, Open
1, True, Close
Three basic logical operations
What is an algebra?
Mathematical system consisting of
Set of elements
Set of operators
1. x +y B x yB Closure
2. x +0 =x x 1 =x I dentity
3. x +y =y +x x y =y x Commutativity
4. x(y +z) =xy +xz x +yz =(x +y)(x +z) Distributivity
5. x +x’ =1 x x’ =0 Complement
6. At least 2 elements: x,y B such that x y Cardinality
AXIOMATIC DEFINITION OF
BOOLEAN ALGEBRA
x x’
0 1
1 0
6
AXIOMATIC DEFINITION OF
BOOLEAN ALGEBRA
The distributive laws
7
DUALITY PRINCIPLE
If an expression is valid in Boolean algebra,
the dual of that expression is also valid.
a + (bc) = (a + b)(a + c)
Following the replacement rules…
a(b + c) = ab + ac
DUALITY PRINCIPLE
The left and right columns of axioms are
duals
exchange all ANDs with ORs, and 0s with 1s
1. x +y B x yB Closure
2. x +0 =x x 1 =x I dentity
3. x +y =y +x x y =y x Commutativity
4. x(y +z) =xy +xz x +yz =(x +y)(x +z) Distributivity
5. x +x’ =1 x x’ =0 Complement
6. At least 2 elements: x,y B such that x y Cardinality
9
BASIC THEOREMS OF BOOLEAN
ALGEBRA
In addition to the axioms, additional laws can be derived;
they are called theorems of Boolean Algebra
These theorems are useful in performing algebraic
manipulations of Boolean expressions
1. x +x =x x x =x I dempotency
2. x +1 =1 x 0 =0
3. yx +x =x (y +x) x =x Absorption
4. (x’)’ =x I nvolution
5. x +(y +z) =(x +y) +z x(yz) =(xy)z Associative
6. (x +y)’ =x’y’ (xy)’ =x’ +y’ DeMorgan’s
PROOF OF X+X=X
We can only use Post. 2: (a) x+0=x, (b) x·1=x
Huntington postulates:Post. 3: (a) x+y=y+x, (b) x·y=y·x
Post. 4: (a) x(y+z) = xy+xz,
(b) x+yz = (x+y)(x+z)
Post. 5: (a) x+x’=1, (b) x·x’=0
x y xy x+xy
0 0 0 0
0 1 0 0
1 0 0 1
1 1 1 1
DEMORGAN’S THEOREM
Theorem 5(a): (x + y)’ = x’y’
Theorem 5(b): (xy)’ = x’ + y’
By means of truth table
AB + A'C + BC = AB + A'C
If
f(x,y,z) = x(y’z’ + 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’)
PRACTICE
Find the complement of the following
expressions:
xy' + x'y
[(x' + y + z')(x + y')(x + z)]
F' = (xy' + x'y)'
= (xy')'(x'y)'
= (x' + y)(x + y')
= xy + x'y‘
F' = [(x' + y + z')(x + y')(x + z)]'
F1(x, y, z) = ∑(1,4,5,6,7) = m1 + m4 + m5 + m6
+ m7
=x' y' z + xy' z’ + xy' z + xyz’ + xyz
SUM OF MINTERMS: EXAMPLE
F = x + yz
= x(y + y’)(z + z’) + (x + x’)yz
= xyz + xyz’ + xy’z + xy’z’ + xyz + x’yz
= x’yz + xy’z’ + xy’z + xyz’ + xyz
= (3,4,5,6,7)
F =(x+y+z)(x+y’+z)(x’+y+z)(x’+y+z’)
=M0M2M4M5= ∏(0, 2, 4,5)
z’)
NON-STANDARD AND STANDARD
FORMS
PRACTICE
Convert the following expression into sum of
products and product of sums:
(AB + C)(B + C'D)
form:SOM)
OTHER LOGIC OPERATIONS
2n rows in the truth table of n binary variables.
22n functions for n binary variables.
associative.
AND and OR are commutative and
associative.
OR
x+y = y+x
AND
xy = yx
(x y)z = x(y z) = x y z
MULTIPLE INPUTS
NAND and NOR are commutative but not
associative → they are not extendable.
MULTIPLE INPUTS
Multiple NOR = a complement of OR gate,
Multiple NAND = a complement of AND.
The cascaded NAND operations = sum of
products.
The cascaded NOR operations = product of
sums.
MULTIPLE INPUTS
The XOR and XNOR gates are commutative and
associative.
Multiple-input XOR gates are uncommon