Chapter 2 Boolean Algebra and Logic Gates
Chapter 2 Boolean Algebra and Logic Gates
1
Postulates of a mathematical system
Forms the basic assumptions from which it is possible to deduce rule,
theorems and properties of the system
The most common postulates to form various algebraic structures are
❖ Closure
❖ Associative law
❖ Commutative law
❖ Identity element
❖ Distributive law
4
BASIC DEFINITIONS
◼ The most common postulates used to formulate various
algebraic structures are as follows:
1. Closure: a set S is closed with respect to a binary operator if, for
every pair of elements of S, the binary operator specifies a rule for
obtaining a unique element of S.
❑ For example, natural numbers N={1,2,3,...} is closed w.r.t. the binary
operator + by the rule of arithmetic addition, since, for any a, bN, there
is a unique cN such that
❑ a+b = c
❑ But operator – is not closed for N, because 2-3 = -1 and 2, 3 N, but (-1)N.
2. Associative law: a binary operator * on a set S is said to be
associative whenever
❑ (x * y) * z = x * (y * z) for all x, y, zS
❑ (x+y)+z = x+(y+z)
3. Commutative law: a binary operator * on a set S is said to be
commutative whenever
❑ x * y = y * x for all x, yS
❑ x+y = y+x
February 13, 2023
5
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
❑ 0+x = x+0 =x for every xI . I = {…, -3, -2, -1, 0, 1, 2, 3, …}.
❑ 1*x = x*1 =x for every xI. I = {…, -3, -2, -1, 0, 1, 2, 3, …}.
5. Inverse: a set having the identity element e with respect to the
binary operator to have an inverse whenever, for every xS, there
exists an element yS such that
❑ x*y=e
❑ The operator + over I, with e = 0, the inverse of an element a is (-a), since
a+(-a) = 0.
6. Distributive law: if * and .are two binary operators on a set S, * is
said to be distributive over . whenever
❑ x * (y.z) = (x * y).(x * z)
7
Axiomatic Definition of Boolean Algebra
◼ We need to define algebra for binary values
❑ Developed by George Boole in 1854
◼ Huntington postulates for Boolean algebra (1904):
◼ B = {0, 1} and two binary operations, + and ., x, y
and z are three binary variables of set B
❑ 1(a) Closure with respect to operator + or x+0 =
x, where x is element of B
❑ (b) Closure with respect to operator dot · x.1=x
❑ 2(a) 0 is Identity element for operator + : x+0 = 0
+x = x
❑ (b) 1 is Identity element for operator dot . : x . 1
= 1.x = x 8
Axiomatic Definition of Boolean Algebra
9
Difference between Boolean algebra and ordinary algebras (real
numbers) for arithmetic operation
Properties Boolean algebras Ordinary algebras
Set B is a set with only two A set of real numbers,
elements, B(0,1) have infinite elements
Variables/literals Defined by symbol like Defined by symbol like
x, y, z etc a, b, x, y, z etc
Associative law Hold for both operators Not hold
Distributive law of + over x+(y.z) = (x+y)(x +z) Not valid
.
Additive or multiplicative Not available , so no Available so subtraction
inverse subtraction or division or division possible
possible
12
Postulates of Two-Valued Boolean
Algebra
◼ B = {0, 1} and two binary operations, + and.
◼ The rules of operations: AND、OR and NOT.
AND
x y c=x.y OR NOT
0 0 0 x y c=x+y x x'
0 1 0 0 0 0 0 1
1 0 0 0 1 1 1 0
1 1 1 1 0 1
1 1 1
1. Closure (+ and‧) , operation on elements result another
element c belong to the Boolean set B.
2. The identity elements
(1) +: 0
(2) .: 1
13
Postulates of Two-Valued Boolean Algebra
3. The commutative laws x+y = y+x or x.y = y.x, The
distributive laws, x·(y+z) = (x·y)+(x·z) or x+(y.z) = x.y + x.z
x y z y+z x.(y+z) x.y x.z (x.y)+(x.z)
0 0 0 0 0 0 0 0
0 0 1 1 0 0 0 0
0 1 0 1 0 0 0 0
0 1 1 1 0 0 0 0
1 0 0 0 0 0 0 0
1 0 1 1 1 0 1 1
1 1 0 1 1 1 0 1
1 1 1 1 1 1 1 1
14
Postulates of Two-Valued Boolean Algebra
5. Complement
❑ x+x'=1 → 0+0'=0+1=1; 1+1'=1+0=1
❑ x.x'=0 → 0.0'=0.1=0; 1.1'=1.0=0
6. Has two distinct elements 1 and 0, with 0 ≠ 1
◼ Note
❑ A set of two elements
❑ + : OR operation; .: AND operation
❑ A complement operator: NOT operation
❑ Binary logic is a two-valued Boolean algebra
15
Duality
◼ The principle of duality is an important concept.
This says that if an expression is valid in Boolean
algebra, the dual of that expression is also valid.
16
Duality
17
Basic Theorems
18
Boolean Theorems
◼ Huntington’s postulates define some rules
Post. 1:
closure
Post. 2:
(a) x+0=x, (b) x·1=x
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)
◼ Need more rules to modify Post. 5: (a) x+x’=1, (b) x·x’=0
algebraic expressions
❑ Theorems that are derived from postulates
◼ What is a theorem?
❑ A formula or statement that is derived from
postulates (or other proven theorems)
◼ Basic theorems of Boolean algebra
❑ Theorem 1 (a): x + x = x (b): x · x = x
❑ Looks straightforward, but needs to be proven !
◼ Theorem 6(a): x + x . y = x
❑ x + xy = x.1 + xy by 2(b) Proof by truth table
= x (1 + y) 4(a) x y xy x+xy x.(x+y)
= x (y + 1) 3(a)
= x.1 Th 2(a) 0 0 0 0 0
=x 2(b) 0 1 0 0 0
1 0 0 1 1
Theorem 6(b): x . (x + y) = x = x + xy
by duality 1 1 1 1 1
February 13, 2023
23
DeMorgan’s Theorem
◼ Theorem 5(a): (x + y)’ = x’.y’
◼ Theorem 5(b): (x.y)’ = x’ + y’
◼ By means of truth table
0 0 1 1 0 1 1 0 1 1
0 1 1 0 1 0 0 0 1 1
1 0 0 1 1 0 0 0 1 1
1 1 0 0 1 0 0 1 0 0
F2 = x + y'z
F4 = x y' + x' z
❑ P of 0's
February 13, 2023
42
◼ Example
❑ F = xy + xz
❑ F(x, y, z) = S(1, 3, 6, 7)
❑ F(x, y, z) = P (0, 2, 4, 6)
❑ F = ABC + A’B’C
❑ Two level of implementation
◼ Multi-level implementation
▪ x+y = y+x
▪ (x+y)+z = x+(y+z) = x+y+z
❑ AND gate
▪ xy = yx
▪ (x y)z = x(y z) = x y z
February 13, 2023
53
Multiple Inputs
❑ NAND and NOR are commutative but not associative → they
are not extendable to multiinputs.
February 13, 2023 Figure 2.10 Demonstration of positive and negative logic 61
2.9 Integrated Circuits
Level of Integration
◼ An IC (a chip)
◼ Examples:
❑ Small-scale Integration (SSI): < 10 gates
❑ Medium-scale Integration (MSI): 10 ~ 100 gates
❑ Large-scale Integration (LSI): 100 ~ xk gates
❑ Very Large-scale Integration (VLSI): > xk gates
◼ VLSI
❑ Small size (compact size)
❑ Low cost
❑ Low power consumption
❑ High reliability
❑ High speed