Boolean AlgebraBoolean Algebra
IntroductionIntroduction
 1854:1854: Logical algebraLogical algebra was published bywas published by GeorgeGeorge
BooleBoole  known today as “Boolean Algebra”known today as “Boolean Algebra”
 It’s a convenient way and systematic way ofIt’s a convenient way and systematic way of
expressing and analyzing the operation of logicexpressing and analyzing the operation of logic
circuits.circuits.
 1938:1938: Claude ShannonClaude Shannon was the first to applywas the first to apply
Boole’s work to the analysis and design of logicBoole’s work to the analysis and design of logic
circuits.circuits.
Boolean Operations & ExpressionsBoolean Operations & Expressions
 VariableVariable – a symbol used to represent a logical– a symbol used to represent a logical
quantity.quantity.
 ComplementComplement – the inverse of a variable and is– the inverse of a variable and is
indicated by a bar over the variable.indicated by a bar over the variable.
 LiteralLiteral – a variable or the complement of a– a variable or the complement of a
variable.variable.
Boolean AdditionBoolean Addition
 Boolean addition is equivalent to the OR operationBoolean addition is equivalent to the OR operation
 AA sum termsum term is produced by an OR operation with nois produced by an OR operation with no
AND ops involved.AND ops involved.
 i.e.i.e.
 AA sum termsum term is equal to 1 when one or more of the literals in theis equal to 1 when one or more of the literals in the
term are 1.term are 1.
 AA sum termsum term is equal to 0 only if each of the literals is 0.is equal to 0 only if each of the literals is 0.
0+0 = 0 0+1 = 1 1+0 = 1 1+1 = 1
DCBACBABABA +++++++ ,,,
Boolean MultiplicationBoolean Multiplication
 Boolean multiplication is equivalent to the ANDBoolean multiplication is equivalent to the AND
operationoperation
 AA product termproduct term is produced by an AND operation with nois produced by an AND operation with no
OR ops involved.OR ops involved.
 i.e.i.e.
 AA product termproduct term is equal to 1 only if each of the literals in theis equal to 1 only if each of the literals in the
term is 1.term is 1.
 AA product termproduct term is equal to 0 when one or more of the literals areis equal to 0 when one or more of the literals are
0.0.
0·0 = 0
DBCACABBAAB ,,,
0·1 = 0 1·0 = 0 1·1 = 1
Laws & Rules of Boolean AlgebraLaws & Rules of Boolean Algebra
 The basic laws of Boolean algebra:The basic laws of Boolean algebra:
 TheThe commutativecommutative lawslaws
 TheThe associativeassociative lawslaws
 TheThe distributivedistributive lawslaws
Commutative LawsCommutative Laws
 TheThe commutative law of additioncommutative law of addition for two variablesfor two variables
is written as:is written as: A+B = B+AA+B = B+A
 TheThe commutative law of multiplicationcommutative law of multiplication for twofor two
variables is written as:variables is written as: AB = BAAB = BA
A
B
A+B
B
A
B+A≡
A
B
AB
B
A
B+A≡
Associative LawsAssociative Laws
 TheThe associative law of additionassociative law of addition for 3 variables isfor 3 variables is
written as:written as: A+(B+C) = (A+B)+CA+(B+C) = (A+B)+C
 TheThe associative law of multiplicationassociative law of multiplication for 3 variables isfor 3 variables is
written as:written as: A(BC) = (AB)CA(BC) = (AB)C
A
B
A+(B+C)
C
A
B
(A+B)+C
C
A
B
A(BC)
C
A
B
(AB)C
C
≡
≡
B+C
A+B
BC
AB
Distributive LawsDistributive Laws
 TheThe distributive lawdistributive law is written for 3 variables as follows:is written for 3 variables as follows:
