Boolean Algebra and
Logic Simplification
Lecture # 7&8
Digital Logic Design
DeMorgan’s Theorems
• DeMorgan’s first theorem:
• The complement of a product of variables is equal to the sum of
the complements of the variables.
• DeMorgan’s second theorem
• The complement of a sum of variables is equal to the product of
the complements of the variables
DeMorgan’s Theorems
• DeMorgan’s theorems provide mathematical verification
• equivalency of NAND and negative-OR gates
• equivalency of NOR and negative-AND gates
DeMorgan’s Theorems
• Each variable in DeMorgan’s theorems can also represent a
combination of other variables
• For example, X = AB + C, and Y = A + BC
DeMorgan’s Theorems
Applying DeMorgan’s Theorems
Applying DeMorgan’s Theorems
Boolean Analysis of Logic Circuits
• What Boolean algebra offers?
• It provides a concise way to express the operation of a logic circuit
• What is logic circuit?
• A logic circuit is formed by a combination of logic gates
• Thus, Boolean algebra helps to determine the output for
various combinations of input values
• How to get the Boolean expression for a logic circuit?
Boolean Analysis of Logic Circuits
• How to get the Boolean expression of a logic circuit?
• Begin at the left-most inputs
• Work toward the final output
• Writing the expression for each gate
Constructing a Truth Table for a
Logic Circuit
• What is a truth table?
• A truth table shows the output for all possible values of the inputs
• How to get truth table from Boolean expression?
• Evaluate Boolean expression for all possible combinations of inputs
• If there are 4 inputs variables, then 2 4 = 16 possible values.
Constructing a Truth Table for a Logic Circuit
Evaluating the Expression
• To evaluate the expression 🡪A(B + CD)
1. First find the values of the variables that make the expression equal to 1
• A(B + CD) = 1 only if A = 1 and B + CD = 1 because 1 . 1 = 1
2. Now determine when the B + CD = 1. Thus B + CD = 1 if either B = 1 or CD = 1
or if both B and CD equal 1 because
• B + CD = 1 + 0 = 1
• B + CD = 0 + 1 = 1
• B + CD = 1 + 1 = 1
3. The term CD = 1 only if C = 1 and D = 1
• Conclusion:
1. A(B + CD) = 1 when A = 1 and B = 1 regardless of the values of C and D or
when A = 1 and C = 1 and D = 1 regardless of the value of B.
2. A(B + CD) = 0 for all other value combinations of the variables
Logic Simplification Using Boolean
Algebra
• How can a logic expression be reduced to its simplest form?
• Use the basic laws, rules, and theorems of Boolean algebra to
manipulate and simplify an expression
• It depends on a thorough knowledge of Boolean algebra and
considerable practice in its application
Standard Forms of Boolean
Expressions
• All Boolean expressions can be converted into either of two
standard forms
• the sum-of-products form
• the product-of-sums form
The Sum-of-Products (SOP) Form
• An SOP expression can contain a single-variable term, as in
• A single overbar cannot extend over more than one variable;
however, more than one variable in a term can have an overbar
• For example, an SOP expression can have the term
but not
The Sum-of-Products (SOP) Form
Domain of a Boolean Expression
• What is domain of Boolean expression?
• It is the set of variables contained in the expression in either
complemented or uncomplemented form
• For example, the domain of the expression
is the set of variables A, B, C and the domain of the expression
is the set of variables A, B, C, D, E
The Sum-of-Products (SOP) Form
AND/OR Implementation of an SOP Expression
• Which logical gates are required to implement SOP?
• It requires ORing the outputs of two or more AND gates
• Product term is produced by an AND operation
• Sum (addition) of two or more products is produced by an OR
operation
The Sum-of-Products (SOP) Form
NAND/NAND Implementation of an SOP
Expression
• Can NAND gates be used to implement SOP?
• Yes
• How?
• The first level of NAND gates feed into a NAND gate that acts as a negative-
OR gate
• The NAND and negative-OR inversions cancel and the result is effectively
an AND/OR circuit.
The Sum-of-Products (SOP) Form
Conversion of a General Expression to SOP
Form
• Can any Boolean expression be changes into SOP?
• Yes, by applying Boolean algebra techniques
• For example, the expression A(B + CD) can be converted to
SOP form by applying the distributive law:
The Sum-of-Products (SOP) Form
The Standard SOP Form
• What is the standard from of SOP?
• A standard SOP expression is one in which all the variables in the
domain appear in each product term in the expression.
• Is the below given expression is standard SOP?
has a domain made up of the variables A, B, C, and D.
• No, D is not present in first term and C is not present in second term
The Sum-of-Products (SOP) Form
The Standard SOP Form
• For example
is a standard SOP expression
• But why Standard SOP is important?
• It is important in constructing truth tables and in the Karnaugh map
simplification method
• Any nonstandard SOP expression (referred to simply as SOP)
can be converted to the standard form using Boolean algebra.
The Sum-of-Products (SOP) Form
Converting Product Terms to Standard SOP
• How to convert an expression into standard SOP?
• A nonstandard SOP expression is converted into standard form using
Boolean algebra rule 6
• A variable added to its complement equals 1
The Sum-of-Products (SOP) Form
Converting Product Terms to Standard SOP
• Step 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. As you know, you can multiply anything by 1 without changing its
value
• Step 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,
The Sum-of-Products (SOP) Form
Binary Representation of a Standard Product Term
• A standard product term = 1 for only one combination of variable
values.
• For example, the product term ABCD = 1 when A = 1, B = 0, C = 1, D
= 0, and ABCD = 0 for all other combinations
• In this case, the product term has a binary value of 1010 (decimal ten).
• Why product term could only be equal to 1 for only one combination?
• Because its an AND gate.
• Inverters are used to produce the complements of the variables as required.
• When the whole SOP expression will be equal to 1?
• Only if one or more of the product terms in the expression is equal to 1.
The Product-of-Sums (POS) Form
Implementation of a POS Expression
• Which gates can be used for POS?
• Simply requires ANDing the outputs of two or more OR gates
• Sum term is produced by an OR operation
• Product of two or more sum terms is produced by an AND operation
The Product-of-Sums (POS) Form
The Standard POS Form
• Is the below given expression is standard POS?
has a domain made up of the variables A, B, C, and D.
• No, its not standard form because D is missing in first term and C is
missing in second term
The Product-of-Sums (POS) Form
The Standard POS Form
• A standard POS expression is one in which all the variables in
the domain appear in each sum term in the expression. For
example
• Any nonstandard POS expression (referred to simply as POS)
can be converted to the standard form using Boolean algebra
The Product-of-Sums (POS) Form
Converting a Sum Term to Standard POS
• How to convert any expression in standard POS?
• A nonstandard POS expression is converted into standard form using
Boolean algebra rule 8
• A variable multiplied by its complement equals 0.
The Product-of-Sums (POS) Form
Converting a Sum Term to Standard POS
• Step 1:
• Add to each nonstandard product term a term made up of the product
of the missing variable and its complement. This results in two sum
terms. As you know, you can add 0 to anything without changing its
value.
• Step 2:
• Apply rule 12 : A + BC = (A + B)(A + C)
• Step 3:
• Repeat Step 1 until all resulting sum terms contain all variables in the
domain in either complemented or uncomplemented form.
The Product-of-Sums (POS) Form
Binary Representation of a Standard Sum Term
• A standard sum term is equal to 0 for only one combination of variable values.
For example, the sum term
• when A = 0, B = 1, C = 0, and D = 1 and is 1 for all other combinations
• In this case, the sum term has a binary value of 0101 (decimal 5).
• Why?
• Sum is implemented with an OR gate whose output is 0 only if each of its inputs is 0.
• Inverters are used to produce the complements of the variables as required.
• When the POS expression will be zero?
• A POS expression is equal to 0 only if one or more of the sum terms in the expression is
equal to 0.
Converting Standard SOP to
Standard POS
• How to convert between SOP and POS?
• Observation: Binary values of product terms in SOP are not present in
the equivalent POS
• Observation: Binary values that are not represented in SOP are present
in the equivalent POS
• Steps to convert from SOP to POS
• Step 1: Evaluate each product term in the SOP expression such that
product term should be 1
• Step 2: Determine all of the binary numbers not included in the
evaluation in Step 1
• Step 3: Write the equivalent sum term for each binary number from Step
2 and express in POS form
Boolean Expressions and Truth
Tables
• All standard Boolean expressions can be easily converted into
truth table format using binary values for each term in the
expression.
• The truth table is a common way of presenting, in a concise
format, the logical operation of a circuit. Also, standard SOP or
POS expressions can be determined from a truth table
Converting SOP Expressions to Truth
Table Format
• An SOP expression is equal to 1 only if at least one of the product terms is
equal to 1.
• What is a truth table?
• A truth table is simply a list of the possible combinations of input variable values and
the corresponding output values (1 or 0).
• For an expression with a domain of two variables, there are four different
combinations of those variables (22 = 4)
• How to convert SOP in truth table?
1. List all possible combinations of binary values
2. Convert the SOP expression to standard form if it is not already
3. Place a 1 in the output column (X) for each binary value that makes the SOP
expression a 1
4. Place a 0 for all the remaining binary values
Converting POS Expressions to Truth
Table Format
• A POS expression is equal to 0 only if at least one of the sum
terms is equal to 0
• How to convert POS to truth table?
1. List all the possible combinations of binary values
2. Convert the POS expression to standard form if it is not already
3. Place a 0 in the output column (X) for each binary value that makes
the expression a 0
4. Place a 1 for all the remaining binary values
Determining Standard Expressions from a
Truth Table
• How to get SOP expression from a truth table?
• List the binary values of the input variables for which the output is 1
• Convert each binary value to the corresponding product term by
replacing
• Each 1 with the corresponding variable
• Each 0 with the corresponding variable complement
• How to get POS expression from truth table?
• List the binary values for which the output is 0
• Convert each binary value to the corresponding sum term by replacing
• Each 1 with the corresponding variable complement
• Each 0 with the corresponding variable