0% found this document useful (0 votes)
89 views

Digital Electronics: Kwame Oteng Gyasi Lecture 4: Boolean Algebra

This document discusses Boolean algebra and its application to digital logic circuits. Some key points: - Boolean algebra uses variables that can only have values of 1 or 0, and operations like AND, OR, and NOT to represent the behavior of logic gates. - Basic concepts include literals, sum terms, product terms, and Boolean operations like addition, multiplication, and complement. Laws like commutative, associative, and distributive apply as in ordinary algebra. - DeMorgan's theorems allow transforming between OR/AND and NAND/NOR gate expressions. - To analyze a logic circuit, its Boolean expression is derived by working through the gates from inputs to output. A truth table then evaluates the
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
89 views

Digital Electronics: Kwame Oteng Gyasi Lecture 4: Boolean Algebra

This document discusses Boolean algebra and its application to digital logic circuits. Some key points: - Boolean algebra uses variables that can only have values of 1 or 0, and operations like AND, OR, and NOT to represent the behavior of logic gates. - Basic concepts include literals, sum terms, product terms, and Boolean operations like addition, multiplication, and complement. Laws like commutative, associative, and distributive apply as in ordinary algebra. - DeMorgan's theorems allow transforming between OR/AND and NAND/NOR gate expressions. - To analyze a logic circuit, its Boolean expression is derived by working through the gates from inputs to output. A truth table then evaluates the
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 45

DIGITAL ELECTRONICS

Kwame Oteng Gyasi


Lecture 4: Boolean Algebra
Boolean Operations and Expressions
• Boolean algebra is the mathematics of digital logic.
• A basic knowledge of Boolean algebra is indispensable to the study and
analysis of logic circuits.
• In the previous lectures, Boolean operations and expressions in terms of
their relationship to NOT, AND, OR, NAND, and NOR gates were
introduced.
• Variable, complement, and literal are terms used in Boolean algebra.
• A variable is a symbol (usually an italic uppercase letter or word) used
to represent an action, a condition, or data.
• Any single variable can have only a 1 or a 0 value.
• The complement is the inverse of a variable and is indicated by a bar
over the variable (overbar).
• The complement of the variable A is read as “not A” or “A bar.”
• Sometimes a prime symbol rather than an overbar is used to denote the
complement of a variable.
• A literal is a variable or the complement of a variable.
Boolean Addition
• Recall from the previous lecture that Boolean addition is equivalent
to the OR operation.
• The basic rules are illustrated with their relation to the OR gate below.

• In Boolean algebra, a sum term is a sum of literals.


• In logic circuits, a sum term is produced by an OR operation
• Some examples of sum terms are A  B, A  B, A  B  C , A  B  C  D
• A sum term is equal to 1 when one or more of the literals in the term
are 1.
• A sum term is equal to 0 only if each of the literals is 0.
EXAMPLES

1. Determine the values of A, B, C, and D that make


the sum term A  B  C  D equal to 0.
2. Determine the values of A and B that make the
sum term A  B equal to 0.
Boolean Multiplication
• Recall from the previous lecture that Boolean multiplication is
equivalent to the OR operation.
• The basic rules are illustrated with their relation to the AND gate
below.

• In Boolean algebra, a product term is a product of literals.


• In logic circuits, a product term is produced by an AND operation
• Examples of product terms are AB, AB, ABC , ABC D
• A product term is equal to 1 only if each of the literals in the term is
1.
EXAMPLES

1. Determine the values of A, B, C, and D that make


the product term ABC D equal to 1.
2. Determine the values of A and B that make the
product term AB equal to 1.
Laws and Rules of Boolean Algebra

• As in other areas of mathematics, there are certain


well-developed rules and laws that must be
followed in order to properly apply Boolean algebra.
• The basic laws of Boolean algebra—the
commutative laws for addition and multiplication,
the associative laws for addition and
multiplication, and the distributive law—are the
same as in ordinary algebra.
• Each of the laws is illustrated with two or three
variables, but the number of variables is not limited
to this.
Commutative Law
• The commutative law of addition for two variables is written
as
A+B=B+A
• This law states that the order in which the variables are ORed
makes no difference.
• Remember, in Boolean algebra as applied to logic circuits,
addition and the OR operation are the same.

