3. boolean algebra
TRANSCRIPT
-
8/2/2019 3. Boolean Algebra
1/80
Chapter# 2
Combinational Logic Circuits
-
8/2/2019 3. Boolean Algebra
2/80
Boolean Algebra
-
8/2/2019 3. Boolean Algebra
3/80
Binary (Boolean) Logic
Deals with binary variables and binary logic
functions
Has two discrete values 0 -> Open, False
1 -> Closed, True
Three basic logic operators
AND (.)
OR (+)
NOT ()
-
8/2/2019 3. Boolean Algebra
4/80
4
Boolean Algebra
A branch of Algebra used for describing anddesigning two valued state variables
Introduced by George Boole in 19th Century Shannon used it to design switching circuits (1938)
A convenient and systematic way of expressing andanalyzing logic circuit operations
Mathematics of digital systems
Used to define a digital circuit and evaluate itsoperation
Used to simplify the logic circuits
-
8/2/2019 3. Boolean Algebra
5/80
5
Boolean Algebra Terms
Variable
a symbol used to represent a logical quantity
A variable can have a 0 or 1 value
Example:
Complement
Inverse of a variable. Indicated by a bar over the variable
Example:
Literal Instance of a variable or its complement
X
X
A B
-
8/2/2019 3. Boolean Algebra
6/80
6
Boolean Addition
Boolean Addition performed by OR gate
Sum Term is a sum of literals:
Sum term = 1 if any literal = 1
Sum term = 0 if all literals = 0
In logic circuits, a sum term is produced by anOR operation with no AND operationsinvolved
BA BA CBA
-
8/2/2019 3. Boolean Algebra
7/80
7
Boolean Multiplication
Boolean Multiplication performed by AND gate
Product Term is a product of literals:
Product term = 1 if all literals = 1
Product term = 0 if any one literal = 0
In logic circuits, a product term is produced by anAND operation with no OR operations involved
BA. BA. CBA ..
-
8/2/2019 3. Boolean Algebra
8/80
8
Precedence of Operators
-
8/2/2019 3. Boolean Algebra
9/80
9
Function Evaluation
-
8/2/2019 3. Boolean Algebra
10/80
Boolean Algebra - Postulates
Postulates are facts that can be taken as true
They do not require proof
There are certain Laws, Rules & Theorems
that govern the Boolean Algebra
-
8/2/2019 3. Boolean Algebra
11/80
11
Laws, Rules & Theorems
of Boolean Algebra Commutative Law
for Addition and Multiplication
Associative Law for Addition and Multiplication
Distributive Law
Rules of Boolean Algebra
DeMorgan's Theorems
-
8/2/2019 3. Boolean Algebra
12/80
12
Commutative Law
Commutative Law for Addition
A + B = B + A
Commutative Law for Multiplication
A.B = B.A
-
8/2/2019 3. Boolean Algebra
13/80
13
Associative Law
Associative Law for Addition
A + (B + C) = (A + B) + C
-
8/2/2019 3. Boolean Algebra
14/80
14
Associative Law
Associative Law for Multiplication
A.(B.C) = (A.B).C
-
8/2/2019 3. Boolean Algebra
15/80
15
Distributive Law
A.(B + C) = A.B + A.C
-
8/2/2019 3. Boolean Algebra
16/80
16
Basic Identities of Boolean Addition
CAABBCCAAB
BABAA
AABA
B.ABA
ACAB)CB(A
C)BA()CB(A
ABBA
AA
1AA
AAA
11A
A0A
)heoremConsensusT(
)tionSimplifica(
)Absorption(
)sTheorem'DeMorgan(
)veDistributi(
)eAssociativ(
)eCommutativ(
)Involution()Complement(
)Idempotent(
)Identity(
-
8/2/2019 3. Boolean Algebra
17/80
17
Duality Principle
A Boolean equation remains valid if we take
the dual of the expressions on both sides of the
equal sign
Dual of Expressions
Interchange 1s and 0s
Interchange AND (.) and OR (+)
-
8/2/2019 3. Boolean Algebra
18/80
18
Basic Identities of Boolean
Multiplication
ZXXYYZZXXY
YXYXX
XXYX
YXYX
XZXY)ZY(X
XYYX
1XXXXX
11X
X0X
)ZX).(YX()ZY)(ZX)(YX(
Y.X)YX.(X
X)YX.(X
YXY.X
)ZX).(YX(Z.YX
X.YY.X
0X.X
XX.X
00.X
X1.X
-
8/2/2019 3. Boolean Algebra
19/80
19
Laws & Rules of Boolean Algebra
(Floyds Summarized Version)
1. A + 0 = A
2. A + 1 = 1
3. A.0 = 0
4. A.1 = A
5. A + A = A
6. A + = 1
7. A.A = A
8.
9. = A
10.A + A.B = A
11. A + = A + B
12.(A+B).(A+C)
= A+B.C
A
A
BA.
0A.A
-
8/2/2019 3. Boolean Algebra
20/80
20
Derivation of Absorption
.}{
}{1.
}){1(
rIdentityFoA
rIdentityFoA
veLawDistributiBA
ABA
-
8/2/2019 3. Boolean Algebra
21/80
21
Derivation of Simplification
};{
}{)(
}{
}{)1.(
IdentityComplementYX
onDistributiYXXX
onDistributiYXXYX
IdentityYXYX
YXX
-
8/2/2019 3. Boolean Algebra
22/80
22
Derivation of Consensus Theorem
},2{
};){1()1(
}{}){(
IdentityRuleZXXY
DistAssocYZXZXY
onDistributiYZXXYZZXXYIdentityXXYZZXXY
YZZXXY
-
8/2/2019 3. Boolean Algebra
23/80
23
First Theorem
Second Theorem
Veracity of DeMorgan's Theorems
BABA .
BABA .
B.A BA
BA B.A
-
8/2/2019 3. Boolean Algebra
24/80
24
Application of DeMorgan's Theorems
Apply to any number of variables
Apply to combination of variables
ZYXZ.Y.X
Z.Y.XZYX
BCACBA ).().(
).().().).(.( BCACBABCACBA
BCACBA .).().(.
CBBACABA ....
CBCABA ...
-
8/2/2019 3. Boolean Algebra
25/80
25
Applying DeMorgans Theorem to
Logic Design Facilitate design using NAND/NOR gates
SHORTCUT METHOD: NOT all variables
Change all . to + and all + to . NOT the final result
Example:
)Z.Y).(Z.X).(Y.X(F
)ZY).(ZX).(YX(F
Z.YZ.XY.XF
-
8/2/2019 3. Boolean Algebra
26/80
26
DeMorgans Theorem in circuit domain
Original circuit NAND equivalent circuit
-
8/2/2019 3. Boolean Algebra
27/80
27
Boolean Analysis of Logic Circuits
A logic circuit is formed by a combination of the logic gates
Boolean algebra provides a concise way to express the
operation of a logic circuit
Boolean expression for a logic circuit Starting from the left, write the expression for each gate output, in terms
of its input variables and move towards the final output
CCAB
DCAB )(
-
8/2/2019 3. Boolean Algebra
28/80
28
Boolean Analysis of Logic Circuits
Evaluating the expression
Evaluate the Boolean expression for all possiblecombinations of values for the input variables that make theexpression equal to 1
Putting the results in truth table
List all combinations of input variables in a binarysequence
Place 1 in the output column for each combination of input
variables that was determined in the evaluation Place a 0 in the output column for all other combinations of
input variables
-
8/2/2019 3. Boolean Algebra
29/80
29
Constructing a Truth Table
From the expression, the output is a 1 if variableD = 1and
if AB=1or C=0
AB=1 if A=1 and B=1
CCAB
DCAB )(
1)( CAB
1)( CAB
-
8/2/2019 3. Boolean Algebra
30/80
30
Constructing a Truth Table
Inputs Output Inputs Output
A B C D F A B C D F
0 0 0 0 0 1 0 0 0 0
0 0 0 1 1 1 0 0 1 1
0 0 1 0 0 1 0 1 0 0
0 0 1 1 0 1 0 1 1 0
0 1 0 0 0 1 1 0 0 0
0 1 0 1 1 1 1 0 1 1
0 1 1 0 0 1 1 1 0 0
0 1 1 1 0 1 1 1 1 1
-
8/2/2019 3. Boolean Algebra
31/80
31
Simplification Using Boolean Algebra
Example 1:
-
8/2/2019 3. Boolean Algebra
32/80
Can the following expression be
Simplified???
AB + A(B+C) + B(B+C)
-
8/2/2019 3. Boolean Algebra
33/80
Simplification Using Boolean
Algebra
Why? Determines fewest gates to implement a logic
circuit
-
8/2/2019 3. Boolean Algebra
34/80
34
Simplification Using Boolean Algebra
AB + A(B+C) + B(B+C)
= AB + AB + AC + BB +BC, (AB+AB=AB, B.B=B)
= AB + AC + B + BC (C+1=1)
= AB + AC + B (A+1=1)
= B + AC
-
8/2/2019 3. Boolean Algebra
35/80
35
Simplification Using Boolean Algebra
Implementation with simplified expression
Equivalent circuit
Fewer gates
Reduced circuitry and interconnects
-
8/2/2019 3. Boolean Algebra
36/80
36
Simplification Using Boolean Algebra
Example 2:
BBA.
DC.
DCBA ...
A
.C.DB.ABA.
-
8/2/2019 3. Boolean Algebra
37/80
37
Simplification Using Boolean Algebra
Simplify using rules, laws and theorems
.C.DB.ABA. ).C.DB.A).(BA.(
.C.D)B.A).(BA(
.C.D)B.AB).(A(
.C.DB.B.A.C.D)B.A.A(
.C.DB.A
-
8/2/2019 3. Boolean Algebra
38/80
38
Simplification Using Boolean Algebra
Simplified equivalent circuit
.C.DB.A
-
8/2/2019 3. Boolean Algebra
39/80
39
Simplification Using Boolean Algebra
Example 3:
A
C
CBA ..
DC
D)C).(C.B.A(
-
8/2/2019 3. Boolean Algebra
40/80
40
Simplification Using Boolean Algebra
Simplify
)DC()C.B.A( D)C).(C.B.A(
)D.C()CBA(
)D(C.C)B(A
)DC(1BA
CBA
-
8/2/2019 3. Boolean Algebra
41/80
41
Simplification Using Boolean Algebra
Simplified equivalent circuit
CBA
-
8/2/2019 3. Boolean Algebra
42/80
42
Types of Boolean Expressions
Define Domain of an expression
set of all variables (complemented or otherwise)
Boolean expressions may be expressed as: Sum-of-Products (SOP) Form
Product-of-Sums (POS) Form
Each form may contain single variable terms
May contain complemented and un-complementedterms
A SOP and POS expression cant have a term of morethan one variable having an over bar extending over theentire term
-
8/2/2019 3. Boolean Algebra
43/80
Sum of Product (SOP) Form
-
8/2/2019 3. Boolean Algebra
44/80
44
Sum-of-Products (SOP) Form
Two or more product terms summed by
Boolean addition
Any expression -> SOP using Boolean algebra Examples:
* A + BC
* A (B + CD) = AB + ACDDCBAADDCADBADCB*
CBACBAABC*
-
8/2/2019 3. Boolean Algebra
45/80
45
Sum-of-Products (SOP) Form
BEFBCDAB)EFCD(BAB*
BDBCBADACAB)DCB)(BA(*
BADAC
CBCAC)BA(C)BA(C)BA(*
Conversion to SOP Form:
-
8/2/2019 3. Boolean Algebra
46/80
46
Implementation of SOP Expression
B+AC+AD
-
8/2/2019 3. Boolean Algebra
47/80
47
Standard SOP Form
SOP expressions containing all Variables in the
Domain in each term are in Standard Form.
Standard product terms (containing all Variables
in the Domain) are also called Minterms.
Any non-standard SOP expression may be
converted to Standard form by applying Boolean
Algebra Rule 6 to it.
Example:
)1AA(
CBACABCBA
)BB(CACBA
CACBA
-
8/2/2019 3. Boolean Algebra
48/80
48
Standard SOP Form
Example: Determine Standard SOP expression
CBACBACABABCCBA
)CBCBCBBC(ACBA)CC)(BB(ACBA
ACBA
SHORTCUT: Introduce all possible combinations of themissingvariablesANDed with theoriginal term
-
8/2/2019 3. Boolean Algebra
49/80
49
Standard SOP Form
Example: Determine Standard SOP expression
CBACBACABABCCBA
)CBCBCBBC(ACBA)CC)(BB(ACBA
ACBA
SHORTCUT: Introduce all possible combinations of themissingvariablesANDed with theoriginal term
-
8/2/2019 3. Boolean Algebra
50/80
50
Binary Representation of a SOP Term A standard product term is equal to 1 for only one
combination of variable values.
A standard SOP expression is equal to 1 if one or more of
the product terms in the expression is equal to 1. A standard SOP expression corresponds to the input
combination of the truth table for which the functionproduces a 1 output.
Example: determine binary values which make the
standard SOP expression equal to 1
111100111010
ABCDDCABDCBA
-
8/2/2019 3. Boolean Algebra
51/80
51
Binary Representation of a SOP Term A standard product term is equal to 1 for only one
combination of variable values.
A standard SOP expression is equal to 1 if one or more of
the product terms in the expression is equal to 1. A standard SOP expression corresponds to the input
combination of the truth table for which the functionproduces a 1 output.
Example: determine binary values which make the
standard SOP expression equal to 1
111100111010
ABCDDCABDCBA
-
8/2/2019 3. Boolean Algebra
52/80
Product-of-Sums (POS) Form
-
8/2/2019 3. Boolean Algebra
53/80
53
Product-of-Sums (POS) Form Two or more sum terms multiplied by Boolean
multiplication
Any expression -> POS using Boolean algebra Examples:
(A+B)(B+C)(A+B+C)
)ON)(ONL)(ML(
)ZYX)(ZY)(X(
)DCBD)(B(A)C(A
-
8/2/2019 3. Boolean Algebra
54/80
54
Product-of-Sums (POS) Form
)DCA(B)DC(BAB*
)DB)(CB(A)CDB(AACDAB*
C)BA(C)BA(C)BA(*
Conversion to POS Form:
-
8/2/2019 3. Boolean Algebra
55/80
55
Implementation of POS expression
(A+B)(B+C+D)(A+C)
-
8/2/2019 3. Boolean Algebra
56/80
56
Standard POS Form POS expressions containing all Variables in the
Domain in each term are in Standard Form.
Standard sum terms (containing all Variables in the
Domain) are also called Maxterms.
A Maxterm is a NOT Minterm. {A Maxterm is not aMinterm }
Any non-standard POS expression may be converted toStandard form by applying Boolean Algebra Rule 8
and Rule 12 {A+BC=(A+B)(A+C)} to it.}0.{ AA
-
8/2/2019 3. Boolean Algebra
57/80
57
Standard POS Form
Example:
{Rule 8}
{Rule 12}
)CBA)(CBA)(CBA(
)BCA)(BCA)(CBA(
)BBCA)(CBA()CA)(CBA(
SHORTCUT: Introduce all possible combinations of themissing variables ORed with the original term
-
8/2/2019 3. Boolean Algebra
58/80
58
Standard POS Form
Example:
{Rule 8}
{Rule 12}
)CBA)(CBA)(CBA(
)BCA)(BCA)(CBA(
)BBCA)(CBA()CA)(CBA(
SHORTCUT: Introduce all possible combinations of themissing variables ORed with the original term
-
8/2/2019 3. Boolean Algebra
59/80
59
Standard POS Form
Example:
{Rule 8}
{Rule 12}
)CBA)(CBA)(CBA(
)BCA)(BCA)(CBA(
)BBCA)(CBA()CA)(CBA(
SHORTCUT: Introduce all possible combinations of themissing variables ORed with the original term
-
8/2/2019 3. Boolean Algebra
60/80
60
Standard POS Form
Example:
{Rule 8}
{Rule 12}
)CBA)(CBA)(CBA(
)BCA)(BCA)(CBA(
)BBCA)(CBA()CA)(CBA(
SHORTCUT: Introduce all possible combinations of themissing variables ORed with the original term
-
8/2/2019 3. Boolean Algebra
61/80
61
Standard POS Form
Example:
{Rule 8}
{Rule 12}
)CBA)(CBA)(CBA(
)BCA)(BCA)(CBA(
)BBCA)(CBA()CA)(CBA(
SHORTCUT: Introduce all possible combinations of themissingvariablesORed with theoriginal term
-
8/2/2019 3. Boolean Algebra
62/80
62
Binary Representation of a POS Term
A standard sum term is equal to 0 for only onecombination of variable values.
A standard POS expression is equal to 0 if one or more ofthe product terms in the expression is equal to 0.
A standard POS expression corresponds to the inputcombination of the truth table for which the functionproduces a 0 output.
Example: determine binary values which make thestandard POS expression equal to 0
)1100()0101()0000(
)DCBA)(DCBA)(DCBA(
-
8/2/2019 3. Boolean Algebra
63/80
63
Binary Representation of a POS Term
A standard sum term is equal to 0 for only onecombination of variable values.
A standard POS expression is equal to 0 if one or more ofthe product terms in the expression is equal to 0.
A standard POS expression corresponds to the inputcombination of the truth table for which the functionproduces a 0 output.
Example: determine binary values which make thestandard POS expression equal to 0
)1100()0101()0000(
)DCBA)(DCBA)(DCBA(
-
8/2/2019 3. Boolean Algebra
64/80
64
Why Standard SOP and POS Forms?
Minimal Circuit implementation by switching
between Standard SOP or POS
Direct mapping of Standard Form expressions
and Truth Table entries.
Alternate Mapping methods for simplification
of expressions
PLD based function implementation
-
8/2/2019 3. Boolean Algebra
65/80
65
Converting Standard SOP to Standard POS
Determine binary representation for all
Standard Product terms
Form new set of binary numbers from full
domain which is not part of the above
Form Standard Sum terms for the new binary
set
-
8/2/2019 3. Boolean Algebra
66/80
66
Converting Standard SOP to Standard POS
Example of converting from standard SOP to
standard POS
ABCCBABCACBACBA
C)BAC)(BA)(CB(A
111101011010000 75320
110100001
-
8/2/2019 3. Boolean Algebra
67/80
67
Converting Standard SOP to Standard POS
Example of converting from standard SOP to
standard POS
ABCCBABCACBACBA
C)BAC)(BA)(CB(A
111101011010000 75320
110100001
-
8/2/2019 3. Boolean Algebra
68/80
68
Converting Standard SOP to Standard POS
Example of converting from standard SOP to
standard POS
ABCCBABCACBACBA
C)BAC)(BA)(CB(A
111101011010000 75320
110100001
-
8/2/2019 3. Boolean Algebra
69/80
69
Converting Standard SOP to Standard POS
Example of converting from standard SOP to
standard POS
ABCCBABCACBACBA
C)BAC)(BA)(CB(A
111101011010000 75320
110100001
-
8/2/2019 3. Boolean Algebra
70/80
70
Converting Standard SOP to Standard POS
Example of converting from standard SOP to
standard POS
ABCCBABCACBACBA
C)BAC)(BA)(CB(A
111101011010000 75320
110100001
-
8/2/2019 3. Boolean Algebra
71/80
71
Converting Standard POS to Standard SOP
Reverse previous procedure:
Determine binary representation for all
Standard Sum terms in POS
Form new set of binary numbers from full
domain which is not part of the above
Form Standard Product terms for the new
binary set in SOP form
-
8/2/2019 3. Boolean Algebra
72/80
-
8/2/2019 3. Boolean Algebra
73/80
73
Minterms, Maxterms, Binary Reps & TT
Minterms: Product terms in Standard SOP
form
Allow binary representation of Standard SOP product
terms in a truth table
Maxterms: Sum terms in Standard POS form
Allow binary representation of Standard POS sum terms
in a truth table
-
8/2/2019 3. Boolean Algebra
74/80
74
Minterms, Maxterms, Binary Reps & TT
CBA .. CBA
CBA .. CBA
CBA .. CBA
CBA .. CBA
CBA .. CBA
CBA .. CBA
CBA .. CBA
CBA .. CBA
A B CMin-
terms
Max-
terms
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
-
8/2/2019 3. Boolean Algebra
75/80
Minterms, Maxterms, Binary Reps & TT
CBA .. CBA
CBA .. CBA
CBA .. CBA
CBA .. CBA
CBA .. CBA
CBA .. CBA
CBA .. CBA
CBA .. CBA
A B CMin-
terms
Max-
terms
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
-
8/2/2019 3. Boolean Algebra
76/80
76
Converting SOP to TT Format
List all possible combinations of binary values forthe domain of the expression in TT format
Convert SOP expression to standard form
Place a 1 in the output column for each binaryvalue that makes the standard SOP a 1 and place a
0 for all remaining Minterms
Example next
-
8/2/2019 3. Boolean Algebra
77/80
77
Converting SOP to TT FormatBCAABCCBACBABCBA
Input Output
A B C F0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 1
-
8/2/2019 3. Boolean Algebra
78/80
78
Converting POS to TT Format
List all possible combinations of binary values forthe domain of the expression in TT format
Convert POS expression to standard form
Place a 0 in the output column for each binaryvalue that makes the standard POS a 0 and place a
1 for all remaining Maxterms
Example next
-
8/2/2019 3. Boolean Algebra
79/80
79
Converting POS to TT Format
)CB)(BA(
)CBA)(CBA)(CBA)(CBA(
Input Output
A B C F0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1
-
8/2/2019 3. Boolean Algebra
80/80
80
Determining Standard Expressions from TT
Determining Standard SOP Expression List each row in the Truth Table where the output is a 1 in Minterm
form
Sum all the standard SOP terms to get the Standard SOP expression
Example
Determining Standard POS Expression List each row in the Truth Table where the output is a 0 in Maxterm
form Sum all the standard POS terms to get the Standard POS expression
Example
DCBA1010
DCBA1001