Boolean Algebra and Logic Gates
Chapter 2
Chapter Objectives
Gain a basic understanding of postulates used to form
algebraic structures.
Understand the Huntington Postulates.
Understand the basic theorems and postulates of
Boolean algebra.
Know how to develop a logic diagram from a Boolean
function; Know how to derive a Boolean function from a
logic diagram.
Know how to apply DeMorgan’s theorems.
Know how to express a Boolean function as a truth table;
know how to derive a Boolean function from a truth table.
Boolean Algebra and Logic Gates 2-2
Chapter Objectives
Know how to express a Boolean function as a sum of
minterms and as a product of maxterms.
Be able to convert from a sum of minterms to a product
of maxterms, and vise versa.
Be able to form a two-level gate structure from a
Boolean function in sum of products form; know how to
form a two-level gate structure from a Boolean function
in product of sums form.
Be able to implement a Boolean function with NAND and
inverter gates; know how to implement a Boolean
function with NOR and inverter gates.
Boolean Algebra and Logic Gates 2-3
Basic Definitions
A binary operator defined on a set S of
elements is a rule that assigns, to each pair of
elements from S, a unique element from S.
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.
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, z, ∈ S
Boolean Algebra and Logic Gates 2-4
3. Commutative law. A binary operator * on a set S
is said to be commutative whenever
x * y = y * x for all x, y ∈ S
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 e ∈ S
with the property that
e * x = x * e = x for every x ∈ S
Example: The element 0 is an identity element
with respect to the binary operator + on the set of
integers I = {c, -3, -2, -1, 0, 1, 2, 3,c}, since
x + 0 = 0 + x = x for any x ∈ I
The set of natural numbers, N, has no identity
element, since 0 is excluded from the set.
Boolean Algebra and Logic Gates 2-5
5. Inverse. A set S having the identity element e
with respect to a binary operator * is said to have
an inverse whenever, for every x ∈ S, there
exists an element y ∈ S such that
x*y=e
Example: In the set of integers, I, and the
operator +, 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)
A field is an example of an algebraic
structure.
Boolean Algebra and Logic Gates 2-6
The field of real numbers is the basis for
arithmetic and ordinary algebra.
The binary operator + defines addition.
The additive identity is 0.
The additive inverse defines subtraction.
The binary operator • defines multiplication.
The multiplicative identity is 1.
For a ≠ 0, the multiplicative inverse of a = 1/a
defines division (i.e., a • 1/a = 1).
The only distributive law applicable is that of • over
+:
a • (b + c) = (a • b) + (a • c)
Boolean Algebra and Logic Gates 2-7
Axiomatic Definition of Boolean Algebra
In 1854, George Boole developed an
algebraic system now called Boolean algebra.
two binary operators, + and •, (Huntington)
postulates:
1. (a) The structure is closed with respect to the
operator +.
(b) The structure is closed with respect to the
operator •.
2. (a) The element 0 is an identity element with
respect to +; that is, x + 0 = 0 + x = x.
(b) The element 1 is an identity element with
respect to •; that is, x • 1 = 1 • x = x.
Boolean Algebra and Logic Gates 2-8
3. (a) The structure is commutative with respect to
+; that is, x + y = y + x.
(b) The structure is commutative with respect to
• ; that is, x • y = y • x.
4. (a) The operator • is distributive over +; that is, x •
(y + z) = (x • y) + (x • z).
(b) The operator + is distributive over •; that is, x
+ (y • z) = (x + y) • (x + z).
5. For every element x ∈ B, there exists an element
x ∈ B (called the complement of x) such that (a) x
+ x = 1 and (b) x • x = 0.
6. There exist at least two elements x, y ∈ B such
that x ≠ y.
Boolean Algebra and Logic Gates 2-9
Comparing Boolean algebra with arithmetic
and ordinary algebra
1. Huntington postulates do not include the
associative law. However, this law holds for
Boolean algebra and can be derived (for both
operators) from the other postulates.
2. The distributive law of + over • (i.e., x + (y • z) =
(x + y) • (x + z) ) is valid for Boolean algebra, but
not for ordinary algebra.
3. Boolean algebra does not have additive or
multiplicative inverses; therefore, there are no
subtraction or division operations.
Boolean Algebra and Logic Gates 2-10
4. Postulate 5 defines an operator called the
complement that is not available in ordinary
algebra.
5. Ordinary algebra deals with the real numbers,
which constitute an infinite set of elements.
Boolean algebra deals with the as yet undefined
set of elements, B, but in the two‐valued Boolean
algebra defined next (and of interest in our
subsequent use of that algebra), B is defined as
a set with only two elements, 0 and 1.
Boolean Algebra and Logic Gates 2-11
Two-valued Boolean Algebra
B = {0,1}
The rules of operations
x y x⋅y x y x+y x x′
0 0 0 0 0 0 0 1
0 1 0 0 1 1 1 0
1 0 0 1 0 1
1 1 1 1 1 1
Closure
The identity elements
(1) +: 0
(2)‧: 1
Boolean Algebra and Logic Gates 2-12
The commutative laws
The distributive laws
Boolean Algebra and Logic Gates 2-13
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
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
Boolean Algebra and Logic Gates 2-14
Basic Theorems and Properties of Boolean
Algebra
Duality
the binary operators are interchanged; AND ⇔ OR
the identity elements are interchanged; 1 ⇔ 0
Boolean Algebra and Logic Gates 2-15
• Theorem 1(a): x+x = x
– x+x = (x+x) 1 by postulate: 2(b)
= (x+x) (x+x') 5(a)
= x+xx' 4(b)
= x+0 5(b)
=x 2(a)
– Theorem 1(b): x • x = x
– x•x=xx+0
= xx + xx'
= x (x + x')
=x•1
=x
Boolean Algebra and Logic Gates 2-16
Theorem 2
x + 1 = 1 • (x + 1)
= (x + x')(x + 1)
= x + x' 1
= x + x'
=1
x • 0 = 0 by duality
Theorem 3: (x')' = x
Postulate 5 defines the complement of x, x + x' = 1
and x • x' = 0
The complement of x' is x is also (x')'
Boolean Algebra and Logic Gates 2-17
Theorem 6
x + xy = x • 1 + xy
= x (1 +y)
=x•1
=x
x (x + y) = x by duality
By means of truth table
x y xy x + xy
0 0 0 0
0 1 0 0
1 0 0 1
1 1 1 1
Boolean Algebra and Logic Gates 2-18
DeMorgan's Theorems
(x+y)' = x' y'
(x y)' = x' + y'
x y x+y (x+y)′ x′ y′ x′y′
0 0 0 1 1 1 1
0 1 1 0 1 0 0
1 0 1 0 0 1 0
1 1 1 0 0 0 0
Boolean Algebra and Logic Gates 2-19
• Operator Precedence
– parentheses
– NOT
– AND
– OR
– examples
– x y' + z
– (x y + z)'
Boolean Algebra and Logic Gates 2-20
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 + x' y z + x y’
Boolean Algebra and Logic Gates 2-21
The truth table for F1 and F2
Boolean Algebra and Logic Gates 2-22
• Implementation with logic gates
Figure 2.1
Logic diagram for the Boolean function F1 = x + y’z
Boolean Algebra and Logic Gates 2-23
Boolean Algebra and Logic Gates 2-24
Algebraic Manipulation
To minimize Boolean expressions
literal: a primed or unprimed variable (an input to a
gate)
term: an implementation with a gate
The minimization of the number of literals and the
number of terms => a circuit with less equipment
Boolean Algebra and Logic Gates 2-25
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)' let B+C = X
= A'X' by DeMorgan's
= A'(B+C)'
= A'(B'C') by DeMorgan's
= A'B'C' associative
generalizations
(A+B+C+ ... +F)' = A'B'C' ... F'
(ABC ... F)' = A'+ B'+C'+ ... +F'
Boolean Algebra and Logic Gates 2-26
Canonical and Standard Forms
Minterms and Maxterms
A minterm: an AND term consists of all literals in
their normal form or in their complement form
For example, two binary variables x and y,
xy, xy', x'y, x'y'
It is also called a standard product
n variables con be combined to form 2n minterms
A maxterm: an OR term
It is also call a standard sum
2n maxterms
Boolean Algebra and Logic Gates 2-27
each maxterm is the complement of its
corresponding minterm, and vice versa
Boolean Algebra and Logic Gates 2-28
An Boolean function can be expressed by
a truth table
sum of minterms
f1 = x'y'z + xy'z' + xyz = m1 + m4 +m7
f2 = x'yz+ xy'z + xyz'+xyz = m3 + m5 +m6 + m7
Boolean Algebra and Logic Gates 2-29
The complement of a Boolean function
the minterms that produce a 0
f1' = m0 + m2 +m3 + m5 + m6
= 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)
= M 0M 1M 2M 4
Any Boolean function can be expressed as
a sum of minterms
a product of maxterms
canonical form
Boolean Algebra and Logic Gates 2-30
Product of maxterms
Each of the 22n functions of n binary variables
can be also expressed as a product of
maxterms.
Boolean Algebra and Logic Gates 2-31
Conversion between Canonical Forms
F(A,B,C) = Σ(1,4,5,6,7)
F‘(A,B,C) = Σ(0,2,3) = m0+m1+m2
By DeMorgan's theorem
F = (m0 + m2 + m3)’ = m’0 • m’2 • m’3
= M0M2M3 = Π(0, 2, 3)
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
Boolean Algebra and Logic Gates 2-32
Standard Forms
Canonical forms are seldom used
sum of products
F1 = y' + zy+ x'yz'
product of sums
F2 = x(y'+z)(x'+y+z'+w)
F3 = AB + C(D + E)
= AB + C(D + E) = AB + CD + CE
Boolean Algebra and Logic Gates 2-33
Boolean Algebra and Logic Gates 2-34
Boolean Algebra and Logic Gates 2-35
Other Logic Operations
2n rows in the truth table of n binary variables
2 n
2 functions for n binary variables
16 functions of two binary variables
All the new symbols except for the exclusive-OR symbol are not
in common use by digital designers
Boolean Algebra and Logic Gates 2-36
Boolean Algebra and Logic Gates 2-37
Digital Logic Gates
Boolean expression: AND, OR and NOT
operations
Constructing gates of other logic operations
the feasibility and economy
the possibility of extending gate's inputs
the basic properties of the binary operations
the ability of the gate to implement Boolean
functions
Boolean Algebra and Logic Gates 2-38
Consider the 16 functions
two are equal to a constant
four are repeated twice
inhibition and implication are not commutative or
associative
the other eight: complement, transfer, AND, OR,
NAND, NOR, XOR, and equivalence are used as
standard gates
complement: inverter
transfer: buffer (increasing drive strength)
equivalence: XNOR
Boolean Algebra and Logic Gates 2-39
FIGURE 2.5 Digital logic gates
Boolean Algebra and Logic Gates 2-40
FIGURE 2.5 Digital logic gates
Boolean Algebra and Logic Gates 2-41
Extension to multiple inputs
A gate can be extended to multiple inputs
if its binary operation is commutative and associative
AND and OR are commutative and associative
(x+y)+z = x+(y+z) = x+y+z
(x y)z = x(y z) = x y z
Boolean Algebra and Logic Gates 2-42
NAND and NOR are commutative but not
associative => they are not extendable
[註:上半圖符號標示錯誤,第三個輸入 y 應修正為 z 。]
Boolean Algebra and Logic Gates 2-43
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
Boolean Algebra and Logic Gates 2-44
The XOR and XNOR gates are commutative and
associative
Multiple-input XOR gates are uncommon?
XOR is an odd function: it is equal to 1 if the inputs
variables have an odd number of 1's
Boolean Algebra and Logic Gates 2-45
Positive and Negative Logic
two signal values <=> two
logic values
positive logic: H=1; L=0
negative logic: H=0; L=1
Consider a TTL gate
a positive logic NAND gate
a negative logic OR gate
the positive logic is used in
this book
Boolean Algebra and Logic Gates 2-46
Boolean Algebra and Logic Gates 2-47
Integrated Circuits
An IC (a chip)
Examples:
SSI: < 10 gates
MSI: 10 ~ 100 gates
LSI: 100 ~ xk gates
VLSI: > xk gates
small size (compact size)
low cost
low power consumption
high reliability
high speed
Boolean Algebra and Logic Gates 2-48
Digital logic families: circuit technology
TTL: transistor-transistor logic (dying?)
ECL: emitter-coupled logic (high speed, high
power consumption)
MOS: metal-oxide semiconductor (NMOS, high
density)
CMOS: complementary MOS (low power)
Boolean Algebra and Logic Gates 2-49
The characteristics of digital logic families
Fan-out: the number of standard loads that the
ouput of a typical gate can drive
Power dissipation
Propagation delay: the average transition delay
time for the signal to propagate from input to
output
Noise margin: the minimum of external noise
voltage that caused an undesirable change in the
circuit output
Boolean Algebra and Logic Gates 2-50
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
ASIC, FPGA, PLD
Boolean Algebra and Logic Gates 2-51
Web Search Topic
Algebraic field Inertial delay
Boolean algebra Propagation delay
Boolean logic Transport delay
Boolean gates TTL logic
Bipolar transistor
CMOS logic
CMOS process
Emitter-coupled logic
Field-effect transistor
Boolean Algebra and Logic Gates 2-52