Cha 4

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 91

UNIVERSITY OF GONDAR

INSTITUTE OF TECHNOLOGY
Department of Electrical and Computer Engineering
COURSE NAME: DIGITAL LOGIC DESIGN
COURSE CODE: ECEG3141
COURSE INSTRUCTOR: AMARE WORKU
CONTACT INFORMATION:
EMAIL: amareworku2154@gmail.com
CONSULTATION HOURS:
FRIDAY: FROM 8:00-11:00
CHAPTER FOUR
Boolean algebra and Logic simplification

 Boolean operation and expression

 Laws and rules of Boolean algebra

 De 'Morgan Theorems

 Boolean analysis of logic circuit

 The K-map
Introduction

 Developed by English Mathematician George Boole in


between 1815 - 1864.
 It is described as an algebra of logic or an algebra of two
values i.e. True or False.
 The term logic means a statement having binary decisions i.e.
True/Yes or False/No.
DESCRIBING LOGIC CIRCUITS ALGEBRAICALLY
Operator precedence

Y = A . B+C
1. parentheses
2.AND
3.OR
Boolean operations and expressions

 Variable is a symbol used to represent a quantity.


 Any single quantity can have a value of either 0 or 1.
 Complement is the inverse of a variable and indicated by a bar over the
variable.
 Literal is a variable or complement of the variable.
 Boolean addition is the same as OR operation.
 InBoolean algebra, sum term is sum of literals, where no AND
operation is involved.
Cont.….

 Boolean multiplication is the same as AND operation.


 In Boolean algebra, product term is product of literals, where no OR operation is
involved.
 example
Truth Table

 Truth table is a table that contains all possible values of logical


variables/statements in a Boolean expression.

 No. of possible combination = 2n,


 where n=number of variables used in a Boolean expression.
Tautology & Fallacy

 If the output of Boolean expression is always True or 1 is called Tautology.


 If the output of Boolean expression is always False or 0 is called Fallacy.

P P output (P+P) output(P.P)


0 1 1 0
1 0 1 0

 P+P is Tautology and P.P is Fallacy


Logic Gate

 A gate
is an digital circuit which operates on one or more signals and
produce single output.
 Gatesare digital circuits because the input and output signals are
denoted by either 1(high voltage) or 0(low voltage).
 There are three type of basic gates are as under:
1. AND gate
2. OR gate
3. NOT gate
Principal of Duality

 In Boolean algebras the duality Principle is obtained by


interchanging AND and OR operators and replacing 0's by
1's and 1's by 0's. Compare the identities on the left side
with the identities on the right.
 Example
A+1 = 1 then A.0 = 0
Basic Laws and rules of Boolean Algebra
Basic Laws of Boolean Algebra

 L1 : Commutative Law
(a) A + B = B + A
(b) A.B = B.A
 L2 : Associate Law
(a) (A + B) + C = A + (B + C)
(b) (A.B).C = A.(B.C)
 L3 : Distributive Law
(a) A.(B + C) = A.B + A.C
(b) (A + B).(A + C) = A + (B.C)
Rules of Boolean Algebra

 R1 : Properties of 0 R4 : Absorption (Redundancy) Law


(a) 0 + A = A a) A + A B = A
(b) 0.A = 0 b) A.(A + B) = A
 R2 : Properties of 1 c) A+A .B = A+B
R5 : Complementary rule
(a) 1+A=1 (a) A + A = 1
(b) 1.A = A (b) A . A = 0
 R3 : (Identity ) Law R6 : Involution
 (a) A+A=A
(b) A.A = A (a) A = A
Proof that

 A. A+AB=A
A(1+B)
A.1
A=A
 B. A+A’B= A+B
CONT…..

 C. (A+B)(A+C)=A+BC
De Morgan's Theorem

 1’st theorem of De Morgan’s theorem is :-


Complement of sum of variables is equal to the product of complement of each
variables, i.e.:
(A + B) = A. B
The complement of two or more ORed variables is equivalent of the AND of the
complements of individual variables.
Cont.….

 The second law of De Morgan's law is


 Complement of product of variables is equal to the sum of complement
of each variables, i.e.:
(A. B) = A + B
The complement of two or more ANDed variables is equivalent of the OR
of the complements of individual variables
De Morgan's Law verified by using truth
table and algebraically
Apply DE Morgan's theorem to simplify the following:

 Example :
A. XYZ
B. X+Y+Z
C. X+Y+Z
D. XYZ
E.
Boolean analysis of logic circuits

 Logic circuit can be described by Boolean equation


 Logic circuit can be described by truth table
 Example
Cont.…..
 Evaluating the expression:
 First determine the values of variables that can make the expression 1. To
do this remember Boolean addition and multiplication rules.
 A(B+CD) equals 1 iff A=1 and (B+CD) = 1.
 (B+CD)=1 when:

 The term CD=1 iff C=1 and D=1.


Putting the results in truth table format:
Simplification using Boolean algebra

 Minimization of Boolean expression is needed to simplify the Boolean expression


