SlideShare a Scribd company logo
Charles Kime & Thomas Kaminski
© 2008 Pearson Education, Inc.
(Edited by Dr. Muhamed Mudawar for COE 202 & EE 200 at KFUPM)
Boolean Algebra
and Logic Gates
Logic and Computer Design Fundamentals
Binary Logic and Gates
 Binary variables take on one of two values.
 Logical operators operate on binary values and
binary variables.
 Basic logical operators are the logic functions
AND, OR and NOT.
 Logic gates implement logic functions.
 Boolean Algebra: a useful mathematical system
for specifying and transforming logic functions.
 We study Boolean algebra as a foundation for
designing and analyzing digital systems!
Binary Variables
 Recall that the two binary values have
different names:
• True/False
• On/Off
• Yes/No
• 1/0
 We use 1 and 0 to denote the two values.
 Variable identifier examples:
• A, B, y, z, or X1 for now
• RESET, START_IT, or ADD1 later
Logical Operations
 The three basic logical operations are:
• AND
• OR
• NOT
 AND is denoted by a dot (·).
 OR is denoted by a plus (+).
 NOT is denoted by an overbar ( ¯ ), a
single quote mark (') after, or (~) before
the variable.
 Examples:
• is read “Y is equal to A AND B.”
• is read “z is equal to x OR y.”
• is read “X is equal to NOT A.”
Notation Examples
 Note: The statement:
1 + 1 = 2 (read “one plus one equals two”)
is not the same as
1 + 1 = 1 (read “1 or 1 equals 1”).
= BAY ⋅
yxz +=
AX =
Operator Definitions
 Operations are defined on the values
"0" and "1" for each operator:
AND
0 · 0 = 0
0 · 1 = 0
1 · 0 = 0
1 · 1 = 1
OR
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 1
NOT
10 =
01=
01
10
X
NOT
XZ=
Truth Tables
 Tabular listing of the values of a function for all
possible combinations of values on its arguments
 Example: Truth tables for the basic logic operations:
111
001
010
000
Z = X·YYX
AND OR
X Y Z = X+Y
0 0 0
0 1 1
1 0 1
1 1 1
Truth Tables – Cont’d
 Used to evaluate any logic function
 Consider F(X, Y, Z) = X Y + Y Z
X Y Z X Y Y Y Z F = X Y + Y Z
0 0 0 0 1 0 0
0 0 1 0 1 1 1
0 1 0 0 0 0 0
0 1 1 0 0 0 0
1 0 0 0 1 0 0
1 0 1 0 1 1 1
1 1 0 1 0 0 1
1 1 1 1 0 0 1
 Using Switches
• Inputs:
 logic 1 is switch closed
 logic 0 is switch open
• Outputs:
 logic 1 is light on
 logic 0 is light off.
• NOT input:
 logic 1 is switch open
 logic 0 is switch closed
Logic Function Implementation
Switches in series => AND
Switches in parallel => OR
C
Normally-closed switch => NOT
 Example: Logic Using Switches
 Light is on (L = 1) for
L(A, B, C, D) =
and off (L = 0), otherwise.
 Useful model for relay and CMOS gate circuits,
the foundation of current digital logic circuits
Logic Function Implementation – cont’d
B
A
D
C
A (B C + D) = A B C + A D
Logic Gates
 In the earliest computers, switches were opened
and closed by magnetic fields produced by
energizing coils in relays. The switches in turn
opened and closed the current paths.
 Later, vacuum tubes that open and close
current paths electronically replaced relays.
 Today, transistors are used as electronic
switches that open and close current paths.
Logic Gate Symbols and Behavior
 Logic gates have special symbols:
 And waveform behavior in time as follows:
X 0 0 1 1
Y 0 1 0 1
X · Y(AND) 0 0 0 1
X + Y(OR) 0 1 1 1
(NOT) X 1 1 0 0
OR gate
X
Y
Z = X + Y
X
Y
Z = X · Y
AND gate
X Z = X
NOT gateor
inverter
Logic Diagrams and Expressions
 Boolean equations, truth tables and logic diagrams describe
the same function!
 Truth tables are unique, but expressions and logic diagrams
are not. This gives flexibility in implementing functions.
X
Y F
Z
Logic Diagram
Logic Equation
ZYXF +=
Truth Table
11 1 1
11 1 0
11 0 1
11 0 0
00 1 1
00 1 0
10 0 1
00 0 0
X Y Z ZYXF ⋅+=
Gate Delay
 In actual physical gates, if an input changes that
causes the output to change, the output change
does not occur instantaneously.
 The delay between an input change and the
output change is the gate delay denoted by tG:
tG
tG
Input
Output
Time (ns)
0
0
1
1
0 0.5 1 1.5
tG = 0.3 ns
1.
3.
5.
7.
9.
11.
13.
15.
17.
Commutative
Associative
Distributive
DeMorgan’s
2.
4.
6.
8.
X .
1 X=
X .
0 0=
X .
X X=
0=X .
X
Boolean Algebra
10.
12.
14.
16.
X + Y Y + X=
(X + Y) Z+ X + (Y Z)+=
X(Y + Z) XY XZ+=
X + Y X .
Y=
XY YX=
(XY)Z X(YZ)=
X + YZ (X + Y)(X + Z)=
X .
Y X + Y=
X + 0 X=
+X 1 1=
X + X X=
1=X + X
X= X
 Invented by George Boole in 1854
 An algebraic structure defined by a set B = {0, 1}, together with two
binary operators (+ and ·) and a unary operator ( )
Idempotence
Complement
Involution
Identity element
Some Properties of Boolean Algebra
 Boolean Algebra is defined in general by a set B that can
have more than two values
 A two-valued Boolean algebra is also know as Switching
Algebra. The Boolean set B is restricted to 0 and 1.
Switching circuits can be represented by this algebra.
 The dual of an algebraic expression is obtained by
interchanging + and · and interchanging 0’s and 1’s.
 The identities appear in dual pairs. When there is only
one identity on a line the identity is self-dual, i. e., the
dual expression = the original expression.
 Sometimes, the dot symbol ‘’ (AND operator) is not
written when the meaning is clear
 Example: F = (A + C) · B + 0
dual F = (A · C + B) · 1 = A · C + B
 Example: G = X · Y + (W + Z)
dual G =
 Example: H = A · B + A · C + B · C
dual H =
 Unless it happens to be self-dual, the dual of an
expression does not equal the expression itself
 Are any of these functions self-dual?
(A+B)(A+C)(B+C)=(A+BC)(B+C)=AB+AC+BC
Dual of a Boolean Expression
(X+Y) · (W · Z) = (X+Y) · (W+Z)
(A+B) · (A+C) · (B+C)
H is self-dual
Boolean Operator Precedence
 The order of evaluation is:
1. Parentheses
2. NOT
3. AND
4. OR
 Consequence: Parentheses appear
around OR expressions
 Example: F = A(B + C)(C + D)
Boolean Algebraic Proof – Example 1
 A + A · B = A (Absorption Theorem)
Proof Steps Justification
A + A · B
= A · 1 + A · B Identity element: A · 1 = A
= A · ( 1 + B) Distributive
= A · 1 1 + B = 1
= A Identity element
 Our primary reason for doing proofs is to learn:
• Careful and efficient use of the identities and theorems of
Boolean algebra, and
• How to choose the appropriate identity or theorem to apply
to make forward progress, irrespective of the application.
 AB + AC + BC = AB + AC (Consensus Theorem)
Proof Steps Justification
= AB + AC + BC
= AB + AC + 1 · BC Identity element
= AB + AC + (A + A) · BC Complement
= AB + AC + ABC + ABC Distributive
= AB + ABC + AC + ACB Commutative
= AB · 1 + ABC + AC · 1 + ACB Identity element
= AB (1+C) + AC (1 + B) Distributive
= AB . 1 + AC . 1 1+X = 1
= AB + AC Identity element
Boolean Algebraic Proof – Example 2
Useful Theorems
 Minimization
X Y + X Y = Y
 Absorption
X + X Y = X
 Simplification
X + X Y = X + Y
 DeMorgan’s
 X + Y = X · Y
 Minimization (dual)
(X+Y)(X+Y) = Y
 Absorption (dual)
X · (X + Y) = X
 Simplification (dual)
X · (X + Y) = X · Y
 DeMorgan’s (dual)
 X · Y = X + Y
Truth Table to Verify DeMorgan’s
X Y X·Y X+Y X Y X+Y X · Y X·Y X+Y
0 0 0 0 1 1 1 1 1 1
0 1 0 1 1 0 0 0 1 1
1 0 0 1 0 1 0 0 1 1
1 1 1 1 0 0 0 0 0 0
X + Y = X · Y X · Y = X + Y
 Generalized DeMorgan’s Theorem:
X1+ X2+ … + Xn = X1 · X2 · … · Xn
X1 · X2 · … · Xn = X1 + X2 + … + Xn
Complementing Functions
 Use DeMorgan's Theorem:
1. Interchange AND and OR operators
2. Complement each constant and literal
 Example: Complement F =
F = (x + y + z)(x + y + z)
 Example: Complement G = (a + bc)d + e
G = (a (b + c) + d) e
x+ zyzyx
Expression Simplification
 An application of Boolean algebra
 Simplify to contain the smallest number
of literals (variables that may or may not
be complemented)
= AB + ABCD + A C D + A C D + A B D
= AB + AB(CD) + A C (D + D) + A B D
= AB + A C + A B D = B(A + AD) +AC
= B (A + D) + A C (has only 5 literals)
++++ DCBADCADBADCABA
Next … Canonical Forms
 Minterms and Maxterms
 Sum-of-Minterm (SOM) Canonical Form
 Product-of-Maxterm (POM) Canonical Form
 Representation of Complements of Functions
 Conversions between Representations
Minterms
 Minterms are AND terms with every variable
present in either true or complemented form.
 Given that each binary variable may appear
normal (e.g., x) or complemented (e.g., ), there
are 2n
minterms for n variables.
 Example: Two variables (X and Y) produce
2 x 2 = 4 combinations:
(both normal)
(X normal, Y complemented)
(X complemented, Y normal)
(both complemented)
 Thus there are four minterms of two variables.
YX
XY
YX
YX
x
Maxterms
 Maxterms are OR terms with every variable in
true or complemented form.
 Given that each binary variable may appear
normal (e.g., x) or complemented (e.g., x), there
are 2n
maxterms for n variables.
 Example: Two variables (X and Y) produce
2 x 2 = 4 combinations:
(both normal)
(x normal, y complemented)
(x complemented, y normal)
(both complemented)
YX +
YX +
YX +
YX +
 Two variable minterms and maxterms.
 The minterm mi should evaluate to 1 for each
combination of x and y.
 The maxterm is the complement of the minterm
Minterms & Maxterms for 2 variables
x y Index Minterm Maxterm
0 0 0 m0 = x y M0 = x + y
0 1 1 m1 = x y M1 = x + y
1 0 2 m2 = x y M2 = x + y
1 1 3 m3 = x y M3 = x + y
Minterms & Maxterms for 3 variables
M3 = x + y + zm3 = x y z3110
M4 = x + y + zm4 = x y z4001
M5 = x + y + zm5 = x y z5101
M6 = x + y + zm6 = x y z6011
1
1
0
0
y
1
0
0
0
x
1
0
1
0
z
M7 = x + y + zm7 = x y z7
M2 = x + y + zm2 = x y z2
M1 = x + y + zm1 = x y z1
M0 = x + y + zm0 = x y z0
MaxtermMintermIndex
Maxterm Mi is the complement of minterm mi
Mi = mi and mi = Mi
Purpose of the Index
 Minterms and Maxterms are designated with an index
 The index number corresponds to a binary pattern
 The index for the minterm or maxterm, expressed as a
binary number, is used to determine whether the variable
is shown in the true or complemented form
 For Minterms:
• ‘1’ means the variable is “Not Complemented” and
• ‘0’ means the variable is “Complemented”.
 For Maxterms:
• ‘0’ means the variable is “Not Complemented” and
• ‘1’ means the variable is “Complemented”.
Standard Order
 All variables should be present in a minterm or
maxterm and should be listed in the same order
(usually alphabetically)
 Example: For variables a, b, c:
• Maxterms (a + b + c), (a + b + c) are in standard order
• However, (b + a + c) is NOT in standard order
(a + c) does NOT contain all variables
• Minterms (a b c) and (a b c) are in standard order
• However, (b a c) is not in standard order
(a c) does not contain all variables
Sum-Of-Minterm (SOM)
 Sum-Of-Minterm (SOM) canonical form:
Sum of minterms of entries that evaluate to ‘1’
x y z F Minterm
0 0 0 0
0 0 1 1 m1 = x y z
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 1 m6 = x y z
1 1 1 1 m7 = x y z
F = m1 + m6 + m7 = ∑ (1, 6, 7) = x y z + x y z + x y z
Focus on the
‘1’ entries
+ a b c d
Sum-Of-Minterm Examples
 F(a, b, c, d) = ∑(2, 3, 6, 10, 11)
 F(a, b, c, d) = m2 + m3 + m6 + m10+ m11
 G(a, b, c, d) = ∑(0, 1, 12, 15)
 G(a, b, c, d) = m0 + m1 + m12 + m15
+ a b c da b c d + a b c d+ a b c d + a b c d
+ a b c da b c d + a b c d
Product-Of-Maxterm (POM)
 Product-Of-Maxterm (POM) canonical form:
Product of maxterms of entries that evaluate to ‘0’
x y z F Maxterm
0 0 0 1
0 0 1 1
0 1 0 0 M2 = (x + y + z)
0 1 1 1
1 0 0 0 M4 = (x + y + z)
1 0 1 1
1 1 0 0 M6 = (x + y + z)
1 1 1 1
Focus on the
‘0’ entries
F = M2·M4·M6 = ∏ (2, 4, 6) = (x+y+z) (x+y+z) (x+y+z)
 F(a, b, c, d) = ∏(1, 3, 6, 11)
 F(a, b, c, d) = M1 · M3 · M6 · M11
 G(a, b, c, d) = ∏(0, 4, 12, 15)
 G(a, b, c, d) = M0 · M4 · M12 · M15
Product-Of-Maxterm Examples
(a+b+c+d) (a+b+c+d) (a+b+c+d) (a+b+c+d)
(a+b+c+d) (a+b+c+d) (a+b+c+d) (a+b+c+d)
Observations
 We can implement any function by "ORing" the minterms
corresponding to the ‘1’ entries in the function table. A
minterm evaluates to ‘1’ for its corresponding entry.
 We can implement any function by "ANDing" the maxterms
corresponding to ‘0’ entries in the function table. A maxterm
evaluates to ‘0’ for its corresponding entry.
 The same Boolean function can be expressed in two
canonical ways: Sum-of-Minterms (SOM) and Product-of-
Maxterms (POM).
 If a Boolean function has fewer ‘1’ entries then the SOM
canonical form will contain fewer literals than POM.
However, if it has fewer ‘0’ entries then the POM form will
have fewer literals than SOM.
Converting to Sum-of-Minterms Form
 A function that is not in the Sum-of-Minterms form
can be converted to that form by means of a truth table
 Consider F = y + x z
x y z F Minterm
0 0 0 1 m0 = x y z
0 0 1 1 m1 = x y z
0 1 0 1 m2 = x y z
0 1 1 0
1 0 0 1 m4 = x y z
1 0 1 1 m5 = x y z
1 1 0 0
1 1 1 0
F = ∑(0, 1, 2, 4, 5) =
m0 + m1 + m2 + m4 + m5 =
x y z + x y z + x y z +
x y z + x y z
Converting to Product-of-Maxterms Form
 A function that is not in the Product-of-Minterms form
can be converted to that form by means of a truth table
 Consider again: F = y + x z
x y z F Minterm
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 0 M3 = (x+y+z)
1 0 0 1
1 0 1 1
1 1 0 0 M6 = (x+y+z)
1 1 1 0 M7 = (x+y+z)
F = ∏(3, 6, 7) =
M3 · M6 · M7 =
(x+y+z) (x+y+z) (x+y+z)
Conversions Between Canonical Forms
F = m1+m2+m3+m5+m7 = ∑(1, 2, 3, 5, 7) =
x y z + x y z + x y z + x y z + x y z
F = M0· M4· M6 = ∏(0, 4, 6) = (x+y+z)(x+y+z)(x+y+z)
x y z F Minterm Maxterm
0 0 0 0 M0 = (x + y + z)
0 0 1 1 m1 = x y z
0 1 0 1 m2 = x y z
0 1 1 1 m3 = x y z
1 0 0 0 M4 = (x + y + z)
1 0 1 1 m5 = x y z
1 1 0 0 M6 = (x + y + z)
1 1 1 1 m7 = x y z
Algebraic Conversion to Sum-of-Minterms
 Expand all terms first to explicitly list all minterms
 AND any term missing a variable v with (v + v)
 Example 1: f = x + x y (2 variables)
f = x (y + y) + x y
f = x y + x y + x y
f = m3 + m2 + m0 = ∑(0, 2, 3)
 Example 2: g = a + b c (3 variables)
g = a (b + b)(c + c) + (a + a) b c
g = a b c + a b c + a b c + a b c + a b c + a b c
g = a b c + a b c + a b c + a b c + a b c
g = m1 + m4 + m5 + m6 + m7 = ∑ (1, 4, 5, 6, 7)
Algebraic Conversion to Product-of-Maxterms
 Expand all terms first to explicitly list all maxterms
 OR any term missing a variable v with v · v
 Example 1: f = x + x y (2 variables)
Apply 2nd
distributive law:
f = (x + x) (x + y) = 1 · (x + y) = (x + y) = M1
 Example 2: g = a c + b c + a b (3 variables)
g = (a c + b c + a) (a c + b c + b) (distributive)
g = (c + b c + a) (a c + c + b) (x + x y = x + y)
g = (c + b + a) (a + c + b) (x + x y = x + y)
g = (a + b + c) (a + b + c) = M5 . M2 = ∏ (2, 5)
Function Complements
 The complement of a function expressed as a
sum of minterms is constructed by selecting the
minterms missing in the sum-of-minterms
canonical form
 Alternatively, the complement of a function
expressed by a Sum of Minterms form is simply
the Product of Maxterms with the same indices
 Example: Given F(x, y, z) = ∑ (1, 3, 5, 7)
F(x, y, z) = ∑ (0, 2, 4, 6)
F(x, y, z) = ∏ (1, 3, 5, 7)
Summary of Minterms and Maxterms
 There are 2n
minterms and maxterms for Boolean
functions with n variables.
 Minterms and maxterms are indexed from 0 to 2n
– 1
 Any Boolean function can be expressed as a logical
sum of minterms and as a logical product of maxterms
 The complement of a function contains those minterms
not included in the original function
 The complement of a sum-of-minterms is a product-of-
maxterms with the same indices
 Standard Sum-of-Products (SOP) form:
equations are written as an OR of AND terms
 Standard Product-of-Sums (POS) form:
equations are written as an AND of OR terms
 Examples:
• SOP:
• POS:
 These “mixed” forms are neither SOP nor POS
•
•
Standard Forms
BCBACBA ++
C·)CB(A·B)(A +++
C)(AC)B(A ++
B)(ACACBA ++
Standard Sum-of-Products (SOP)
 A sum of minterms form for n variables can
be written down directly from a truth table.
• Implementation of this form is a two-level
network of gates such that:
• The first level consists of n-input AND gates
• The second level is a single OR gate
 This form often can be simplified so that the
corresponding circuit is simpler.
 A Simplification Example:
 Writing the minterm expression:
F = A B C + A B C + A B C + ABC + ABC
 Simplifying:
F = A B C + A (B C + B C + B C + B C)
F = A B C + A (B (C + C) + B (C + C))
F = A B C + A (B + B)
F = A B C + A
F = B C + A
 Simplified F contains 3 literals compared to 15
Standard Sum-of-Products (SOP)
)7,6,5,4,1()C,B,A(F Σ=
AND/OR Two-Level Implementation
 The two implementations for F are shown below
F
B
C
A
It is quite
apparent which
is simpler!
SOP and POS Observations
 The previous examples show that:
• Canonical Forms (Sum-of-minterms, Product-of-Maxterms),
or other standard forms (SOP, POS) differ in complexity
• Boolean algebra can be used to manipulate equations into
simpler forms
• Simpler equations lead to simpler implementations
 Questions:
• How can we attain a “simplest” expression?
• Is there only one minimum cost circuit?
• The next part will deal with these issues
Terms of Use
 All (or portions) of this material © 2008 by Pearson
Education, Inc.
 Permission is given to incorporate this material or
adaptations thereof into classroom presentations and
handouts to instructors in courses adopting the latest
edition of Logic and Computer Design Fundamentals
as the course textbook.
 These materials or adaptations thereof are not to be
sold or otherwise offered for consideration.
 This Terms of Use slide or page is to be included within
the original materials or any adaptations thereof.

More Related Content

What's hot

13 Boolean Algebra
13 Boolean Algebra13 Boolean Algebra
13 Boolean Algebra
Praveen M Jigajinni
 
boolean algebra and logic simplification
boolean algebra and logic simplificationboolean algebra and logic simplification
boolean algebra and logic simplification
Unsa Shakir
 
boolean algrebra and logic gates in short
boolean algrebra and logic gates in shortboolean algrebra and logic gates in short
boolean algrebra and logic gates in short
Rojin Khadka
 
SOP POS, Minterm and Maxterm
SOP POS, Minterm and MaxtermSOP POS, Minterm and Maxterm
SOP POS, Minterm and Maxterm
Self-employed
 
Boolean algebra simplification and combination circuits
Boolean algebra simplification and combination circuitsBoolean algebra simplification and combination circuits
Boolean algebra simplification and combination circuits
Jaipal Dhobale
 
carry look ahead adder
carry look ahead addercarry look ahead adder
carry look ahead adder
ASHISH MANI
 
Multiplexers and Demultiplexers
Multiplexers and DemultiplexersMultiplexers and Demultiplexers
Multiplexers and Demultiplexers
GargiKhanna1
 
Logic gates and NAND and NOR univarsal gates
Logic gates and NAND and NOR univarsal gatesLogic gates and NAND and NOR univarsal gates
Logic gates and NAND and NOR univarsal gates
Dhwanil Champaneria
 
Decoder Full Presentation
Decoder Full Presentation Decoder Full Presentation
Decoder Full Presentation
Adeel Rasheed
 
Chapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic GatesChapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic Gates
Er. Nawaraj Bhandari
 
Combinational circuits
Combinational circuits Combinational circuits
Combinational circuits
DrSonali Vyas
 
Introduction to digital logic
Introduction to digital logicIntroduction to digital logic
Introduction to digital logic
Kamal Acharya
 
Nand and nor as a universal gates
Nand and nor as a universal gatesNand and nor as a universal gates
Nand and nor as a universal gates
Kaushal Shah
 
basic logic gates
 basic logic gates basic logic gates
basic logic gates
vishal gupta
 
Multiplexers
MultiplexersMultiplexers
Multiplexers
DrSonali Vyas
 
Binary multipliers
Binary multipliersBinary multipliers
Binary multipliers
Syed Saeed
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
Jamnas Mundakkutty A
 
Encoder
EncoderEncoder
Boolean algebra & logic gates
Boolean algebra & logic gatesBoolean algebra & logic gates
Boolean algebra & logic gates
Prof. Dr. K. Adisesha
 

What's hot (20)

13 Boolean Algebra
13 Boolean Algebra13 Boolean Algebra
13 Boolean Algebra
 
boolean algebra and logic simplification
boolean algebra and logic simplificationboolean algebra and logic simplification
boolean algebra and logic simplification
 
boolean algrebra and logic gates in short
boolean algrebra and logic gates in shortboolean algrebra and logic gates in short
boolean algrebra and logic gates in short
 
SOP POS, Minterm and Maxterm
SOP POS, Minterm and MaxtermSOP POS, Minterm and Maxterm
SOP POS, Minterm and Maxterm
 
Boolean algebra simplification and combination circuits
Boolean algebra simplification and combination circuitsBoolean algebra simplification and combination circuits
Boolean algebra simplification and combination circuits
 
carry look ahead adder
carry look ahead addercarry look ahead adder
carry look ahead adder
 
Multiplexers and Demultiplexers
Multiplexers and DemultiplexersMultiplexers and Demultiplexers
Multiplexers and Demultiplexers
 
Logic gates and NAND and NOR univarsal gates
Logic gates and NAND and NOR univarsal gatesLogic gates and NAND and NOR univarsal gates
Logic gates and NAND and NOR univarsal gates
 
Decoder Full Presentation
Decoder Full Presentation Decoder Full Presentation
Decoder Full Presentation
 
Chapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic GatesChapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic Gates
 
Combinational circuits
Combinational circuits Combinational circuits
Combinational circuits
 
Introduction to digital logic
Introduction to digital logicIntroduction to digital logic
Introduction to digital logic
 
Nand and nor as a universal gates
Nand and nor as a universal gatesNand and nor as a universal gates
Nand and nor as a universal gates
 
basic logic gates
 basic logic gates basic logic gates
basic logic gates
 
Multiplexers
MultiplexersMultiplexers
Multiplexers
 
Binary multipliers
Binary multipliersBinary multipliers
Binary multipliers
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
 
Encoder
EncoderEncoder
Encoder
 
Boolean algebra & logic gates
Boolean algebra & logic gatesBoolean algebra & logic gates
Boolean algebra & logic gates
 
Logic gates presentation
Logic gates presentationLogic gates presentation
Logic gates presentation
 

Similar to Boolean algebra And Logic Gates

Boolean Algebra SOP POS_Computer Architecture.pdf
Boolean Algebra SOP POS_Computer Architecture.pdfBoolean Algebra SOP POS_Computer Architecture.pdf
Boolean Algebra SOP POS_Computer Architecture.pdf
SangitaBose2
 
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
arunachalamr16
 
Boolean algebra
Boolean algebraBoolean algebra
Boolean algebra
LingalaSowjanya
 
sop_pos(DE).pptx
sop_pos(DE).pptxsop_pos(DE).pptx
sop_pos(DE).pptx
HarsimranKaur362773
 
Chapter 4 logic design
Chapter 4   logic designChapter 4   logic design
Chapter 4 logic design
Burhanuddin Mohammad
 
DM2020 boolean algebra
DM2020 boolean algebraDM2020 boolean algebra
DM2020 boolean algebra
Robert Geofroy
 
1Boolean Alegebra 3booleanalgebraold-160325120651.pdf
1Boolean Alegebra 3booleanalgebraold-160325120651.pdf1Boolean Alegebra 3booleanalgebraold-160325120651.pdf
1Boolean Alegebra 3booleanalgebraold-160325120651.pdf
siliconvalley6203
 
Boolean algebra
Boolean algebraBoolean algebra
Boolean algebra
Manish Kumar
 
Lect 2 boolean algebra (4 5-21)
Lect 2 boolean algebra (4 5-21)Lect 2 boolean algebra (4 5-21)
Lect 2 boolean algebra (4 5-21)
MeghaSharma513
 
booleanalgebra-140914001141-phpapp01 (1).ppt
booleanalgebra-140914001141-phpapp01 (1).pptbooleanalgebra-140914001141-phpapp01 (1).ppt
booleanalgebra-140914001141-phpapp01 (1).ppt
michaelaaron25322
 
102_2_digitalSystem_Chap_2_part_1.ppt
102_2_digitalSystem_Chap_2_part_1.ppt102_2_digitalSystem_Chap_2_part_1.ppt
102_2_digitalSystem_Chap_2_part_1.ppt
SATHYARAJECE
 
ESTUDO DE ALGEBRA BOOLEANA PARA ESTUDOS.
ESTUDO DE ALGEBRA BOOLEANA PARA ESTUDOS.ESTUDO DE ALGEBRA BOOLEANA PARA ESTUDOS.
ESTUDO DE ALGEBRA BOOLEANA PARA ESTUDOS.
fernandovargas497457
 
Chapter2 (1).pptx
Chapter2 (1).pptxChapter2 (1).pptx
Chapter2 (1).pptx
MitKumar2
 
Chapter 2.pptx
Chapter 2.pptxChapter 2.pptx
Chapter 2.pptx
AliaaTarek5
 
B sc cs i bo-de u-ii logic gates
B sc cs i bo-de u-ii logic gatesB sc cs i bo-de u-ii logic gates
B sc cs i bo-de u-ii logic gates
Rai University
 
Boolean algebra
Boolean algebraBoolean algebra
Boolean algebra
SAEED ULLAH JAN
 
DLD Chapter-2.pdf
DLD Chapter-2.pdfDLD Chapter-2.pdf
DLD Chapter-2.pdf
TamiratDejene1
 
Boolean algebra and logic gates
Boolean algebra and logic gatesBoolean algebra and logic gates
Boolean algebra and logic gates
Prof. Dr. K. Adisesha
 
Digital logic circuits important question and answers for 5 units
Digital logic circuits important question and answers for 5 unitsDigital logic circuits important question and answers for 5 units
Digital logic circuits important question and answers for 5 unitsLekashri Subramanian
 

Similar to Boolean algebra And Logic Gates (20)

Boolean Algebra SOP POS_Computer Architecture.pdf
Boolean Algebra SOP POS_Computer Architecture.pdfBoolean Algebra SOP POS_Computer Architecture.pdf
Boolean Algebra SOP POS_Computer Architecture.pdf
 
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
 
Boolean algebra
Boolean algebraBoolean algebra
Boolean algebra
 
sop_pos(DE).pptx
sop_pos(DE).pptxsop_pos(DE).pptx
sop_pos(DE).pptx
 
Chapter 4 logic design
Chapter 4   logic designChapter 4   logic design
Chapter 4 logic design
 
DM2020 boolean algebra
DM2020 boolean algebraDM2020 boolean algebra
DM2020 boolean algebra
 
2dig circ
2dig circ2dig circ
2dig circ
 
1Boolean Alegebra 3booleanalgebraold-160325120651.pdf
1Boolean Alegebra 3booleanalgebraold-160325120651.pdf1Boolean Alegebra 3booleanalgebraold-160325120651.pdf
1Boolean Alegebra 3booleanalgebraold-160325120651.pdf
 
Boolean algebra
Boolean algebraBoolean algebra
Boolean algebra
 
Lect 2 boolean algebra (4 5-21)
Lect 2 boolean algebra (4 5-21)Lect 2 boolean algebra (4 5-21)
Lect 2 boolean algebra (4 5-21)
 
booleanalgebra-140914001141-phpapp01 (1).ppt
booleanalgebra-140914001141-phpapp01 (1).pptbooleanalgebra-140914001141-phpapp01 (1).ppt
booleanalgebra-140914001141-phpapp01 (1).ppt
 
102_2_digitalSystem_Chap_2_part_1.ppt
102_2_digitalSystem_Chap_2_part_1.ppt102_2_digitalSystem_Chap_2_part_1.ppt
102_2_digitalSystem_Chap_2_part_1.ppt
 
ESTUDO DE ALGEBRA BOOLEANA PARA ESTUDOS.
ESTUDO DE ALGEBRA BOOLEANA PARA ESTUDOS.ESTUDO DE ALGEBRA BOOLEANA PARA ESTUDOS.
ESTUDO DE ALGEBRA BOOLEANA PARA ESTUDOS.
 
Chapter2 (1).pptx
Chapter2 (1).pptxChapter2 (1).pptx
Chapter2 (1).pptx
 
Chapter 2.pptx
Chapter 2.pptxChapter 2.pptx
Chapter 2.pptx
 
B sc cs i bo-de u-ii logic gates
B sc cs i bo-de u-ii logic gatesB sc cs i bo-de u-ii logic gates
B sc cs i bo-de u-ii logic gates
 
Boolean algebra
Boolean algebraBoolean algebra
Boolean algebra
 
DLD Chapter-2.pdf
DLD Chapter-2.pdfDLD Chapter-2.pdf
DLD Chapter-2.pdf
 
Boolean algebra and logic gates
Boolean algebra and logic gatesBoolean algebra and logic gates
Boolean algebra and logic gates
 
Digital logic circuits important question and answers for 5 units
Digital logic circuits important question and answers for 5 unitsDigital logic circuits important question and answers for 5 units
Digital logic circuits important question and answers for 5 units
 

More from Kumar

Graphics devices
Graphics devicesGraphics devices
Graphics devices
Kumar
 
Fill area algorithms
Fill area algorithmsFill area algorithms
Fill area algorithms
Kumar
 
region-filling
region-fillingregion-filling
region-filling
Kumar
 
Bresenham derivation
Bresenham derivationBresenham derivation
Bresenham derivation
Kumar
 
Bresenham circles and polygons derication
Bresenham circles and polygons dericationBresenham circles and polygons derication
Bresenham circles and polygons derication
Kumar
 
Introductionto xslt
Introductionto xsltIntroductionto xslt
Introductionto xslt
Kumar
 
Extracting data from xml
Extracting data from xmlExtracting data from xml
Extracting data from xml
Kumar
 
Xml basics
Xml basicsXml basics
Xml basics
Kumar
 
XML Schema
XML SchemaXML Schema
XML Schema
Kumar
 
Publishing xml
Publishing xmlPublishing xml
Publishing xml
Kumar
 
DTD
DTDDTD
DTD
Kumar
 
Applying xml
Applying xmlApplying xml
Applying xml
Kumar
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
Kumar
 
How to deploy a j2ee application
How to deploy a j2ee applicationHow to deploy a j2ee application
How to deploy a j2ee application
Kumar
 
JNDI, JMS, JPA, XML
JNDI, JMS, JPA, XMLJNDI, JMS, JPA, XML
JNDI, JMS, JPA, XML
Kumar
 
EJB Fundmentals
EJB FundmentalsEJB Fundmentals
EJB Fundmentals
Kumar
 
JSP and struts programming
JSP and struts programmingJSP and struts programming
JSP and struts programming
Kumar
 
java servlet and servlet programming
java servlet and servlet programmingjava servlet and servlet programming
java servlet and servlet programming
Kumar
 
Introduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC DriversIntroduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC Drivers
Kumar
 
Introduction to J2EE
Introduction to J2EEIntroduction to J2EE
Introduction to J2EE
Kumar
 

More from Kumar (20)

Graphics devices
Graphics devicesGraphics devices
Graphics devices
 
Fill area algorithms
Fill area algorithmsFill area algorithms
Fill area algorithms
 
region-filling
region-fillingregion-filling
region-filling
 
Bresenham derivation
Bresenham derivationBresenham derivation
Bresenham derivation
 
Bresenham circles and polygons derication
Bresenham circles and polygons dericationBresenham circles and polygons derication
Bresenham circles and polygons derication
 
Introductionto xslt
Introductionto xsltIntroductionto xslt
Introductionto xslt
 
Extracting data from xml
Extracting data from xmlExtracting data from xml
Extracting data from xml
 
Xml basics
Xml basicsXml basics
Xml basics
 
XML Schema
XML SchemaXML Schema
XML Schema
 
Publishing xml
Publishing xmlPublishing xml
Publishing xml
 
DTD
DTDDTD
DTD
 
Applying xml
Applying xmlApplying xml
Applying xml
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
How to deploy a j2ee application
How to deploy a j2ee applicationHow to deploy a j2ee application
How to deploy a j2ee application
 
JNDI, JMS, JPA, XML
JNDI, JMS, JPA, XMLJNDI, JMS, JPA, XML
JNDI, JMS, JPA, XML
 
EJB Fundmentals
EJB FundmentalsEJB Fundmentals
EJB Fundmentals
 
JSP and struts programming
JSP and struts programmingJSP and struts programming
JSP and struts programming
 
java servlet and servlet programming
java servlet and servlet programmingjava servlet and servlet programming
java servlet and servlet programming
 
Introduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC DriversIntroduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC Drivers
 
Introduction to J2EE
Introduction to J2EEIntroduction to J2EE
Introduction to J2EE
 

Boolean algebra And Logic Gates

  • 1. Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Edited by Dr. Muhamed Mudawar for COE 202 & EE 200 at KFUPM) Boolean Algebra and Logic Gates Logic and Computer Design Fundamentals
  • 2. Binary Logic and Gates  Binary variables take on one of two values.  Logical operators operate on binary values and binary variables.  Basic logical operators are the logic functions AND, OR and NOT.  Logic gates implement logic functions.  Boolean Algebra: a useful mathematical system for specifying and transforming logic functions.  We study Boolean algebra as a foundation for designing and analyzing digital systems!
  • 3. Binary Variables  Recall that the two binary values have different names: • True/False • On/Off • Yes/No • 1/0  We use 1 and 0 to denote the two values.  Variable identifier examples: • A, B, y, z, or X1 for now • RESET, START_IT, or ADD1 later
  • 4. Logical Operations  The three basic logical operations are: • AND • OR • NOT  AND is denoted by a dot (·).  OR is denoted by a plus (+).  NOT is denoted by an overbar ( ¯ ), a single quote mark (') after, or (~) before the variable.
  • 5.  Examples: • is read “Y is equal to A AND B.” • is read “z is equal to x OR y.” • is read “X is equal to NOT A.” Notation Examples  Note: The statement: 1 + 1 = 2 (read “one plus one equals two”) is not the same as 1 + 1 = 1 (read “1 or 1 equals 1”). = BAY ⋅ yxz += AX =
  • 6. Operator Definitions  Operations are defined on the values "0" and "1" for each operator: AND 0 · 0 = 0 0 · 1 = 0 1 · 0 = 0 1 · 1 = 1 OR 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 1 NOT 10 = 01=
  • 7. 01 10 X NOT XZ= Truth Tables  Tabular listing of the values of a function for all possible combinations of values on its arguments  Example: Truth tables for the basic logic operations: 111 001 010 000 Z = X·YYX AND OR X Y Z = X+Y 0 0 0 0 1 1 1 0 1 1 1 1
  • 8. Truth Tables – Cont’d  Used to evaluate any logic function  Consider F(X, Y, Z) = X Y + Y Z X Y Z X Y Y Y Z F = X Y + Y Z 0 0 0 0 1 0 0 0 0 1 0 1 1 1 0 1 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 1 0 0 1 0 1 0 1 1 1 1 1 0 1 0 0 1 1 1 1 1 0 0 1
  • 9.  Using Switches • Inputs:  logic 1 is switch closed  logic 0 is switch open • Outputs:  logic 1 is light on  logic 0 is light off. • NOT input:  logic 1 is switch open  logic 0 is switch closed Logic Function Implementation Switches in series => AND Switches in parallel => OR C Normally-closed switch => NOT
  • 10.  Example: Logic Using Switches  Light is on (L = 1) for L(A, B, C, D) = and off (L = 0), otherwise.  Useful model for relay and CMOS gate circuits, the foundation of current digital logic circuits Logic Function Implementation – cont’d B A D C A (B C + D) = A B C + A D
  • 11. Logic Gates  In the earliest computers, switches were opened and closed by magnetic fields produced by energizing coils in relays. The switches in turn opened and closed the current paths.  Later, vacuum tubes that open and close current paths electronically replaced relays.  Today, transistors are used as electronic switches that open and close current paths.
  • 12. Logic Gate Symbols and Behavior  Logic gates have special symbols:  And waveform behavior in time as follows: X 0 0 1 1 Y 0 1 0 1 X · Y(AND) 0 0 0 1 X + Y(OR) 0 1 1 1 (NOT) X 1 1 0 0 OR gate X Y Z = X + Y X Y Z = X · Y AND gate X Z = X NOT gateor inverter
  • 13. Logic Diagrams and Expressions  Boolean equations, truth tables and logic diagrams describe the same function!  Truth tables are unique, but expressions and logic diagrams are not. This gives flexibility in implementing functions. X Y F Z Logic Diagram Logic Equation ZYXF += Truth Table 11 1 1 11 1 0 11 0 1 11 0 0 00 1 1 00 1 0 10 0 1 00 0 0 X Y Z ZYXF ⋅+=
  • 14. Gate Delay  In actual physical gates, if an input changes that causes the output to change, the output change does not occur instantaneously.  The delay between an input change and the output change is the gate delay denoted by tG: tG tG Input Output Time (ns) 0 0 1 1 0 0.5 1 1.5 tG = 0.3 ns
  • 15. 1. 3. 5. 7. 9. 11. 13. 15. 17. Commutative Associative Distributive DeMorgan’s 2. 4. 6. 8. X . 1 X= X . 0 0= X . X X= 0=X . X Boolean Algebra 10. 12. 14. 16. X + Y Y + X= (X + Y) Z+ X + (Y Z)+= X(Y + Z) XY XZ+= X + Y X . Y= XY YX= (XY)Z X(YZ)= X + YZ (X + Y)(X + Z)= X . Y X + Y= X + 0 X= +X 1 1= X + X X= 1=X + X X= X  Invented by George Boole in 1854  An algebraic structure defined by a set B = {0, 1}, together with two binary operators (+ and ·) and a unary operator ( ) Idempotence Complement Involution Identity element
  • 16. Some Properties of Boolean Algebra  Boolean Algebra is defined in general by a set B that can have more than two values  A two-valued Boolean algebra is also know as Switching Algebra. The Boolean set B is restricted to 0 and 1. Switching circuits can be represented by this algebra.  The dual of an algebraic expression is obtained by interchanging + and · and interchanging 0’s and 1’s.  The identities appear in dual pairs. When there is only one identity on a line the identity is self-dual, i. e., the dual expression = the original expression.  Sometimes, the dot symbol ‘’ (AND operator) is not written when the meaning is clear
  • 17.  Example: F = (A + C) · B + 0 dual F = (A · C + B) · 1 = A · C + B  Example: G = X · Y + (W + Z) dual G =  Example: H = A · B + A · C + B · C dual H =  Unless it happens to be self-dual, the dual of an expression does not equal the expression itself  Are any of these functions self-dual? (A+B)(A+C)(B+C)=(A+BC)(B+C)=AB+AC+BC Dual of a Boolean Expression (X+Y) · (W · Z) = (X+Y) · (W+Z) (A+B) · (A+C) · (B+C) H is self-dual
  • 18. Boolean Operator Precedence  The order of evaluation is: 1. Parentheses 2. NOT 3. AND 4. OR  Consequence: Parentheses appear around OR expressions  Example: F = A(B + C)(C + D)
  • 19. Boolean Algebraic Proof – Example 1  A + A · B = A (Absorption Theorem) Proof Steps Justification A + A · B = A · 1 + A · B Identity element: A · 1 = A = A · ( 1 + B) Distributive = A · 1 1 + B = 1 = A Identity element  Our primary reason for doing proofs is to learn: • Careful and efficient use of the identities and theorems of Boolean algebra, and • How to choose the appropriate identity or theorem to apply to make forward progress, irrespective of the application.
  • 20.  AB + AC + BC = AB + AC (Consensus Theorem) Proof Steps Justification = AB + AC + BC = AB + AC + 1 · BC Identity element = AB + AC + (A + A) · BC Complement = AB + AC + ABC + ABC Distributive = AB + ABC + AC + ACB Commutative = AB · 1 + ABC + AC · 1 + ACB Identity element = AB (1+C) + AC (1 + B) Distributive = AB . 1 + AC . 1 1+X = 1 = AB + AC Identity element Boolean Algebraic Proof – Example 2
  • 21. Useful Theorems  Minimization X Y + X Y = Y  Absorption X + X Y = X  Simplification X + X Y = X + Y  DeMorgan’s  X + Y = X · Y  Minimization (dual) (X+Y)(X+Y) = Y  Absorption (dual) X · (X + Y) = X  Simplification (dual) X · (X + Y) = X · Y  DeMorgan’s (dual)  X · Y = X + Y
  • 22. Truth Table to Verify DeMorgan’s X Y X·Y X+Y X Y X+Y X · Y X·Y X+Y 0 0 0 0 1 1 1 1 1 1 0 1 0 1 1 0 0 0 1 1 1 0 0 1 0 1 0 0 1 1 1 1 1 1 0 0 0 0 0 0 X + Y = X · Y X · Y = X + Y  Generalized DeMorgan’s Theorem: X1+ X2+ … + Xn = X1 · X2 · … · Xn X1 · X2 · … · Xn = X1 + X2 + … + Xn
  • 23. Complementing Functions  Use DeMorgan's Theorem: 1. Interchange AND and OR operators 2. Complement each constant and literal  Example: Complement F = F = (x + y + z)(x + y + z)  Example: Complement G = (a + bc)d + e G = (a (b + c) + d) e x+ zyzyx
  • 24. Expression Simplification  An application of Boolean algebra  Simplify to contain the smallest number of literals (variables that may or may not be complemented) = AB + ABCD + A C D + A C D + A B D = AB + AB(CD) + A C (D + D) + A B D = AB + A C + A B D = B(A + AD) +AC = B (A + D) + A C (has only 5 literals) ++++ DCBADCADBADCABA
  • 25. Next … Canonical Forms  Minterms and Maxterms  Sum-of-Minterm (SOM) Canonical Form  Product-of-Maxterm (POM) Canonical Form  Representation of Complements of Functions  Conversions between Representations
  • 26. Minterms  Minterms are AND terms with every variable present in either true or complemented form.  Given that each binary variable may appear normal (e.g., x) or complemented (e.g., ), there are 2n minterms for n variables.  Example: Two variables (X and Y) produce 2 x 2 = 4 combinations: (both normal) (X normal, Y complemented) (X complemented, Y normal) (both complemented)  Thus there are four minterms of two variables. YX XY YX YX x
  • 27. Maxterms  Maxterms are OR terms with every variable in true or complemented form.  Given that each binary variable may appear normal (e.g., x) or complemented (e.g., x), there are 2n maxterms for n variables.  Example: Two variables (X and Y) produce 2 x 2 = 4 combinations: (both normal) (x normal, y complemented) (x complemented, y normal) (both complemented) YX + YX + YX + YX +
  • 28.  Two variable minterms and maxterms.  The minterm mi should evaluate to 1 for each combination of x and y.  The maxterm is the complement of the minterm Minterms & Maxterms for 2 variables x y Index Minterm Maxterm 0 0 0 m0 = x y M0 = x + y 0 1 1 m1 = x y M1 = x + y 1 0 2 m2 = x y M2 = x + y 1 1 3 m3 = x y M3 = x + y
  • 29. Minterms & Maxterms for 3 variables M3 = x + y + zm3 = x y z3110 M4 = x + y + zm4 = x y z4001 M5 = x + y + zm5 = x y z5101 M6 = x + y + zm6 = x y z6011 1 1 0 0 y 1 0 0 0 x 1 0 1 0 z M7 = x + y + zm7 = x y z7 M2 = x + y + zm2 = x y z2 M1 = x + y + zm1 = x y z1 M0 = x + y + zm0 = x y z0 MaxtermMintermIndex Maxterm Mi is the complement of minterm mi Mi = mi and mi = Mi
  • 30. Purpose of the Index  Minterms and Maxterms are designated with an index  The index number corresponds to a binary pattern  The index for the minterm or maxterm, expressed as a binary number, is used to determine whether the variable is shown in the true or complemented form  For Minterms: • ‘1’ means the variable is “Not Complemented” and • ‘0’ means the variable is “Complemented”.  For Maxterms: • ‘0’ means the variable is “Not Complemented” and • ‘1’ means the variable is “Complemented”.
  • 31. Standard Order  All variables should be present in a minterm or maxterm and should be listed in the same order (usually alphabetically)  Example: For variables a, b, c: • Maxterms (a + b + c), (a + b + c) are in standard order • However, (b + a + c) is NOT in standard order (a + c) does NOT contain all variables • Minterms (a b c) and (a b c) are in standard order • However, (b a c) is not in standard order (a c) does not contain all variables
  • 32. Sum-Of-Minterm (SOM)  Sum-Of-Minterm (SOM) canonical form: Sum of minterms of entries that evaluate to ‘1’ x y z F Minterm 0 0 0 0 0 0 1 1 m1 = x y z 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 1 m6 = x y z 1 1 1 1 m7 = x y z F = m1 + m6 + m7 = ∑ (1, 6, 7) = x y z + x y z + x y z Focus on the ‘1’ entries
  • 33. + a b c d Sum-Of-Minterm Examples  F(a, b, c, d) = ∑(2, 3, 6, 10, 11)  F(a, b, c, d) = m2 + m3 + m6 + m10+ m11  G(a, b, c, d) = ∑(0, 1, 12, 15)  G(a, b, c, d) = m0 + m1 + m12 + m15 + a b c da b c d + a b c d+ a b c d + a b c d + a b c da b c d + a b c d
  • 34. Product-Of-Maxterm (POM)  Product-Of-Maxterm (POM) canonical form: Product of maxterms of entries that evaluate to ‘0’ x y z F Maxterm 0 0 0 1 0 0 1 1 0 1 0 0 M2 = (x + y + z) 0 1 1 1 1 0 0 0 M4 = (x + y + z) 1 0 1 1 1 1 0 0 M6 = (x + y + z) 1 1 1 1 Focus on the ‘0’ entries F = M2·M4·M6 = ∏ (2, 4, 6) = (x+y+z) (x+y+z) (x+y+z)
  • 35.  F(a, b, c, d) = ∏(1, 3, 6, 11)  F(a, b, c, d) = M1 · M3 · M6 · M11  G(a, b, c, d) = ∏(0, 4, 12, 15)  G(a, b, c, d) = M0 · M4 · M12 · M15 Product-Of-Maxterm Examples (a+b+c+d) (a+b+c+d) (a+b+c+d) (a+b+c+d) (a+b+c+d) (a+b+c+d) (a+b+c+d) (a+b+c+d)
  • 36. Observations  We can implement any function by "ORing" the minterms corresponding to the ‘1’ entries in the function table. A minterm evaluates to ‘1’ for its corresponding entry.  We can implement any function by "ANDing" the maxterms corresponding to ‘0’ entries in the function table. A maxterm evaluates to ‘0’ for its corresponding entry.  The same Boolean function can be expressed in two canonical ways: Sum-of-Minterms (SOM) and Product-of- Maxterms (POM).  If a Boolean function has fewer ‘1’ entries then the SOM canonical form will contain fewer literals than POM. However, if it has fewer ‘0’ entries then the POM form will have fewer literals than SOM.
  • 37. Converting to Sum-of-Minterms Form  A function that is not in the Sum-of-Minterms form can be converted to that form by means of a truth table  Consider F = y + x z x y z F Minterm 0 0 0 1 m0 = x y z 0 0 1 1 m1 = x y z 0 1 0 1 m2 = x y z 0 1 1 0 1 0 0 1 m4 = x y z 1 0 1 1 m5 = x y z 1 1 0 0 1 1 1 0 F = ∑(0, 1, 2, 4, 5) = m0 + m1 + m2 + m4 + m5 = x y z + x y z + x y z + x y z + x y z
  • 38. Converting to Product-of-Maxterms Form  A function that is not in the Product-of-Minterms form can be converted to that form by means of a truth table  Consider again: F = y + x z x y z F Minterm 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 0 M3 = (x+y+z) 1 0 0 1 1 0 1 1 1 1 0 0 M6 = (x+y+z) 1 1 1 0 M7 = (x+y+z) F = ∏(3, 6, 7) = M3 · M6 · M7 = (x+y+z) (x+y+z) (x+y+z)
  • 39. Conversions Between Canonical Forms F = m1+m2+m3+m5+m7 = ∑(1, 2, 3, 5, 7) = x y z + x y z + x y z + x y z + x y z F = M0· M4· M6 = ∏(0, 4, 6) = (x+y+z)(x+y+z)(x+y+z) x y z F Minterm Maxterm 0 0 0 0 M0 = (x + y + z) 0 0 1 1 m1 = x y z 0 1 0 1 m2 = x y z 0 1 1 1 m3 = x y z 1 0 0 0 M4 = (x + y + z) 1 0 1 1 m5 = x y z 1 1 0 0 M6 = (x + y + z) 1 1 1 1 m7 = x y z
  • 40. Algebraic Conversion to Sum-of-Minterms  Expand all terms first to explicitly list all minterms  AND any term missing a variable v with (v + v)  Example 1: f = x + x y (2 variables) f = x (y + y) + x y f = x y + x y + x y f = m3 + m2 + m0 = ∑(0, 2, 3)  Example 2: g = a + b c (3 variables) g = a (b + b)(c + c) + (a + a) b c g = a b c + a b c + a b c + a b c + a b c + a b c g = a b c + a b c + a b c + a b c + a b c g = m1 + m4 + m5 + m6 + m7 = ∑ (1, 4, 5, 6, 7)
  • 41. Algebraic Conversion to Product-of-Maxterms  Expand all terms first to explicitly list all maxterms  OR any term missing a variable v with v · v  Example 1: f = x + x y (2 variables) Apply 2nd distributive law: f = (x + x) (x + y) = 1 · (x + y) = (x + y) = M1  Example 2: g = a c + b c + a b (3 variables) g = (a c + b c + a) (a c + b c + b) (distributive) g = (c + b c + a) (a c + c + b) (x + x y = x + y) g = (c + b + a) (a + c + b) (x + x y = x + y) g = (a + b + c) (a + b + c) = M5 . M2 = ∏ (2, 5)
  • 42. Function Complements  The complement of a function expressed as a sum of minterms is constructed by selecting the minterms missing in the sum-of-minterms canonical form  Alternatively, the complement of a function expressed by a Sum of Minterms form is simply the Product of Maxterms with the same indices  Example: Given F(x, y, z) = ∑ (1, 3, 5, 7) F(x, y, z) = ∑ (0, 2, 4, 6) F(x, y, z) = ∏ (1, 3, 5, 7)
  • 43. Summary of Minterms and Maxterms  There are 2n minterms and maxterms for Boolean functions with n variables.  Minterms and maxterms are indexed from 0 to 2n – 1  Any Boolean function can be expressed as a logical sum of minterms and as a logical product of maxterms  The complement of a function contains those minterms not included in the original function  The complement of a sum-of-minterms is a product-of- maxterms with the same indices
  • 44.  Standard Sum-of-Products (SOP) form: equations are written as an OR of AND terms  Standard Product-of-Sums (POS) form: equations are written as an AND of OR terms  Examples: • SOP: • POS:  These “mixed” forms are neither SOP nor POS • • Standard Forms BCBACBA ++ C·)CB(A·B)(A +++ C)(AC)B(A ++ B)(ACACBA ++
  • 45. Standard Sum-of-Products (SOP)  A sum of minterms form for n variables can be written down directly from a truth table. • Implementation of this form is a two-level network of gates such that: • The first level consists of n-input AND gates • The second level is a single OR gate  This form often can be simplified so that the corresponding circuit is simpler.
  • 46.  A Simplification Example:  Writing the minterm expression: F = A B C + A B C + A B C + ABC + ABC  Simplifying: F = A B C + A (B C + B C + B C + B C) F = A B C + A (B (C + C) + B (C + C)) F = A B C + A (B + B) F = A B C + A F = B C + A  Simplified F contains 3 literals compared to 15 Standard Sum-of-Products (SOP) )7,6,5,4,1()C,B,A(F Σ=
  • 47. AND/OR Two-Level Implementation  The two implementations for F are shown below F B C A It is quite apparent which is simpler!
  • 48. SOP and POS Observations  The previous examples show that: • Canonical Forms (Sum-of-minterms, Product-of-Maxterms), or other standard forms (SOP, POS) differ in complexity • Boolean algebra can be used to manipulate equations into simpler forms • Simpler equations lead to simpler implementations  Questions: • How can we attain a “simplest” expression? • Is there only one minimum cost circuit? • The next part will deal with these issues
  • 49. Terms of Use  All (or portions) of this material © 2008 by Pearson Education, Inc.  Permission is given to incorporate this material or adaptations thereof into classroom presentations and handouts to instructors in courses adopting the latest edition of Logic and Computer Design Fundamentals as the course textbook.  These materials or adaptations thereof are not to be sold or otherwise offered for consideration.  This Terms of Use slide or page is to be included within the original materials or any adaptations thereof.

Editor's Notes

  1. We can also use algebraic properties in doing this proof. We will show that, x’ . y’, satisfies the definition of the complement of (x + y), defined as (x + y)’ by DeMorgan’s Law. To show this we need to show that A + A’ = 1 and A . A’ = 0 with A = x + y and A’ = x’ . y’. This proves that x’ . y’ = (x + y)’. Part 1: Show x + y + x’ . y’ = 1. x + y + x’ . y’ = (x + y + x’) (x + y + y’) X + YZ = (X + Y)(X + Z) (Distributive Law) = (x + x’ + y) (x + y + y’) X + Y = Y + X (Commutative Law) = (1 + y)(x + 1) X + X’ = 1 = 1 . 1 1 + X = 1 = 1 1 . X = 1 Part 2: Show (x + y) . x’ . y’ = 0. (x + y) . x’ . y’ = (x . x’ . y’ + y . x’ . y’) X (Y + Z) = XY + XZ (Distributive Law) = (x . x’ . y’ + y . y’ . x’) XY = YX (Commutative Law) = (0 . y’ + 0 . x’) X . X’ = 0 = (0 + 0) 0 . X = 0 = 0 X + 0 = X (With X = 0) Based on the above two parts, x’y’ = (x + y)’ The second DeMorgans’ law is proved by duality. Note that DeMorgan’s Law, given as an identity is not an axiom in the sense that it can be proved using the other identities.
  2. G' = ((a (b' + c'))+ d ) e' = (a (b' + c') + d) e'
  3. F(A,B,C,D,E) = A’B’C’DE’ + A’BC’D’E + AB’C’D’E + AB’CDE
  4. F(A,B,C,D,E) = A’B’C’DE’ + A’BC’D’E + AB’C’D’E + AB’CDE