Chapter 2 Boolean Algebra and Logic Gates
Chapter 2 Boolean Algebra and Logic Gates
Algebras
What is an algebra?
Set of elements
Set of operators
Axioms or postulates
Why is it important?
BASIC DEFINITIONS
A set is collection of having the same property.
If x = 2, then xS.
If y = 5, then y S.
BASIC DEFINITIONS
The most common postulates used to formulate various
1. Closure: a set S is closed with respect to a binary operator if, for every
a+b = c
But operator is not closed for N, because 2-3 = -1 and 2, 3N, but (-1)N.
whenever
(x * y) * z = x * (y * z) for all x, y, zS
(x+y)+z = x+(y+z)
commutative whenever
x * y = y * x for all x, yS
x+y = y+x
BASIC DEFINITIONS
4. Identity element: a set S is said to have an identity element with
respect to a binary operation * on S if there exists an element
eS with the property that
e * x = x * e = x for every xS
x*y=e
x * (y z) = (x * y) (x * z)
George Boole
Father of Boolean algebra
Boolean Algebra
Terminology:
OR
NOT
xy
x+y
x'
1. Closure (+ and)
2. The identity elements
(1) +: 0
(2) : 1
y+
z
x
(y+z)
x
y
x
z
(x y)+
(x z)
Duality
The principle of duality is an important concept. This
Basic Theorems
Boolean Theorems
Huntingtons postulates define some rules
Post.
Post.
Post.
Post.
1:
2:
3:
4:
closure
(a) x+0=x,
(b) x1=x
(a) x+y=y+x, (b) xy=yx
(a) x(y+z) = xy+xz,
(b) x+yz = (x+y)(x+z)
Post. 5: (a) x+x=1, (b) xx=0
algebraic expressions
What is a theorem?
Proof of x+x=x
We can only use
Huntington postulates:
= (x+x)1
= (x+x)(x+x)
= x+xx
= x+0
=x
Q.E.D.
Huntington postulates:
Post. 2: (a) x+0=x, (b) x1=x
Post. 3: (a) x+y=y+x, (b) xy=yx
Post. 4: (a) x(y+z) = xy+xz,
(b) x+yz = (x+y)(x+z)
Post. 5: (a) x+x=1, (b) xx=0
by 2(b)
by 5(a)
by 4(b)
by 5(b)
by 2(a)
Proof of xx=x
Similar to previous Huntington postulates:
proof
Show that xx = x.
xx
= xx+xx
= x(x+x)
= x1
=x
Q.E.D.
= xx+0 by 2(a)
by 5(b)
by 4(a)
by 5(a)
by 2(b)
Proof of x+1=1
Huntington postulates:
Theorem 2(a): x + 1 = 1
x + 1 = 1 (x + 1)
=(x + x')(x + 1)
= x + x' 1
= x + x'
=1
by 2(b)
5(a)
4(b)
2(b)
5(a)
Huntington postulates:
Theorem 6(a): x + xy = x
x + xy = x 1 + xy by 2(b)
= x (1 + y)
4(a)
= x (y + 1)
3(a)
=x1
Th 2(a)
=x
2(b)
xy
x+x
y
DeMorgans Theorem
Theorem 5(a): (x + y) = xy
Theorem 5(b): (xy) = x + y
By means of truth table
x+y
(x+y)
xy
xy
x+y'
(xy)
Consensus Theorem
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).
1.
Operator Precedence
The operator precedence for evaluating Boolean
Expression is
Parentheses
NOT
AND
OR
Examples
x y' + z
(x y + z)'
Boolean Functions
A Boolean function
Binary variables
Binary operators OR and AND
Unary operator NOT
Parentheses
Examples
F1= x y z'
F2 = x + y'z
F4 = x y' + x' z
Boolean Functions
The truth table of 2n entries
F1
F2
F3
F4
F3 = F4
Boolean Functions
Implementation with logic gates
F4 is more economical
F2 = x + y'z
F4 = x y' + x' z
Algebraic Manipulation
To minimize Boolean expressions
Example 2.1
1.
2.
3.
4.
5.
Complement of a Function
An interchange of 0's for 1's and 1's for 0's in the value
of F
By DeMorgan's theorem
(A+B+C)' = (A+X)'
= A'X'
= A'(B+C)'
= A'(B'C')
= A'B'C'
let B+C = X
by theorem 5(a) (DeMorgan's)
substitute B+C = X
by theorem 5(a) (DeMorgan's)
by theorem 4(b) (associative)
Examples
Example 2.2
1.
2.
A truth table
Sum of minterms
f1 = x'y'z + xy'z' + xyz = m1 + m4 +m7 (Minterms)
= x'y'z'+x'yz'+x'yz+xy'z+xyz'
f1 = (f1')'
= (x+y+z)(x+y'+z) (x+y'+z') (x'+y+z')(x'+y'+z) = M0 M2 M3 M5 M6
f2 = (x+y+z)(x+y+z')(x+y'+z)(x'+y+z)=M0M1M2M4
Sum of Minterms
Sum of minterms: there are 2n minterms and 22n
Product of Maxterms
Product of maxterms: using distributive law to expand.
maxterms.
F(A, B, C) = (1, 4, 5, 6, 7)
Thus, F'(A, B, C) = (0, 2, 3)
By DeMorgan's theorem
F(A, B, C) = (0, 2, 3)
F'(A, B, C) =(1, 4, 5, 6, 7)
mj' = Mj
Sum of minterms = product of maxterms
Interchange the symbols and and list those numbers
missing from the original form
of 1's
of 0's
Example
F = xy + xz
F(x, y, z) = (1, 3, 6, 7)
F(x, y, z) = (0, 2, 4, 6)
Standard Forms
Canonical forms are very seldom the ones with the
F3 = A'B'CD+ABC'D'
Implementation
Two-level implementation
Multi-level implementation
F2 = x(y'+z)(x'+y+z')
Boolean Expressions
Standard Gates
Consider the 16 functions in Table 2.8 (slide 33)
Complement: inverter.
Transfer: buffer (increasing drive strength).
Equivalence: XNOR.
Multiple Inputs
Extension to multiple inputs
OR
x+y = y+x
(x+y)+z = x+(y+z) = x+y+z
AND
xy = yx
(x y)z = x(y z) = x y z
Multiple Inputs
Multiple Inputs
Multiple Inputs
July 17,Figure
201 2.10 Demonstration of positive and negative logic
VLSI
CAD
CAD Computer-Aided Design
Millions of transistors
Computer-based representation and aid
Automatic the design process
Design entry
Schematic capture
HDL Hardware Description Language
Verilog, VHDL
Simulation
Physical realization
Chip Design
Why is it better to have more gates on a single chip?
Complex to design
Chips have design constraints
Hard to test