You are on page 1of 80

Chapter# 2 Combinational Logic Circuits

Boolean Algebra

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 ()

Boolean Algebra
A branch of Algebra used for describing and designing 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 and analyzing logic circuit operations
Mathematics of digital systems

Used to define a digital circuit and evaluate its operation Used to simplify the logic circuits
4

Boolean Algebra Terms


Variable
a symbol used to represent a logical quantity A variable can have a 0 or 1 value Example: X A B

Complement
Inverse of a variable. Indicated by a bar over the variable Example: X

Literal
Instance of a variable or its complement

Boolean Addition
Boolean Addition performed by OR gate Sum Term is a sum of literals:

A B

A B

A BC

Sum term = 1 if any literal = 1 Sum term = 0 if all literals = 0 In logic circuits, a sum term is produced by an OR operation with no AND operations involved
6

Boolean Multiplication
Boolean Multiplication performed by AND gate Product Term is a product of literals:

A.B

A.B

A.B.C

Product term = 1 if all literals = 1 Product term = 0 if any one literal = 0 In logic circuits, a product term is produced by an AND operation with no OR operations involved

Precedence of Operators

Function Evaluation

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

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


11

Commutative Law
Commutative Law for Addition A+ B = B +A

Commutative Law for Multiplication A.B = B.A

12

Associative Law
Associative Law for Addition A + (B + C) = (A + B) + C

13

Associative Law
Associative Law for Multiplication A.(B.C) = (A.B).C

14

Distributive Law
A.(B + C) = A.B + A.C

15

Basic Identities of Boolean Addition


A0 A A 1 1 AA A A A 1 AA A B BA A (B C) ( A B) C A( B C) AB AC A B A.B A AB A A AB A B AB AC BC AB AC