A(B+C) = AB + ACA(B+C) = AB + AC
B
C
A
B+C
≡
A
B
C
A
X
X
AB
AC
X=A(B+C) X=AB+AC
Rules of Boolean AlgebraRules of Boolean Algebra
1.6
.5
1.4
00.3
11.2
0.1
=+
=+
=•
=•
=+
=+
AA
AAA
AA
A
A
AA
BCACABA
BABAA
AABA
AA
AA
AAA
+=++
+=+
=+
=
=•
=•
))(.(12
.11
.10
.9
0.8
.7
___________________________________________________________
A, B, and C can represent a single variable or a combination of variables.
Useful laws and theoremsUseful laws and theorems
Identity:Identity: X + 0 = XX + 0 = X X • 1 = XX • 1 = X
Null:Null: X + 1 = 1X + 1 = 1 X • 0 = 0X • 0 = 0
Idempotent:Idempotent: X + X = XX + X = X X • X = XX • X = X
Involution:Involution: (X')' = X(X')' = X
Complementarity: X + X' = 1Complementarity: X + X' = 1 X • X' = 0X • X' = 0
Commutative:Commutative: X + Y = Y + XX + Y = Y + X X • Y = Y • XX • Y = Y • X
Associative:Associative: (X+Y)+Z=X+(Y+Z)(X+Y)+Z=X+(Y+Z) (X•Y)•Z=X•(Y•Z)(X•Y)•Z=X•(Y•Z)
Distributive:Distributive: X•(Y+Z)=(X•Y)+(X•Z) X+(Y•Z)=(X+Y)•(X+Z)X•(Y+Z)=(X•Y)+(X•Z) X+(Y•Z)=(X+Y)•(X+Z)
Absorption:Absorption: X+X•Y=XX+X•Y=X X•(X+Y)=XX•(X+Y)=X
Absorption (#2): (X+Y')•Y=X•YAbsorption (#2): (X+Y')•Y=X•Y (X•Y')+Y=X+Y(X•Y')+Y=X+Y
DeMorgan’s TheoremsDeMorgan’s Theorems
 DeMorgan’s theorems provide mathematicalDeMorgan’s theorems provide mathematical
verification of:verification of:
 the equivalency of the NAND and negative-ORthe equivalency of the NAND and negative-OR
gatesgates
 the equivalency of the NOR and negative-ANDthe equivalency of the NOR and negative-AND
gates.gates.
DeMorgan’s TheoremsDeMorgan’s Theorems
 The complement of two orThe complement of two or
more ANDed variables ismore ANDed variables is
equivalent to the OR of theequivalent to the OR of the
complements of thecomplements of the
individual variables.individual variables.
 The complement of two orThe complement of two or
more ORed variables ismore ORed variables is
equivalent to the AND of theequivalent to the AND of the
complements of thecomplements of the
individual variables.individual variables.
YXYX +=•
YXYX •=+
NAND Negative-OR
Negative-ANDNOR
DeMorgan’s Theorems (Exercises)DeMorgan’s Theorems (Exercises)
 Apply DeMorgan’s theorems to the expressions:Apply DeMorgan’s theorems to the expressions:
ZYXW
ZYX
ZYX
ZYX
•••
++
++
••
DeMorgan’s Theorems (Exercises)DeMorgan’s Theorems (Exercises)
 Apply DeMorgan’s theorems to the expressions:Apply DeMorgan’s theorems to the expressions:
)(
)(
FEDCBA
EFDCBA
DEFABC
DCBA
+++
++
+
++
Proving theoremsProving theorems
 Example 1: Prove the uniting theorem-- X•Y+X•Y'=XExample 1: Prove the uniting theorem-- X•Y+X•Y'=X
Distributive X•Y+X•Y' = X•(Y+Y')Distributive X•Y+X•Y' = X•(Y+Y')
ComplementarityComplementarity = X•(1)= X•(1)
IdentityIdentity = X= X
 Example 2: Prove the absorption theorem-- X+X•Y=XExample 2: Prove the absorption theorem-- X+X•Y=X
IdentityIdentity X+X•Y = (X•1)+(X•Y)X+X•Y = (X•1)+(X•Y)
DistributiveDistributive = X•(1+Y)= X•(1+Y)
NullNull = X•(1)= X•(1)
IdentityIdentity = X= X
de Morgan’s Theoremde Morgan’s Theorem
 Use de Morgan’s Theorem to find complementsUse de Morgan’s Theorem to find complements
 Example: F=(A+B)•(A’+C), so F’=(A’•B’)+(A•C’)Example: F=(A+B)•(A’+C), so F’=(A’•B’)+(A•C’)
A B C F
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 0
1 1 1 1
A B C F’
0 0 0 1
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 0
Example of logic simplificationExample of logic simplification
 Ex1: x+x’y = (x+x’) (x+y) distributiveEx1: x+x’y = (x+x’) (x+y) distributive
=1.(x+y) complementary=1.(x+y) complementary
=x+y=x+y
 Ex2: x(x’+y)= xx’+xy distributiveEx2: x(x’+y)= xx’+xy distributive
=0+xy complementary=0+xy complementary
=xy=xy
 Ex3: xy+x’z+yz=xy+x’z+yz(x+x’) complementaryEx3: xy+x’z+yz=xy+x’z+yz(x+x’) complementary
=xy+x’z+xyz+x’yz distributive=xy+x’z+xyz+x’yz distributive
=xy(1+z)+x’z(1+y)=xy(1+z)+x’z(1+y)
=xy+x’z Null=xy+x’z Null
One more example of logicOne more example of logic
simplificationsimplification
 Example:Example:
Z = A'BC + AB'C' + AB'C + ABC' + ABCZ = A'BC + AB'C' + AB'C + ABC' + ABC
= A'BC + AB'(C’ + C) + AB(C' + C)= A'BC + AB'(C’ + C) + AB(C' + C) distributivedistributive
= A'BC + AB’ + AB= A'BC + AB’ + AB complementarycomplementary
= A'BC + A(B' + B)= A'BC + A(B' + B) distributivedistributive
= A'BC= A'BC + A+ A complementarycomplementary
= BC + A= BC + A absorption #2 Dualityabsorption #2 Duality
(X(X ••Y')+Y=X+Y with X=BC and Y=AY')+Y=X+Y with X=BC and Y=A
Boolean Analysis of Logic CircuitsBoolean Analysis of Logic Circuits
 Boolean algebra provides a concise way toBoolean algebra provides a concise way to
express the operation of a logic circuit formedexpress the operation of a logic circuit formed
by a combination of logic gatesby a combination of logic gates
 so that the output can be determined for variousso that the output can be determined for various
combinations of input values.combinations of input values.
Boolean Expression for a Logic CircuitBoolean Expression for a Logic Circuit
 To derive the Boolean expression for a givenTo derive the Boolean expression for a given
logic circuit, begin at the left-most inputs andlogic circuit, begin at the left-most inputs and
work toward the final output, writing thework toward the final output, writing the
expression for each gate.expression for each gate.
C
D
B
A
CD
B+CD
A(B+CD)
Constructing a Truth Table for aConstructing a Truth Table for a
Logic CircuitLogic Circuit
 Once the Boolean expression for a given logicOnce the Boolean expression for a given logic
circuit has been determined, a truth table thatcircuit has been determined, a truth table that
shows the output for all possible values of theshows the output for all possible values of the
input variables can be developed.input variables can be developed.
 Let’s take the previous circuit as the example:Let’s take the previous circuit as the example:
A(B+CD)A(B+CD)
 There are four variables, hence 16 (2There are four variables, hence 16 (244
) combinations) combinations
of values are possible.of values are possible.
Constructing a Truth Table for aConstructing a Truth Table for a
Logic CircuitLogic Circuit
INPUTSINPUTS OUTPUTOUTPUT
AA BB CC DD A(B+CD)A(B+CD)
00 00 00 00 00
00 00 00 11 00
00 00 11 00 00
00 00 11 11 00
00 11 00 00 00
00 11 00 11 00
00 11 11 00 00
00 11 11 11 00
11 00 00 00 00
11 00 00 11 00
11 00 11 00 00
11 00 11 11 11
11 11 00 00 11
11 11 00 11 11
11 11 11 00 11
11 11 11 11 11
Boolean ExpressionBoolean Expression
 Any logic circuit, no matter how complex, can be completelyAny logic circuit, no matter how complex, can be completely
described using the three basic Boolean operations: OR, AND,described using the three basic Boolean operations: OR, AND,
NOT.NOT.
 Example: logic circuit with its Boolean expressionExample: logic circuit with its Boolean expression
ParenthesesParentheses
(Often needed to establish precedence;(Often needed to establish precedence;
sometimes used optionally for clarity)sometimes used optionally for clarity)
 How to interpret AHow to interpret A••B+C?B+C?
 Is it AIs it A••B ORed with C ?B ORed with C ?
 Is it A ANDed with B+C ?Is it A ANDed with B+C ?
 Order of precedence for Boolean algebra: AND before OR. Parentheses make the expressionOrder of precedence for Boolean algebra: AND before OR. Parentheses make the expression
clearer, but they are not needed for the case on the preceding slide.clearer, but they are not needed for the case on the preceding slide.
 Note that parentheses are needed here :Note that parentheses are needed here :
Circuits Contains INVERTERsCircuits Contains INVERTERs
 Whenever an INVERTER is present in a logic-circuit diagram, its outputWhenever an INVERTER is present in a logic-circuit diagram, its output
expression is simply equal to the input expression with a bar over itexpression is simply equal to the input expression with a bar over it..
More ExamplesMore Examples
PrecedencePrecedence
 First, perform all inversions of single termsFirst, perform all inversions of single terms
 Perform all operations with parethesesPerform all operations with paretheses
 Perform an AND operation before an ORPerform an AND operation before an OR
operation unless parentheses indicate otherwiseoperation unless parentheses indicate otherwise
 If an expression has a bar over it, perform theIf an expression has a bar over it, perform the
operations inside the expression first and thenoperations inside the expression first and then
invert the resultinvert the result
Determining output level from aDetermining output level from a
diagramdiagram
H.W: Determine the output for the condition where all inputs are
LOW.
Implementing Circuits FromImplementing Circuits From
Boolean ExpressionsBoolean Expressions
 When the operation of a circuit is defined by a BooleanWhen the operation of a circuit is defined by a Boolean
expression, we can draw a logic-circuit diagram directly from thatexpression, we can draw a logic-circuit diagram directly from that
expression.expression.
ExampleExample
 Draw the circuit diagram to implement theDraw the circuit diagram to implement the
expressionexpression
))(( CBBAx ++=
Review QuestionReview Question
 Draw the circuit diagram that implements theDraw the circuit diagram that implements the
expressionexpression
Using gates having no more than three inputs.Using gates having no more than three inputs.
)( DABCAx +=
NOR GATES AND NANDNOR GATES AND NAND
GATESGATES
 NOR Symbol, Equivalent Circuit, Truth TableNOR Symbol, Equivalent Circuit, Truth Table
ExampleExample
ExampleExample
 Determine the Boolean expression for a three-Determine the Boolean expression for a three-
input NOR gate followed by an INVERTERinput NOR gate followed by an INVERTER
NAND GateNAND Gate
 Symbol, Equivalent circuit, truth tableSymbol, Equivalent circuit, truth table
ExampleExample
ExampleExample
 Implement the logic circuit that has the expressionImplement the logic circuit that has the expression using only NOR and NANDusing only NOR and NAND
gatesgates
( )DCABx +⋅=
( )DCABx +⋅=
ExampleExample
 Determine the output level in last example forDetermine the output level in last example for
A=B=C=1 and D=0A=B=C=1 and D=0
Review QuestionsReview Questions
 What is the only set of input conditions that willWhat is the only set of input conditions that will
produce a HIGH output from a three-inputproduce a HIGH output from a three-input
NOR gate?NOR gate?
 Determine the output level in last example forDetermine the output level in last example for
A=B=1, C=D=0A=B=1, C=D=0
 Change the NOR gate at last example to aChange the NOR gate at last example to a
NAND gate, and change the NAND to a NOR.NAND gate, and change the NAND to a NOR.
What is the new expression for x?What is the new expression for x?
Canonical and Standard FormsCanonical and Standard Forms
Minterms Maxterms
Canonical and Standard FormsCanonical and Standard Forms
Canonical and Standard FormsCanonical and Standard Forms
 Sum of Minterms F= ∑(1,4,5,6,7)Sum of Minterms F= ∑(1,4,5,6,7)
 Product of Maxterms F= ∏(0,2,4,5)Product of Maxterms F= ∏(0,2,4,5)
Thank You…Thank You…

Boolean Algebra DLD

  • 1.
  • 2.
    IntroductionIntroduction  1854:1854: LogicalalgebraLogical algebra was published bywas published by GeorgeGeorge BooleBoole  known today as “Boolean Algebra”known today as “Boolean Algebra”  It’s a convenient way and systematic way ofIt’s a convenient way and systematic way of expressing and analyzing the operation of logicexpressing and analyzing the operation of logic circuits.circuits.  1938:1938: Claude ShannonClaude Shannon was the first to applywas the first to apply Boole’s work to the analysis and design of logicBoole’s work to the analysis and design of logic circuits.circuits.
  • 3.
    Boolean Operations &ExpressionsBoolean Operations & Expressions  VariableVariable – a symbol used to represent a logical– a symbol used to represent a logical quantity.quantity.  ComplementComplement – the inverse of a variable and is– the inverse of a variable and is indicated by a bar over the variable.indicated by a bar over the variable.  LiteralLiteral – a variable or the complement of a– a variable or the complement of a variable.variable.
  • 4.
    Boolean AdditionBoolean Addition Boolean addition is equivalent to the OR operationBoolean addition is equivalent to the OR operation  AA sum termsum term is produced by an OR operation with nois produced by an OR operation with no AND ops involved.AND ops involved.  i.e.i.e.  AA sum termsum term is equal to 1 when one or more of the literals in theis equal to 1 when one or more of the literals in the term are 1.term are 1.  AA sum termsum term is equal to 0 only if each of the literals is 0.is equal to 0 only if each of the literals is 0. 0+0 = 0 0+1 = 1 1+0 = 1 1+1 = 1 DCBACBABABA +++++++ ,,,
  • 5.
    Boolean MultiplicationBoolean Multiplication Boolean multiplication is equivalent to the ANDBoolean multiplication is equivalent to the AND operationoperation  AA product termproduct term is produced by an AND operation with nois produced by an AND operation with no OR ops involved.OR ops involved.  i.e.i.e.  AA product termproduct term is equal to 1 only if each of the literals in theis equal to 1 only if each of the literals in the term is 1.term is 1.  AA product termproduct term is equal to 0 when one or more of the literals areis equal to 0 when one or more of the literals are 0.0. 0·0 = 0 DBCACABBAAB ,,, 0·1 = 0 1·0 = 0 1·1 = 1
  • 6.
    Laws & Rulesof Boolean AlgebraLaws & Rules of Boolean Algebra  The basic laws of Boolean algebra:The basic laws of Boolean algebra:  TheThe commutativecommutative lawslaws  TheThe associativeassociative lawslaws  TheThe distributivedistributive lawslaws
  • 7.
    Commutative LawsCommutative Laws TheThe commutative law of additioncommutative law of addition for two variablesfor two variables is written as:is written as: A+B = B+AA+B = B+A  TheThe commutative law of multiplicationcommutative law of multiplication for twofor two variables is written as:variables is written as: AB = BAAB = BA A B A+B B A B+A≡ A B AB B A B+A≡
  • 8.
    Associative LawsAssociative Laws TheThe associative law of additionassociative law of addition for 3 variables isfor 3 variables is written as:written as: A+(B+C) = (A+B)+CA+(B+C) = (A+B)+C  TheThe associative law of multiplicationassociative law of multiplication for 3 variables isfor 3 variables is written as:written as: A(BC) = (AB)CA(BC) = (AB)C A B A+(B+C) C A B (A+B)+C C A B A(BC) C A B (AB)C C ≡ ≡ B+C A+B BC AB
  • 9.
    Distributive LawsDistributive Laws TheThe distributive lawdistributive law is written for 3 variables as follows:is written for 3 variables as follows: A(B+C) = AB + ACA(B+C) = AB + AC B C A B+C ≡ A B C A X X AB AC X=A(B+C) X=AB+AC
  • 10.
    Rules of BooleanAlgebraRules of Boolean Algebra 1.6 .5 1.4 00.3 11.2 0.1 =+ =+ =• =• =+ =+ AA AAA AA A A AA BCACABA BABAA AABA AA AA AAA +=++ +=+ =+ = =• =• ))(.(12 .11 .10 .9 0.8 .7 ___________________________________________________________ A, B, and C can represent a single variable or a combination of variables.
  • 11.
    Useful laws andtheoremsUseful laws and theorems Identity:Identity: X + 0 = XX + 0 = X X • 1 = XX • 1 = X Null:Null: X + 1 = 1X + 1 = 1 X • 0 = 0X • 0 = 0 Idempotent:Idempotent: X + X = XX + X = X X • X = XX • X = X Involution:Involution: (X')' = X(X')' = X Complementarity: X + X' = 1Complementarity: X + X' = 1 X • X' = 0X • X' = 0 Commutative:Commutative: X + Y = Y + XX + Y = Y + X X • Y = Y • XX • Y = Y • X Associative:Associative: (X+Y)+Z=X+(Y+Z)(X+Y)+Z=X+(Y+Z) (X•Y)•Z=X•(Y•Z)(X•Y)•Z=X•(Y•Z) Distributive:Distributive: X•(Y+Z)=(X•Y)+(X•Z) X+(Y•Z)=(X+Y)•(X+Z)X•(Y+Z)=(X•Y)+(X•Z) X+(Y•Z)=(X+Y)•(X+Z) Absorption:Absorption: X+X•Y=XX+X•Y=X X•(X+Y)=XX•(X+Y)=X Absorption (#2): (X+Y')•Y=X•YAbsorption (#2): (X+Y')•Y=X•Y (X•Y')+Y=X+Y(X•Y')+Y=X+Y
  • 12.
    DeMorgan’s TheoremsDeMorgan’s Theorems DeMorgan’s theorems provide mathematicalDeMorgan’s theorems provide mathematical verification of:verification of:  the equivalency of the NAND and negative-ORthe equivalency of the NAND and negative-OR gatesgates  the equivalency of the NOR and negative-ANDthe equivalency of the NOR and negative-AND gates.gates.
  • 13.
    DeMorgan’s TheoremsDeMorgan’s Theorems The complement of two orThe complement of two or more ANDed variables ismore ANDed variables is equivalent to the OR of theequivalent to the OR of the complements of thecomplements of the individual variables.individual variables.  The complement of two orThe complement of two or more ORed variables ismore ORed variables is equivalent to the AND of theequivalent to the AND of the complements of thecomplements of the individual variables.individual variables. YXYX +=• YXYX •=+ NAND Negative-OR Negative-ANDNOR
  • 14.
    DeMorgan’s Theorems (Exercises)DeMorgan’sTheorems (Exercises)  Apply DeMorgan’s theorems to the expressions:Apply DeMorgan’s theorems to the expressions: ZYXW ZYX ZYX ZYX ••• ++ ++ ••
  • 15.
    DeMorgan’s Theorems (Exercises)DeMorgan’sTheorems (Exercises)  Apply DeMorgan’s theorems to the expressions:Apply DeMorgan’s theorems to the expressions: )( )( FEDCBA EFDCBA DEFABC DCBA +++ ++ + ++
  • 16.
    Proving theoremsProving theorems Example 1: Prove the uniting theorem-- X•Y+X•Y'=XExample 1: Prove the uniting theorem-- X•Y+X•Y'=X Distributive X•Y+X•Y' = X•(Y+Y')Distributive X•Y+X•Y' = X•(Y+Y') ComplementarityComplementarity = X•(1)= X•(1) IdentityIdentity = X= X  Example 2: Prove the absorption theorem-- X+X•Y=XExample 2: Prove the absorption theorem-- X+X•Y=X IdentityIdentity X+X•Y = (X•1)+(X•Y)X+X•Y = (X•1)+(X•Y) DistributiveDistributive = X•(1+Y)= X•(1+Y) NullNull = X•(1)= X•(1) IdentityIdentity = X= X
  • 17.
    de Morgan’s TheoremdeMorgan’s Theorem  Use de Morgan’s Theorem to find complementsUse de Morgan’s Theorem to find complements  Example: F=(A+B)•(A’+C), so F’=(A’•B’)+(A•C’)Example: F=(A+B)•(A’+C), so F’=(A’•B’)+(A•C’) A B C F 0 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 1 A B C F’ 0 0 0 1 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 1 1 1 1 0
  • 18.
    Example of logicsimplificationExample of logic simplification  Ex1: x+x’y = (x+x’) (x+y) distributiveEx1: x+x’y = (x+x’) (x+y) distributive =1.(x+y) complementary=1.(x+y) complementary =x+y=x+y  Ex2: x(x’+y)= xx’+xy distributiveEx2: x(x’+y)= xx’+xy distributive =0+xy complementary=0+xy complementary =xy=xy  Ex3: xy+x’z+yz=xy+x’z+yz(x+x’) complementaryEx3: xy+x’z+yz=xy+x’z+yz(x+x’) complementary =xy+x’z+xyz+x’yz distributive=xy+x’z+xyz+x’yz distributive =xy(1+z)+x’z(1+y)=xy(1+z)+x’z(1+y) =xy+x’z Null=xy+x’z Null
  • 19.
    One more exampleof logicOne more example of logic simplificationsimplification  Example:Example: Z = A'BC + AB'C' + AB'C + ABC' + ABCZ = A'BC + AB'C' + AB'C + ABC' + ABC = A'BC + AB'(C’ + C) + AB(C' + C)= A'BC + AB'(C’ + C) + AB(C' + C) distributivedistributive = A'BC + AB’ + AB= A'BC + AB’ + AB complementarycomplementary = A'BC + A(B' + B)= A'BC + A(B' + B) distributivedistributive = A'BC= A'BC + A+ A complementarycomplementary = BC + A= BC + A absorption #2 Dualityabsorption #2 Duality (X(X ••Y')+Y=X+Y with X=BC and Y=AY')+Y=X+Y with X=BC and Y=A
  • 20.
    Boolean Analysis ofLogic CircuitsBoolean Analysis of Logic Circuits  Boolean algebra provides a concise way toBoolean algebra provides a concise way to express the operation of a logic circuit formedexpress the operation of a logic circuit formed by a combination of logic gatesby a combination of logic gates  so that the output can be determined for variousso that the output can be determined for various combinations of input values.combinations of input values.
  • 21.
    Boolean Expression fora Logic CircuitBoolean Expression for a Logic Circuit  To derive the Boolean expression for a givenTo derive the Boolean expression for a given logic circuit, begin at the left-most inputs andlogic circuit, begin at the left-most inputs and work toward the final output, writing thework toward the final output, writing the expression for each gate.expression for each gate. C D B A CD B+CD A(B+CD)
  • 22.
    Constructing a TruthTable for aConstructing a Truth Table for a Logic CircuitLogic Circuit  Once the Boolean expression for a given logicOnce the Boolean expression for a given logic circuit has been determined, a truth table thatcircuit has been determined, a truth table that shows the output for all possible values of theshows the output for all possible values of the input variables can be developed.input variables can be developed.  Let’s take the previous circuit as the example:Let’s take the previous circuit as the example: A(B+CD)A(B+CD)  There are four variables, hence 16 (2There are four variables, hence 16 (244 ) combinations) combinations of values are possible.of values are possible.
  • 23.
    Constructing a TruthTable for aConstructing a Truth Table for a Logic CircuitLogic Circuit INPUTSINPUTS OUTPUTOUTPUT AA BB CC DD A(B+CD)A(B+CD) 00 00 00 00 00 00 00 00 11 00 00 00 11 00 00 00 00 11 11 00 00 11 00 00 00 00 11 00 11 00 00 11 11 00 00 00 11 11 11 00 11 00 00 00 00 11 00 00 11 00 11 00 11 00 00 11 00 11 11 11 11 11 00 00 11 11 11 00 11 11 11 11 11 00 11 11 11 11 11 11
  • 24.
    Boolean ExpressionBoolean Expression Any logic circuit, no matter how complex, can be completelyAny logic circuit, no matter how complex, can be completely described using the three basic Boolean operations: OR, AND,described using the three basic Boolean operations: OR, AND, NOT.NOT.  Example: logic circuit with its Boolean expressionExample: logic circuit with its Boolean expression
  • 25.
    ParenthesesParentheses (Often needed toestablish precedence;(Often needed to establish precedence; sometimes used optionally for clarity)sometimes used optionally for clarity)  How to interpret AHow to interpret A••B+C?B+C?  Is it AIs it A••B ORed with C ?B ORed with C ?  Is it A ANDed with B+C ?Is it A ANDed with B+C ?  Order of precedence for Boolean algebra: AND before OR. Parentheses make the expressionOrder of precedence for Boolean algebra: AND before OR. Parentheses make the expression clearer, but they are not needed for the case on the preceding slide.clearer, but they are not needed for the case on the preceding slide.  Note that parentheses are needed here :Note that parentheses are needed here :
  • 26.
    Circuits Contains INVERTERsCircuitsContains INVERTERs  Whenever an INVERTER is present in a logic-circuit diagram, its outputWhenever an INVERTER is present in a logic-circuit diagram, its output expression is simply equal to the input expression with a bar over itexpression is simply equal to the input expression with a bar over it..
  • 27.
  • 28.
    PrecedencePrecedence  First, performall inversions of single termsFirst, perform all inversions of single terms  Perform all operations with parethesesPerform all operations with paretheses  Perform an AND operation before an ORPerform an AND operation before an OR operation unless parentheses indicate otherwiseoperation unless parentheses indicate otherwise  If an expression has a bar over it, perform theIf an expression has a bar over it, perform the operations inside the expression first and thenoperations inside the expression first and then invert the resultinvert the result
  • 29.
    Determining output levelfrom aDetermining output level from a diagramdiagram H.W: Determine the output for the condition where all inputs are LOW.
  • 30.
    Implementing Circuits FromImplementingCircuits From Boolean ExpressionsBoolean Expressions  When the operation of a circuit is defined by a BooleanWhen the operation of a circuit is defined by a Boolean expression, we can draw a logic-circuit diagram directly from thatexpression, we can draw a logic-circuit diagram directly from that expression.expression.
  • 31.
    ExampleExample  Draw thecircuit diagram to implement theDraw the circuit diagram to implement the expressionexpression ))(( CBBAx ++=
  • 32.
    Review QuestionReview Question Draw the circuit diagram that implements theDraw the circuit diagram that implements the expressionexpression Using gates having no more than three inputs.Using gates having no more than three inputs. )( DABCAx +=
  • 33.
    NOR GATES ANDNANDNOR GATES AND NAND GATESGATES  NOR Symbol, Equivalent Circuit, Truth TableNOR Symbol, Equivalent Circuit, Truth Table
  • 34.
  • 35.
    ExampleExample  Determine theBoolean expression for a three-Determine the Boolean expression for a three- input NOR gate followed by an INVERTERinput NOR gate followed by an INVERTER
  • 36.
    NAND GateNAND Gate Symbol, Equivalent circuit, truth tableSymbol, Equivalent circuit, truth table
  • 37.
  • 38.
    ExampleExample  Implement thelogic circuit that has the expressionImplement the logic circuit that has the expression using only NOR and NANDusing only NOR and NAND gatesgates ( )DCABx +⋅= ( )DCABx +⋅=
  • 39.
    ExampleExample  Determine theoutput level in last example forDetermine the output level in last example for A=B=C=1 and D=0A=B=C=1 and D=0
  • 40.
    Review QuestionsReview Questions What is the only set of input conditions that willWhat is the only set of input conditions that will produce a HIGH output from a three-inputproduce a HIGH output from a three-input NOR gate?NOR gate?  Determine the output level in last example forDetermine the output level in last example for A=B=1, C=D=0A=B=1, C=D=0  Change the NOR gate at last example to aChange the NOR gate at last example to a NAND gate, and change the NAND to a NOR.NAND gate, and change the NAND to a NOR. What is the new expression for x?What is the new expression for x?
  • 41.
    Canonical and StandardFormsCanonical and Standard Forms Minterms Maxterms
  • 42.
    Canonical and StandardFormsCanonical and Standard Forms
  • 43.
    Canonical and StandardFormsCanonical and Standard Forms  Sum of Minterms F= ∑(1,4,5,6,7)Sum of Minterms F= ∑(1,4,5,6,7)  Product of Maxterms F= ∏(0,2,4,5)Product of Maxterms F= ∏(0,2,4,5)
  • 44.