• The Figure above illustrates the commutative law as applied


to the OR gate and shows that it doesn’t matter to which 
input each variable is applied. (The symbol means
“equivalent to.”)
Commutative Law

• The commutative law of multiplication for two variables


is
AB = BA
• This law states that the order in which the variables are
ANDed makes no difference.

• The Figure above illustrates this law as applied to the


AND gate.
• Remember, in Boolean algebra as applied to logic
circuits, multiplication and the AND function are the
same.
Associative Law

• The associative law of addition is written as follows


for three variables:
A + (B + C) = (A + B) + C
• This law states that when ORing more than two
variables, the result is the same regardless of the
grouping of the variables.

• The Figure above illustrates this law as applied to 2-


input OR gates.
Associative Law

• The associative law of multiplication is written as


follows for three variables:
A(BC) = (AB)C
• This law states that when ANDing more than two
variables, the result is the same regardless of the
grouping of the variables.

• The Figure above illustrates this law as applied to 2-


input AND gates.
Distributive Law
• The distributive law is written for three variables as follows:
A(B + C) = AB + AC
• This law states that ORing two or more variables and then ANDing the
result with a single variable is equivalent to ANDing the single variable
with each of the two or more variables and then ORing the products.
• The distributive law also expresses the process of factoring in which the
common variable A is factored out of the product terms, for example,
AB + AC = A(B + C)

• The Figure above illustrates the distributive law in terms of gate


implementation.
Rules of Boolean Algebra

• The Table below lists 12 basic rules that are useful in


manipulating and simplifying Boolean expressions.

• Rules 1 through 9 will be proven in terms of their


application to logic gates.
• Rules 10 through 12 will be derived in terms of the
simpler rules and the laws previously discussed.
Proof of Rule 11
Proof of Rule 12
DeMorgan’s Theorems
• DeMorgan, a mathematician who knew Boole, proposed two
theorems that are an important part of Boolean algebra.
• In practical terms, DeMorgan’s theorems provide mathematical
verification of the equivalency of the NAND and negative-OR
gates and the equivalency of the NOR and negative-AND gates.
• DeMorgan’s first theorem is stated as follows:
XY  X  Y

The complement of a product of variables is equal to the sum


of the complements of the variables.
• Stated another way,
The complement of two or more ANDed variables is
equivalent to the OR of the complements of the individual
variables.
• The formula for expressing this theorem for two variables is
XY  X  Y
DeMorgan’s Theorems

• DeMorgan’s second theorem is stated as follows:


The complement of a sum of variables is equal to
the product of the complements of the variables.
• Stated another way,
The complement of two or more ORed variables is
equivalent to the AND of the complements of the
individual variables.
• The formula for expressing this theorem for two
variables is

X Y  Z
DeMorgan’s Theorems


DeMorgan’s Theorems Example

1. Apply DeMorgan’s theorems to the expressions XYZ


and X  Y  Z .
DeMorgan’s Theorems

• Each variable in DeMorgan’s theorems can also


represent a combination of other variables.
• For example, X can be equal to the term AB + C, and
Y can be equal to the term A + BC.
• So if you can apply DeMorgan’s theorem for two
variables as stated by XY  X  Y to the expression
, you
( AB  C )( A  BC ) get the following result:

( AB  C )( A  BC )  AB  C  A  BC
• This can be further simplified.
DeMorgan’s Theorems Example

1. Apply DeMorgan’s theorems to the expression:


a. A  BC  D( E  FANS:
) (A+BC)(D+E+F)

b. ( A  B  C ) D ANS: ABC  D

C. ABC  DEF ANS: ( A  B  C )( D  E  F )

2. The Boolean expression for an exclusive-OR gate is


AB  AB. With this as a starting point, use
DeMorgan’s theorems and any other rules or laws
that are applicable to develop an expression for the
exclusive-NOR gate. Ans: AB  AB
Boolean Analysis of Logic Circuits

• Boolean algebra provides a concise way to express


the operation of a logic circuit formed by a
combination of logic gates so that the output can be
determined for various combinations of input
values.
• To derive the Boolean expression for a given
combinational logic circuit, begin at the left-most
inputs and work toward the final output, writing the
expression for each gate.
Boolean Analysis of Logic Circuits
• For the example circuit below, the Boolean expression is determined
in the following three steps:

