Upload
others
View
8
Download
0
Embed Size (px)
Citation preview
ECE – Digital Electronics
Basic Logic Operations,Boolean Expressions,Boolean Expressions,
andBoolean Algebra
Digital Electronics
Basic Logic Operations,Boolean Expressions,Boolean Expressions,
andBoolean Algebra
Basic Logic Operations
ECE Digital Electronics
Basic Logic Operations
ECE Digital Electronics 2
Basic Logic Operations
� AND
� OR
� NOT (Complement)
ECE - Digital Electronics
� Order of Precedence
1. NOT
2. AND
3. OR
− can be modified using parenthesis
Basic Logic Operations
Digital Electronics 3
can be modified using parenthesis
Basic Logic Operations
ECE - Digital Electronics
Basic Logic Operations
Digital Electronics 4
Basic Logic Operations
ECE - Digital Electronics
Basic Logic Operations
Digital Electronics 5
Additional Logic Operations
� NAND
− F = (A . B)'
� NOR
− F = (A + B)'
ECE - Digital Electronics
− F = (A + B)'
� XOR
− Output is 1 iff either input is 1, but not both.
� XNOR (aka. Equivalence)
− Output is 1 iff both inputs are 1 or both inputs are 0.
Additional Logic Operations
Digital Electronics 6
Output is 1 iff either input is 1, but not both.
XNOR (aka. Equivalence)
Output is 1 iff both inputs are 1 or both inputs
Additional Logic OperationsNAND
ECE - Digital Electronics
NOR denotes inversion
Additional Logic OperationsXOR
Digital Electronics 7
XNORdenotes inversion
Exercise:
Derive the Truth table for each of the
Additional Logic Operations
ECE - Digital Electronics
Derive the Truth table for each of the following logic operations:
1. 2-input NAND2. 2-input NOR
Exercise:
Derive the Truth table for each of the
Additional Logic Operations
Digital Electronics 8
Derive the Truth table for each of the following logic operations:
input NANDinput NOR
Exercise:
Derive the Truth table for each of the
Additional Logic Operations
ECE - Digital Electronics
Derive the Truth table for each of the following logic operations:
1. 2-input XOR2. 2-input XNOR
Exercise:
Derive the Truth table for each of the
Additional Logic Operations
Digital Electronics 9
Derive the Truth table for each of the following logic operations:
input XORinput XNOR
Truth Tables
ECE - Digital Electronics
Truth Tables
Digital Electronics 10
Truth Tables� Used to describe the functional behavior of a Boolean
expression and/or Logic circuit.
� Each row in the truth table represents a unique combination of the input variables.
− For n input variables, there are 2
ECE - Digital Electronics
− For n input variables, there are 2
� The output of the logic function is defined for each row.
� Each row is assigned a numerical value, with the rows listed in ascending order.
� The order of the input variables defined in the logic function is important.
Truth TablesUsed to describe the functional behavior of a Boolean expression and/or Logic circuit.
Each row in the truth table represents a unique combination of the input variables.
For n input variables, there are 2n rows.
Digital Electronics 11
For n input variables, there are 2 rows.
The output of the logic function is defined for each
Each row is assigned a numerical value, with the rows
The order of the input variables defined in the logic
3-input Truth Table
F(A,B,C) = Boolean expression
ECE - Digital Electronics
F(A,B,C) = Boolean expression
input Truth Table
F(A,B,C) = Boolean expression
Digital Electronics 12
F(A,B,C) = Boolean expression
4-input Truth Table
F(A,B,C,D) = Boolean expression
ECE - Digital Electronics
F(A,B,C,D) = Boolean expression
input Truth Table
F(A,B,C,D) = Boolean expression
Digital Electronics 13
F(A,B,C,D) = Boolean expression
Boolean Expressions
ECE - Digital Electronics
Boolean Expressions
Digital Electronics 14
Boolean Expressions
� Boolean expressions are composed of
� Literals – variables and their complements
� Logical operations
� Examples
ECE - Digital Electronics
� Examples
� F = A.B'.C + A'.B.C' + A.B.C + A'.B'.C'
� F = (A+B+C').(A'+B'+C).(A+B+C)
� F = A.B'.C' + A.(B.C' + B'.C)
literals
Boolean Expressions
Boolean expressions are composed of
variables and their complements
Digital Electronics 15
F = A.B'.C + A'.B.C' + A.B.C + A'.B'.C'
F = (A+B+C').(A'+B'+C).(A+B+C)
F = A.B'.C' + A.(B.C' + B'.C)
logic operations
Boolean Expressions
� Boolean expressions are realized using a network (or combination) of logic gates.
− Each logic gate implements one of the logic operations in the Boolean expression
− Each input to a logic gate represents one of
ECE - Digital Electronics
− Each input to a logic gate represents one of the literals in the Boolean expression
A
B
literals
Boolean Expressions
Boolean expressions are realized using a network (or combination) of logic gates.
Each logic gate implements one of the logic operations in the Boolean expression
Each input to a logic gate represents one of
Digital Electronics 16
Each input to a logic gate represents one of the literals in the Boolean expression
f
logic operations
Boolean Expressions
� Boolean expressions are evaluated by
� Substituting a 0 or 1 for each literal
� Calculating the logical value of the expression
A Truth Table specifies the value of the Boolean
ECE - Digital Electronics
� A Truth Table specifies the value of the Boolean expression for every combination of the variables in the Boolean expression.
� For an n-variable Boolean expression, the truth table has 2n rows (one for each combination).
Boolean Expressions
Boolean expressions are evaluated by
Substituting a 0 or 1 for each literal
Calculating the logical value of the expression
specifies the value of the Boolean
Digital Electronics 17
specifies the value of the Boolean expression for every combination of the variables in the Boolean expression.
variable Boolean expression, the truth rows (one for each combination).
Boolean Expressions
Example:
Evaluate the following Boolean expression, for all combination of inputs, using a Truth
ECE - Digital Electronics
for all combination of inputs, using a Truth table.
F(A,B,C) = A'.B'.C + A.B'.C' + A.C
Boolean Expressions
Example:
Evaluate the following Boolean expression, for all combination of inputs, using a Truth
Digital Electronics 18
for all combination of inputs, using a Truth table.
F(A,B,C) = A'.B'.C + A.B'.C' + A.C
Boolean Expressions
� Two Boolean expressions are equivalent if they have the same value for each combination of the variables in the Boolean expression.
− F1
= (A + B)'
ECE - Digital Electronics
1
− F2
= A'.B'
� How do you prove that two Boolean expressions are equivalent?
− Truth table
− Boolean Algebra
Boolean Expressions
Two Boolean expressions are equivalent if they have the same value for each combination of the variables in the Boolean expression.
Digital Electronics 19
How do you prove that two Boolean expressions are equivalent?
Boolean Expressions
Example:
Using a Truth table, prove that the following two Boolean expressions are equivalent.
ECE - Digital Electronics
two Boolean expressions are equivalent.
F1
= (A + B)'F
2= A'.B'
Boolean Expressions
Example:
Using a Truth table, prove that the following two Boolean expressions are equivalent.
Digital Electronics 20
two Boolean expressions are equivalent.
= (A + B)'= A'.B'
Boolean Algebra
ECE - Digital Electronics
Boolean Algebra
Digital Electronics 21
Boolean Algebra� George Boole developed an algebraic description for
processes involving logical thought and reasoning.
− Became known as Boolean Algebra
� Claude Shannon later demonstrated that Boolean Algebra could be used to describe switching circuits.
ECE - Digital Electronics
Algebra could be used to describe switching circuits.
− Switching circuits are circuits built from devices that switch between two states (e.g. 0 and 1).
− Switching Algebra is a special case of Boolean Algebra in which all variables take on just two distinct values
� Boolean Algebra is a powerful tool for analyzing and designing logic circuits.
Boolean AlgebraGeorge Boole developed an algebraic description for processes involving logical thought and reasoning.
Boolean Algebra
Claude Shannon later demonstrated that Boolean Algebra could be used to describe switching circuits.
Digital Electronics 22
Algebra could be used to describe switching circuits.
Switching circuits are circuits built from devices that switch between two states (e.g. 0 and 1).
is a special case of Boolean Algebra in which all variables take on just two distinct
Boolean Algebra is a powerful tool for analyzing and
Basic Laws and Theorems
Commutative Law A + B = B + A
Associative Law A + (B + C) = (A + B) + C
Distributive Law A.(B + C) = AB + AC
Null Elements A + 1 = 1
Identity A + 0 = A
A + A = AIdempotence
ECE - Digital Electronics
A + A = A
Complement A + A' = 1
Involution A'' = A
Absorption (Covering) A + AB = A
Simplification A + A'B = A + B
DeMorgan's Rule (A + B)' = A'.B'
Logic Adjacency (Combining) AB + AB' = A
Consensus AB + BC + A'C = AB + A'C
Idempotence
Basic Laws and Theorems
A.B = B.A
A + (B + C) = (A + B) + C A . (B . C) = (A . B) . C
A + (B . C) = (A + B) . (A + C)
A . 0 = 0
A . 1 = A
A . A = A
Digital Electronics 23
A . A = A
A . A' = 0
A . (A + B) = A
A . (A' + B) = A . B
(A . B)' = A' + B'
(A + B) . (A + B') = A
AB + BC + A'C = AB + A'C (A + B) . (B + C) . (A' + C) = (A + B) . (A' + C)
Idempotence
A + A = A
F = ABC + ABC' + ABC
F = ABC + ABC'
Note: terms can also be added using this theorem
ECE - Digital Electronics
A . A = A
G = (A' + B + C').(A + B' + C).(A + B' + C)
G = (A' + B + C') + (A + B' + C)
Note: terms can also be added using this theorem
Idempotence
A + A = A
F = ABC + ABC' + ABC
F = ABC + ABC'
Note: terms can also be added using this theorem
Digital Electronics 24
A . A = A
G = (A' + B + C').(A + B' + C).(A + B' + C)
G = (A' + B + C') + (A + B' + C)
Note: terms can also be added using this theorem
Complement
A + A' = 1
F = ABC'D + ABCD
F = ABD.(C' + C)
F = ABD
ECE - Digital Electronics
A . A' = 0
G = (A + B + C + D).(A + B' + C + D)
G = (A + C + D) + (B . B')
G = A + C + D
Complement
A + A' = 1
F = ABC'D + ABCD
F = ABD.(C' + C)
F = ABD
Digital Electronics 25
A . A' = 0
G = (A + B + C + D).(A + B' + C + D)
G = (A + C + D) + (B . B')
G = A + C + D
Distributive Law
A.(B + C) = AB + AC
F = WX.(Y + Z)
F = WXY + WXZ
ECE - Digital Electronics
G = B'.(AC + AD)
G = AB'C + AB'D
H = A.(W'X + WX' + YZ)
H = AW'X + AWX' + AYZ
Distributive Law
A + (B.C) = (A + B).(A + C)
F = WX + (Y.Z)
F = (WX + Y).(WX + Z)
Digital Electronics 26
G = B' + (A.C.D)
G = (B' + A).(B' + C).(B' + D)
H = A + ( (W'X).(WX') )
H = (A + W'X).(A + WX')
Absorption (Covering)
A + AB = A
F = A'BC + A'
F = A'
ECE - Digital Electronics
G = XYZ + XY'Z + X'Y'Z' + XZ
G = XYZ + XZ + X'Y'Z'
G = XZ + X'Y'Z'
H = D + DE + DEF
H = D
Absorption (Covering)
A.(A + B) = A
F = A'.(A' + BC)
F = A'
Digital Electronics 27
G = XZ.(XZ + Y + Y')
G = XZ.(XZ + Y)
G = XZ
H = D.(D + E + EF)
H = D
Simplification
A + A'B = A + B
F = (XY + Z).(Y'W + Z'V') +
F = Y'W + Z'V' +
ECE - Digital Electronics
A.(A' + B) = A . B
G = (X + Y).( (X + Y)'
G = (X + Y) .
Simplification
A + A'B = A + B
.(Y'W + Z'V') + (XY + Z)'
F = Y'W + Z'V' + (XY + Z)'
Digital Electronics 28
A.(A' + B) = A . B
(X + Y)' + (WZ) )
(X + Y) . WZ
Logic Adjacency (Combining)
A.B + A.B' = A
F = (X + Y).(W'X'Z)
F = (X + Y)
ECE - Digital Electronics
(A + B).(A + B') = A
G = (XY + X'Z').(XY +
G = XY
Logic Adjacency (Combining)
A.B + A.B' = A
(W'X'Z) + (X + Y).(W'X'Z)'
F = (X + Y)
Digital Electronics 29
(A + B).(A + B') = A
).(XY + (X'Z')' )
G = XY
Boolean Algebra
Example:
Using Boolean Algebra, simplify the following Boolean expression.
ECE - Digital Electronics
Boolean expression.
F(A,B,C) = A'.B.C + A.B'.C + A.B.C
Boolean Algebra
Example:
Using Boolean Algebra, simplify the following Boolean expression.
Digital Electronics 30
Boolean expression.
F(A,B,C) = A'.B.C + A.B'.C + A.B.C
Boolean Algebra
Example:
Using Boolean Algebra, simplify the following
ECE - Digital Electronics
Using Boolean Algebra, simplify the following Boolean expression.
F(A,B,C) = (A'+B'+C').(A'+B+C').(A+B'+C')
Boolean Algebra
Example:
Using Boolean Algebra, simplify the following
Digital Electronics 31
Using Boolean Algebra, simplify the following Boolean expression.
F(A,B,C) = (A'+B'+C').(A'+B+C').(A+B'+C')
DeMorgan's Laws
� Can be stated as follows:
− The complement of the product (AND) is the sum (OR) of the complements.
� (X.Y)' = X' + Y'
ECE - Digital Electronics
− The complement of the sum (OR) is the product (AND) of the complements.
� (X + Y)' = X' . Y'
� Easily generalized to n variables.
� Can be proven using a Truth table
DeMorgan's Laws
Can be stated as follows:
The complement of the product (AND) is the sum (OR) of the complements.
(X.Y)' = X' + Y'
Digital Electronics 32
The complement of the sum (OR) is the product (AND) of the complements.
(X + Y)' = X' . Y'
Easily generalized to n variables.
Can be proven using a Truth table
Proving DeMorgan's Law
(X . Y)' = X' + Y'
ECE - Digital Electronics
Proving DeMorgan's Law
(X . Y)' = X' + Y'
Digital Electronics 33
x 1
x 2
x 1
x 2
x 1 x 2 = (a)
DeMorgan's Theorems
ECE - Digital Electronics
x 1
x 2
x 1
x 2
1 2
x 1 x 2 + (b)
x 1
x 2
x 1 x 2 + =
DeMorgan's Theorems
Digital Electronics 34
x 1
x 2
1 2
2 x 1 x 2 =
Importance of Boolean Algebra
� Boolean Algebra is used to simplify Boolean expressions.
– Through application of the Laws and Theorems discussed
ECE - Digital Electronics
discussed
� Simpler expressions lead to simpler circuit realization, which, generally, reduces cost, area requirements, and power consumption.
� The objective of the digital circuit designer is to design and realize optimal digital circuits.
Importance of Boolean Algebra
Boolean Algebra is used to simplify Boolean
Through application of the Laws and Theorems
Digital Electronics 35
Simpler expressions lead to simpler circuit realization, which, generally, reduces cost, area requirements, and
The objective of the digital circuit designer is to design and realize optimal digital circuits.
Algebraic Simplification
� Justification for simplifying Boolean expressions:
– Reduces the cost associated with realizing the expression using logic gates.
– Reduces the area (i.e. silicon) required to fabricate the switching function.
ECE - Digital Electronics
switching function.
– Reduces the power consumption of the circuit.
� In general, there is no easy way to determine when a Boolean expression has been simplified to a minimum number of terms or minimum number of literals.
– No unique solution
Algebraic Simplification
Justification for simplifying Boolean expressions:
Reduces the cost associated with realizing the expression using logic gates.
Reduces the area (i.e. silicon) required to fabricate the
Digital Electronics 36
Reduces the power consumption of the circuit.
In general, there is no easy way to determine when a Boolean expression has been simplified to a minimum number of terms or minimum number of literals.
Algebraic Simplification
� Boolean (or Switching) expressions can be simplified using the following methods:
1. Multiplying out the expression
2. Factoring the expression
ECE - Digital Electronics
3. Combining terms of the expression
4. Eliminating terms in the expression
5. Eliminating literals in the expression
6. Adding redundant terms to the expression
As we shall see, there are other tools that can be used to simplify Boolean Expressions.Namely, Karnaugh Maps.
Algebraic Simplification
Boolean (or Switching) expressions can be simplified using the following methods:
Multiplying out the expression
Factoring the expression
Digital Electronics 37
Combining terms of the expression
Eliminating terms in the expression
Eliminating literals in the expression
Adding redundant terms to the expression
As we shall see, there are other tools that can be used to simplify Boolean Expressions.