( Identity) ( Idempotent ) (Complement ) ( Involution ) (Commutative) ( Associative) ( Distributive) ( DeMorgan ' sTheorem) ( Absorption ) (Simplification ) (ConsensusTheorem)
16

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 (+)

17

Basic Identities of Boolean Multiplication


X0 X X 1 1 XX X X X 1 XY YX X Y XY X XY X X XY X Y XY XZ YZ XY XZ
X.1 X X.0 0 X.X X X.X 0 X.Y Y.X X Y.Z (X Y).(X Z) X.Y X Y X.(X Y) X X.( X Y) X.Y (X Y)( X Z)(Y Z) (X Y).( X Z)
18

X(Y Z) XY XZ

Laws & Rules of Boolean Algebra (Floyds Summarized Version)


1. 2. 3. 4. 5. 6. A+ 0 =A A+ 1 = 1 A.0 = 0 A.1 = A A+A=A A+A = 1 7. A.A = A 8. A.A 0 9. A = A 10.A + A.B = A 11. A + A.B = A + B 12.(A+B).(A+C) = A+B.C
19

Derivation of Absorption
A AB A(1 B){DistributiveLaw} A.1{IdentityFor } A{IdentityFor.}
20

Derivation of Simplification
X XY X .(1 Y ) XY {Identity} X XY XY {Distribution} X ( X X )Y {Distribution} X Y {Complement; Identity}
21

Derivation of Consensus Theorem


XY XZ YZ XY XZ YZ ( X X ){Identity} XY XZ XYZ XYZ{Distribution} XY (1 Z ) XZ (1 Y ){Assoc; Dist} XY XZ{Rule2, Identity}
22

Veracity of DeMorgan's Theorems


First Theorem

A.B A B
A.B

A B

Second Theorem

A B A.B
A B

A.B
23

Application of DeMorgan's Theorems


Apply to any number of variables
X.Y.Z X Y Z X Y Z X.Y.Z

Apply to combination of variables


( A B.C).( A.C B) ( A B.C) ( A.C B)

A.(B.C) ( A.C).B A.(B C) ( A C).B

A.B A.C A.B B.C


A.B A.C B.C
24

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:

F X.Y X.Z Y.Z F ( X Y ).( X Z ).( Y Z ) F ( X.Y ).( X.Z).( Y.Z)


25

DeMorgans Theorem in circuit domain


Original circuit NAND equivalent circuit

26

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

AB C

( AB C)D

27

Boolean Analysis of Logic Circuits


Evaluating the expression
Evaluate the Boolean expression for all possible combinations of values for the input variables that make the expression equal to 1

Putting the results in truth table


List all combinations of input variables in a binary sequence 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
28

Constructing a Truth Table


AB C

( AB C)D

From the expression, the output is a 1 if variable D = 1 and ( AB C ) 1 ( AB C ) 1 if AB=1 or C=0 AB=1 if A=1 and B=1
29

Constructing a Truth Table


Inputs A 0 0 0 0 0 0 0 0 B 0 0 0 0 1 1 1 1 C 0 0 1 1 0 0 1 1 D 0 1 0 1 0 1 0 1 Output Inputs F 0 1 0 0 0 1 0 0 A 1 1 1 1 1 1 1 1 B 0 0 0 0 1 1 1 1 C 0 0 1 1 0 0 1 1 D 0 1 0 1 0 1 0 1 Output F 0 1 0 0 0 1 0 1
30

Simplification Using Boolean Algebra


Example 1:

31

Can the following expression be Simplified??? AB + A(B+C) + B(B+C)

Simplification Using Boolean Algebra


Why? Determines fewest gates to implement a logic circuit

Simplification Using Boolean Algebra


AB + A(B+C) + B(B+C) = AB + AB + AC + BB +BC, = AB + AC + B + BC = AB + AC + B = B + AC

(AB+AB=AB, B.B=B) (C+1=1) (A+1=1)

34

Simplification Using Boolean Algebra

Implementation with simplified expression


Equivalent circuit Fewer gates Reduced circuitry and interconnects

35

Simplification Using Boolean Algebra


Example 2:
A.B
B

A.B A.B.C.D
A

A.B.C.D
C.D

36

Simplification Using Boolean Algebra


Simplify using rules, laws and theorems
A.B A.B.C.D (A B).(A.B.C.D)
(A B).( A.B.C.D) (A.A.B.C.D) A.B.B.C.D
A.B.C.D
37

(A.B).(A.B.C.D )

Simplification Using Boolean Algebra


Simplified equivalent circuit

A.B.C.D

38

Simplification Using Boolean Algebra

Example 3:
A

A.B.C

(A.B.C).(C D)
CD

39

Simplification Using Boolean Algebra


Simplify
(A.B.C).(C D) (A.B.C) (C D) (A B C) (C.D)

(A B C) (C.D) A B C(1 D)

ABC
40

Simplification Using Boolean Algebra


Simplified equivalent circuit

A B C

41

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-complemented terms A SOP and POS expression cant have a term of more than one variable having an over bar extending over the entire term
42

Sum of Product (SOP) Form

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 + ACD
* BCD ABD ACD AD AB CD
* ABC AB C ABC
44

Sum-of-Products (SOP) Form


Conversion to SOP Form:
* AB B(CD EF) AB BCD BEF

* ( A B)(B C D) AB AC AD B BC BD
AC AD B
* (A B) C (A B)C (A B)C AC BC

45

Implementation of SOP Expression


B+AC+AD

46

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 (A A 1) to it. Example: ABC AC
ABC AC (B B) ABC ABC AB C
47

Standard SOP Form


Example: Determine Standard SOP expression

ABC A ABC A( B B)(C C ) ABC A( BC BC BC B C ) ABC ABC ABC ABC AB C


SHORTCUT: Introduce all possible combinations of the missing variables ANDed with the original term
48

Standard SOP Form


Example: Determine Standard SOP expression

ABC A ABC A( B B)(C C ) ABC A( BC BC BC B C ) ABC ABC ABC ABC AB C


SHORTCUT: Introduce all possible combinations of the missing variables ANDed with the original term
49

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 function produces a 1 output. Example: determine binary values which make the standard SOP expression equal to 1

AB C D ABC D ABCD 0 1 0 1 11 0 0 1111


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 function produces a 1 output. Example: determine binary values which make the standard SOP expression equal to 1

AB C D ABC D ABCD 0 1 0 1 11 0 0 1111


51

Product-of-Sums (POS) Form

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)

(A C ) (A B D)(B C D)
( L M)(L N O)( N O)
( X )(Y Z)(X Y Z)
53

Product-of-Sums (POS) Form


Conversion to POS Form:
* AB B(C D) B( A C D)

* AB ACD A (B CD ) A( B C)( B D)

* (A B) C (A B)C (A B)C

54

Implementation of POS expression


(A+B)(B+C+D)(A+C)

55

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 a Minterm } Any non-standard POS expression may be converted to Standard form by applying Boolean Algebra Rule 8 { A. A 0} and Rule 12 {A+BC=(A+B)(A+C)} to it.
56

Standard POS Form


Example:

( A B C )(A C ) (A B C )(A C BB) (A B C )(A C B)(A C B) (A B C )(A B C )(A B C )


SHORTCUT: Introduce all possible combinations of the missing variables ORed with the original term
57

{Rule 8} {Rule 12}

Standard POS Form


Example:

( A B C )(A C ) (A B C )(A C BB) (A B C )(A C B)(A C B) (A B C )(A B C )(A B C )


SHORTCUT: Introduce all possible combinations of the missing variables ORed with the original term
58