and thus reduce the circuitry complexity as it uses less number of gates to
produce same output that can by taken by long canonical expression.

 Example: Using Boolean algebra techniques, simplify + A(B + C) + B(B + C)


and draw the logic circuit for the original expression and simplified expression.
What did you conclude?
Cont.….
Standard forms of Boolean expression

 Boolean expression can be represented by either


 Sum of Product( SOP) form or
 Product of Sum (POS form)
 The Sum of Product( SOP) form : consists of two or more product terms that are
summed by Boolean addition. Recall that a product term is a term consisting of the
product of literals. E.g.:

 SOP expression can be implemented by one OR gate and two or more ANDs.
Cont.….

 In SOP expression, an over bar can not extend more than one variable. But more than one variable can have an
over bar.
 SOP expression can be implemented by using AND/OR gates or equivalently NAND/NOR gates. E.g.:
Cont.….
Conversion of general expression to SOP form

 Example
 A(B + CD) = AB + ACD .. Apply distributive law
Standard SOP form

 In standard SOP each term of Boolean expression must contain all the
literals (with and without bar) that has been used in Boolean
expression.
 If the above condition is satisfied by the Boolean expression, that
expression is called Standard/Canonical form of Boolean expression.
 For instance, in Boolean expression AB+AC the literal C is missing in
the 1st term AB and B is missing in 2nd term AC. So AB+AC is not a
Standard/Canonical SOP.
Converting product terms to standard SOP

1. Multiply each nonstandard product term by a term made up of the sum of a


missing variable and its complement. This results in two product terms.
2. Repeat step 1 until all resulting product terms contain all variables in the domain
in either complemented or uncomplemented form. In converting a product term
to standard form, the number of product terms is doubled for each missing
variable.
E.g:
Cont.….
The Product of sum( POS) form

 The Product of sum( POS) form : consists of two or more sum terms that are
multiplied by Boolean multiplication. Recall that a sum term is a term
consisting of the sum of literals. E.g.:

 POS expression can be implemented by one AND gate and two or more ORs.
Converting a sum term to standard POS
Converting standard SOP to standard POS

using similar step you can goes from POS to SOP


Example
Converting SOP expressions to truth table format

 Recall SOP expression is equal to one iff at least one of the product
terms is 1.
 To convert SOP to truth table; first list all possible combinations of
input variables in the expression.
 Then convert the SOP expression in its standard form if it is not.
 Finally,place 1 in the output column for each binary value that makes
the standard SOP expression 1 and place a 0 for remaining binary
values.
Example

solution:
Converting POS expressions to truth table format

 Recall POS expression is equal to 0 iff at least one of the sum terms is
0.
 To convert POS to truth table; first list all possible combinations of
input variables in the expression.
 Then convert the POS expression in its standard form if it is not.
 Finally,place 0 in the output column for each binary value that makes
the standard POS expression 0 and place a 1 for remaining binary
values.
Con…

Solution:
Determining standard expressions from truth table

 To determine the standard SOP expression represented by truth table,


list the binary values of input variables for which the output is one.
 Convert each binary value to corresponding product term by replacing
each 1 with the corresponding variable and each 0 with the
corresponding variable complement. E.g. 1010 is the binary value. Its
product term will be ABCD.
 When substituted, the product term is 1. i.e. 1.0.1.0 = 1.
Cont.….

 To determine the standard POS expression represented by truth table,


list the binary values of input variables for which the output is zero.
 Convert each binary value to corresponding product term by replacing
each 1 with the corresponding variable complement and each 0 with
the corresponding variable. E.g. 1001 is the binary value. Its sum term
will be
A + B + C + D.
 When substituted, the product term is 0. i.e. 1 + 0 +0 + 1 = 0.
For the following truth table, determine the standard SOP and
equivalent POS expression.
Cont.….
Canonical form of Boolean Expression (Standard form)

 Individual term of Canonical Sum of Products (SOP) is called Minterm.


 In other words minterm is a product of all the literals (with or without bar)
within the Boolean expression.

 Individual term of Canonical Products of Sum (POS) is called Maxterm.


 In other words maxterm is a sum of all the literals (with or without bar) within
the Boolean expression.
Minterms & Maxterms for 2 variables
Minterms & Maxterms for 3 variables
Exercise

Prob. Find the minterm designation of XY’Z’ $ maxterm X+Y’+Z’


Solution: Substitute 1’s for non barred and 0’s for barred letters
Binary equivalent = 100
Decimal equivalent = 4
Thus XY’Z’=m4

Maxterm binary equivalent =011


Decimal equivalent = 3
Cont.…

 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”.
Exercise
Cont.….
Karnaugh map ( kmap )

 The Karnaugh map (K map) is a graphical tool used to simplify a


logic equation or to convert a truth table to its corresponding logic
circuit in a simple, orderly process.
 Although a K map can be used for problems involving any number of
input variables, its practical usefulness is limited to five or six
variables.
 The following discussion will be limited to problems with up to four
inputs because even five- and six-input problems are too involved and
are best done by a computer program.
The 3-Variable Karnaugh Map

 The 3-variable Karnaugh map is an array of eight cells, as shown in (a).


 Binary values of A and B are along the left side (notice
the sequence) and the values of C are across the top.
 The value of a given cell is the binary values of A and B at the left in the same