1. The expression for the left-most AND gate with inputs C and D is CD.
2. The output of the left-most AND gate is one of the inputs to the OR
gate and B is the other input. Therefore, the expression for the OR
gate is B + CD.
3. The output of the OR gate is one of the inputs to the right-most AND
gate and A is the other input. Therefore, the expression for this AND
gate is A(B + CD), which is the final output expression for the entire
circuit.
Constructing a Truth Table for a Logic Circuit
• Once the Boolean expression for a given logic circuit
has been determined, a truth table that shows the
output for all possible values of the input variables
can be developed.
• The procedure requires that you evaluate the
Boolean expression for all possible combinations of
values for the input variables.
• In the case of the circuit in the previous slide, there
are four input variables (A, B, C, and D) and
therefore sixteen (24 = 16) combinations of values
are possible.
Evaluating the Expression
• To evaluate the expression A(B + CD), first find the values of the variables
that make the expression equal to 1, using the rules for Boolean addition
and multiplication.
• In this case, the expression equals 1 only if A = 1 and B + CD = 1 because A(B
+ CD) = 1.1 = 1
• Now determine when the B + CD term equals 1.
• The term 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
• The term CD = 1 only if C = 1 and D = 1.
• To summarize, the expression 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.
• The expression A(B + CD) = 0 for all other value combinations of the
variables.
Truth Table
TRY

1.Replace the AND gates with OR gates and the OR


gate with an AND gate in the Figure below.
Determine the Boolean expression for the output.

2. Construct a truth table for the circuit in Question 1.


Logic Simplification Using Boolean Algebra

• A logic expression can be reduced to its simplest form


or changed to a more convenient form to implement
the expression most efficiently using Boolean algebra.
• The approach taken in this section is to use the basic
laws, rules, and theorems of Boolean algebra to
manipulate and simplify an expression.
• This method depends on a thorough knowledge of
Boolean algebra and considerable practice in its
application, not to mention a little ingenuity and
cleverness.
• A simplified Boolean expression uses the fewest gates
possible to implement a given expression.
Example

1. Using Boolean algebra techniques, simplify this


expression: AB + A(B + C) + B(B + C)
Example cont’d

• The Figure in the previous slide shows that the


simplification process in the Example has significantly
reduced the number of logic gates required to
implement the expression.
• Part (a) shows that five gates are required to
implement the expression in its original form;
• however, only two gates are needed for the simplified
expression, shown in part (b).
• It is important to realize that these two gate circuits
are equivalent.
• That is, for any combination of levels on the A, B, and
C inputs, you get the same output from either circuit.
Example cont’d

1. Simplify the following Boolean expression:


[ AB  C  BD   AB ]C

Note that brackets and parentheses mean the same


thing: the term inside is multiplied (ANDed) with
the term outside. Ans: BC
2. Simplify the following Boolean expression:
ABC  ABC  ABC Ans: ABC  ABC BC  AB  BC
3. Simplify the following Boolean expression:
AB  AC  ABC Ans: A+BC
Standard Forms of Boolean Expressions

• All Boolean expressions, regardless of their form,


can be converted into either of two standard forms:
the sum-of-products form or the product-of-sums
form.
• Standardization makes the evaluation,simplification,
and implementation of Boolean expressions much
more systematic and easier.
Sum of Products (SOP) Form
• A product term has been defined as a term consisting of the product
(Boolean multiplication) of literals (variables or their complements).
• When two or more product terms are summed by Boolean addition,
the resulting expression is a sum-of-products (SOP).
• Some examples are
AB + ABC AB  ABC AB  ABC  AC
• Also, an SOP expression can contain a single-variable term, as in
. A  ABC  BC D
• Refer to the simplification examples we just tackled, and you will see
that each of the final expressions was either a single product term or
in SOP form.
• In an SOP expression, 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 ABC
but not .
ABC
Domain of a Boolean Expression

• The domain of a general Boolean expression is the