{Rule 8} {Rule 12}

Standard POS Form


Example:

( A B C )(A C ) (A B C )(A C BB) (A B C )(A C B)(A C B) (A B C )(A B C )(A B C )


SHORTCUT: Introduce all possible combinations of the missing variables ORed with the original term
59

{Rule 8} {Rule 12}

Standard POS Form


Example:

( A B C )(A C ) (A B C )(A C BB) (A B C )(A C B)(A C B) (A B C )(A B C )(A B C )


SHORTCUT: Introduce all possible combinations of the missing variables ORed with the original term
60

{Rule 8} {Rule 12}

Standard POS Form


Example:

( A B C )(A C ) (A B C )(A C BB) (A B C )(A C B)(A C B) (A B C )(A B C )(A B C )


SHORTCUT: Introduce all possible combinations of the missing variables ORed with the original term
61

{Rule 8} {Rule 12}

Binary Representation of a POS Term


A standard sum term is equal to 0 for only one combination of variable values. A standard POS expression is equal to 0 if one or more of the product terms in the expression is equal to 0. A standard POS expression corresponds to the input combination of the truth table for which the function produces a 0 output. Example: determine binary values which make the standard POS expression equal to 0

(A B C D)(A B C D)(A B C D ) (0000) ( 1 0 1 0) (00 1 1 )


62

Binary Representation of a POS Term


A standard sum term is equal to 0 for only one combination of variable values. A standard POS expression is equal to 0 if one or more of the product terms in the expression is equal to 0. A standard POS expression corresponds to the input combination of the truth table for which the function produces a 0 output. Example: determine binary values which make the standard POS expression equal to 0

(A B C D)(A B C D)(A B C D ) (0000) ( 1 0 1 0) (00 1 1 )


63

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

64

Converting Standard SOP to Standard POS Determine binary representation Standard Product terms for all

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
65

Converting Standard SOP to Standard POS


Example of converting from standard SOP to standard POS

ABC ABC ABC ABC ABC

000 010 011 101 111 0 2 3 5 7 001 100 110


(A B C)(A B C)(A B C)
66

Converting Standard SOP to Standard POS


Example of converting from standard SOP to standard POS

ABC ABC ABC ABC ABC

000 010 011 101 111 0 2 3 5 7 001 100 110


(A B C)(A B C)(A B C)
67

Converting Standard SOP to Standard POS


Example of converting from standard SOP to standard POS

ABC ABC ABC ABC ABC

000 010 011 101 111 0 2 3 5 7 001 100 110


(A B C)(A B C)(A B C)
68

Converting Standard SOP to Standard POS


Example of converting from standard SOP to standard POS

ABC ABC ABC ABC ABC

000 010 011 101 111 0 2 3 5 7 001 100 110


(A B C)(A B C)(A B C)
69

Converting Standard SOP to Standard POS


Example of converting from standard SOP to standard POS

ABC ABC ABC ABC ABC

000 010 011 101 111 0 2 3 5 7 001 100 110


(A B C)(A B C)(A B C)
70

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

71

Converting Standard POS to Standard SOP


Example of converting from standard POS to standard SOP

(A B C).(A B C).(A B C).(A B C)

000 0

.010 .101 .111 2 5 7 001 011 100 110

ABC ABC AB C ABC


72

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

73

Minterms, Maxterms, Binary Reps & TT


A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 Minterms
A.B.C A.B.C A.B.C A.B.C A.B.C

Maxterms
A B C

A B C A B C A B C A B C

A.B.C A B C A.B.C A B C
A.B.C A B C
74

Minterms, Maxterms, Binary Reps & TT


A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 Minterms
A.B.C A.B.C A.B.C A.B.C A.B.C

Maxterms
A B C

A B C A B C A B C A B C

A.B.C A B C A.B.C A B C
A.B.C A B C

Converting SOP to TT Format


List all possible combinations of binary values for the domain of the expression in TT format Convert SOP expression to standard form Place a 1 in the output column for each binary value that makes the standard SOP a 1 and place a 0 for all remaining Minterms Example next
76

Converting SOP to TT Format


AB BC ABC ABC ABC ABC
Input A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 Output F 0 0 0 1 1 1 0 1
77

Converting POS to TT Format


List all possible combinations of binary values for the domain of the expression in TT format Convert POS expression to standard form Place a 0 in the output column for each binary value that makes the standard POS a 0 and place a 1 for all remaining Maxterms Example next
78

Converting POS to TT Format


( A B)( B C)
( A B C)( A B C)( A B C)( A B C)
Input A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 Output F 1 0 0 0 1 0 1 1
79

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

1010 A B C D

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

1001 A B C D

80

You might also like