row combined with the value of C at the top in the same column.
 For example, the cell in the upper left corner has a binary value of 000 and the
cell in the lower right
corner has a binary value of 101. Fig. ( b) shows the standard product terms that
are represented by each cell in the Karnaugh map.
Cont.….
The 4-Variable Karnaugh Map

 The 4-variable Karnaugh map is an array of sixteen cells, as shown in


fig(a).
 Binaryvalues of A and B are along the left side and the values of C and
D are across the top.
 The value of a given cell is the binary values
of A and B at the left in the same row combined with the binary values
of C and D at the top in the same column.
Cont.….

 For example, the cell in the upper right


corner has a binary value of 0010 and the cell in the lower right
corner has a binary value of 1010.
 Fig.(b) shows the standard product terms that are represented
by each cell in the 4-variable Karnaugh map.
Cont.….
Karnaugh maps and truth tables for (a) two,
(b) three, and (c) four variables.
Cont.….
Cell Adjacency

 The cells in a Karnaugh map are arranged so that there is only a single
variable change between adjacent cells.
 Adjacency is defined by a single variable change. In the 3-variable map the
010 cell is adjacent to the 000
cell, the 011 cell, and the 110 cell.
 The 010 cell is not adjacent to the 001
cell, the 111 cell, the 100 cell, or the 101 cell.
Cont.….
KARNAUGH MAP SOP MINIMIZATION

 For a SOP expression in standard form, a 1 is placed on the Karnaugh


map for each product term in the expression.
 Each 1 is placed in a cell corresponding to the value of a product term.
 For example, for the product term ABC, a 1 goes in the 10l cell on a 3-
variable map.

Solution:
 Solution:
Cont.….

solution
Cont.….
Karnaugh Map Simplification of SOP Expressions

 You can group 1s on the Karnaugh map according to the


following rules by enclosing those adjacent cells containing 1s.
 The goal is to maximize the size of the groups and to minimize the
number of groups.
1. A group must contain either 1, 2, 4, 8, or 16 cells, which are all
powers of two. In the case of a 3-variable map, 2^3 = 8 cells is the
maximum group.
2. Each cell in a group must be adjacent to one or more cells in that
same group.
Cont.…..

3. Always include the largest possible number of 1s in a group in


accordance with rule 1.
4. Each 1 on the map must be included in at least one group.
The 1s already in a group can be included in another group as long as the
overlapping groups include non common 1s.
Group the 1s in each of the Karnaugh maps :
Solution :
Determine the minimum product term for each group.

a. For a 3-variable map:


(1) A l-cell group yields a 3-variable product term
(2) A 2-cell group yields a 2-variable product term
(3) A 4-cell group yields a 1-variable term
(4) An 8-cell group yields a value of 1 for the expression
Cont.…

 b. For a 4-variable map:


(1) A 1-cell group yields a 4-variable product term
(2) A 2-cell group yields a 3-variable product term
(3) A 4-cell group yields a 2-variable product term
(4) An 8-cell group yields a 1-variable term
(5) A 16-cell group yields a value of 1 for the expression
Determine the product terms for each of the Karnaugh maps
and write the resulting minimum SOP expression.
Solution :
Use a Karnaugh map to minimize the following
standard SOP expression:
"Don't Care" Conditions

 Sometimes a situation arises in which some input variable combinations are not
allowed.
 For example, recall that in the BCD code there are six invalid combinations:
1010, 1011, 1100, 1101, 1110, and 1111.
 Since these unallowed states will never occur in an application involving the
BCD code, they can be treated as "don't care" terms with respect to their effect on
the output.
 That is, for these "don't care" terms either a 1 or a 0 may be assigned to
the output: it really does not matter since they will never occur.
Cont.….

 The "don't care" terms can be used to advantage on the Karnaugh map.
 Fig. shows that for each "don't care" term, an X is placed in the cell.
 When grouping the 1 s, the Xs can be treated as 1s to make a larger
grouping or as 0s if they cannot be used to advantage.

Steps of mapping

 A. Determine the binary value of each sum term in the standard POS, that makes
the sum term ‘0’.
 B. as each sum term is evaluated ,place ‘0’ on the k-map in the corresponding
cell.
 Example.
 (A+B+C)(A+B+C)(A+B+C)(A+B+C)
Kmap simplification of POS expression

Example
Cont.…..

POS: A(C+B)
SOP:AC+AB =A(C+B)
Example
Converting between POS and SOP using karnaugn Map

 Using Kmap we can convert from:


 POS to SOP and
 SOP TO POS
Example

 Using KMAP convert the following standard POS expression in to:

 A. minimum POS
 B. standard SOP
 C. minimum SOP
solution
Cont.….

Exercise
Reading assignment

 Five variable karnaugn Maps


 six variable karnaugn Maps
 VHDL (VERY HIGH SPEED INTEGRATED CIRCUIT (V) HARDWEAR DESCRIPTION LANGUAGE)

You might also like