set of variables contained in the expression in
either complemented or uncomplemented form.
• For example, the domain of the expression
AB  ABC
is the set of variables A, B, C
• and the domain of the expression
ABC  CDE  BC D
is the set of variables A, B, C, D, E.
AND/OR Implementation of an SOP Expression
• Implementing an SOP expression simply requires ORing the outputs of
two or more AND gates.
• A product term is produced by an AND operation, and the sum (addition)
of two or more product terms is produced by an OR operation.
• Therefore, an SOP expression can be implemented by AND-OR logic in
which the outputs of a number (equal to the number of product terms in
the expression) of AND gates connect to the inputs of an OR gate, as
shown below for the expression
AB + BCD + AC.

• The output X of the OR gate equals the SOP expression.


AND/OR Implementation of an SOP Expression
• Implementing an SOP expression simply requires ORing the outputs of
two or more AND gates.
• A product term is produced by an AND operation, and the sum (addition)
of two or more product terms is produced by an OR operation.
• Therefore, an SOP expression can be implemented by AND-OR logic in
which the outputs of a number (equal to the number of product terms in
the expression) of AND gates connect to the inputs of an OR gate, as
shown below for the expression
AB + BCD + AC.

• The output X of the OR gate equals the SOP expression.


NAND/NAND Implementation of an SOP Expression
• NAND gates can be used to implement an SOP
expression.
• By using only NAND gates, an AND/OR function can
be accomplished, as illustrated in the Figure below.
• 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.
Conversion of a General Expression to SOP Form
• Any logic expression can be changed into SOP form
by applying Boolean algebra techniques.
• For example, the expression A(B + CD) can be
converted to SOP form by applying the distributive
law:
A(B + CD) = AB + ACD
Examples
1. Convert each of the following Boolean expressions
to SOP form:
(a) AB + B(CD + EF) Ans: AB + BCD + BEF
(b) (A + B)(B + C + D) Ans: AB + AC + AD + BB + BC + BD
(c)  A  B   C Ans: AC + BC
The Standard SOP Form
• So far, you have seen SOP expressions in which some of the product
terms do not contain all of the variables in the domain of the
expression.
ABC  ABD  ABCD
• For example, the expression has a domain made up of the variables
A, B, C, and D.
• However, notice that the complete set of variables in the domain is not
represented in the first two terms of the expression; that is, D or is
D
missing
C from the first term and C or is missing from the second term.
• A standard SOP expression is one in which all the variables in the
domain appear in each product term in the expression.
• For example, ABCDis a standard
+ ABCD SOP expression.
+ ABCD
• Standard SOP expressions are important in constructing truth tables,
covered previously, and in the Karnaugh map simplification method,
which will be discussed later.
• Any nonstandard SOP expression (referred to simply as SOP) can be
converted to the standard form using Boolean algebra.
Converting Product Terms to Standard SOP
• Each product term in an SOP expression that does not contain all the
variables in the domain can be expanded to standard form to include all
variables in the domain and their complements.
• As stated in the following steps, a nonstandard SOP expression is
converted into standard form using Boolean algebra rule 6
A A 1

• A variable added to its complement equals 1.


• 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, as the next Example shows.
Example
1. Convert the following Boolean expression into
standard SOP form:
ABC  AB  ABCD
Ans:
ABCD+ABCD+ABCD+ABCD+ABCD+ABCD+ABCD
Binary Representation of a Standard Product Term
• A standard product term is equal to 1 for only one
combination of variable values.
• For example, the product term ABC Dis equal to 1 when A
= 1, B = 0, C = 1, D = 0, as shown below, and is 0 for all
other combinations of values for the variables.
• In this case, the product term has a binary value of 1010
(decimal ten).
• Remember, a product term is implemented with an AND
gate whose output is 1 only if each of its inputs is 1.
• Inverters are used to produce the complements of the
variables as required.
• An SOP expression is equal to 1 only if one or more of
the product terms in the expression is equal to 1.
Example
1. Convert the following Boolean expression into
standard SOP form:
ABC  AB  ABCD
Ans:
ABCD+ABCD+ABCD+ABCD+ABCD+ABCD+ABCD
ABCD  ABCD  ABC D

2. Determine the binary values for which the


following standard SOP expression is equal to 1:
ABCD  ABCD  ABC D
The Product-of-Sums (POS) Form

You might also like