Chapter 4 SM1
Chapter 4 SM1
Objective
This chapter is intended to provide learners with the following specific knowledge and skills:
• Knowing the values of Boolean variables and their relation to input and output
devices.
• Understanding the types of, symbols used for, and the input/output relationships of
Boolean operators.
• Analysing and simplifying Boolean functions.
• Generating logic circuits from Boolean functions.
Contents
1. Definition and terminology
2. The basic operators
2.1 AND, OR, NOT.
2.2 Schematic Representation
3. Other operators
3.1 NAND and NOR circuits
3.2 Exculsif OR
3.3 Schematic Representation
4. Theorems and properties
5. Truth table
6. Boolean functions
7. Canonical forms
8. Functions based on NANDs and NORs only
9. Logical diagram of Boolean function
10. Simplification of Boolean function
10.1 Boolean algebra method
10.2 Karnaugh map method
10.3 Quine-McCluskey method
Introduction
Introduction
Boolean algebra is a type of algebra that is created by operating the binary system. In the year
1854, George Boole, an English mathematician, proposed this algebra. This is a variant of
Aristotle’s propositional logic that uses the symbols 0 and 1, or True and False. Boolean
algebra is concerned with binary variables and logic operations.
Boolean Algebra is fundamental in the development of digital electronics systems as they all
use the concept of Boolean Algebra to execute commands. Apart from digital electronics this
algebra also finds its application in Set Theory, Statistics, and other branches of mathematics.
In this chapter, we will learn about, basic Boolean operations, Boolean expressions, Truth
Tables, Boolean laws, and others in detail.
1. Definition and terminology
1.1 Definition
Boolean algebra is fundamental in the development of digital electronics systems as they all
use the concept of Boolean Algebra to execute commands.
A Boolean algebra consists basically of:
• a set of elements B (operand)
• binary operators (+ , •)
• unary operator (' or )
1.2 Terminologies
There are various terminologies related to Boolean Algebra, which are used to explain various
parameters of Boolean Algebra.
• Boolean Variables
Variables used in Boolean algebra that store the logical value of 0 and 1 are called the boolean
variables. They are used to store either true or false values.
• Boolean Function
A function of the Boolean Algebra that is formed by the use of Boolean variables and
Boolean operators is called the Boolean function.
• Complement
The inverse of the boolean variable is called the complement of the variable. The complement
of 0 is 1 and the complement of 1 is 0. It is represented by ‘ over the variable.
2. The basic Boolean Algebra Operators
2.1 Definition
There are various operators that are used in Boolean algebra but the basic operators that form
the base of Boolean Algebra are,
• Negation or NOT Operator
• Conjunction or AND Operator
• Disjunction or OR Operator
These operators have their own symbols and precedence and the table added below shows the
symbol and the precedence of these operators.
OR + (or) ∨ Third
We can easily define these operations using two boolean variables. Let’s take two boolean
variables A and B that can have any of the two values 0 or 1 (i.e. they can be either OFF or
ON).
• Negation (NOT) Operator
Using the NOT operator reverse the value of the Boolean variable from 0 to 1 or vice-versa.
This can be understood as:
• If A = 1, then using NOT operation we have (A)’ = 0
• If A = 0, then using the NOT operation we have (A)’ = 1
We also represent the negation operation as 𝐴̅, i.e if A = 1, 𝐴̅ = 0 and it is read as “not A” or
“A bar”.
• Conjunction (AND) Operator
Using the AND operator satisfies the condition if both the value of the individual variables are
true and if any of the value is false then this operation gives the negative result. This can be
expressed as,
• If A = True, B = True, then A . B = True
• If A = True, B = False, Or A = false, B = True, then A . B = False
• If A = False, B = False, then A . B = False
• Disjunction (OR) Operator
Using the OR operator satisfies the condition if any value of the individual variables are true,
it only gives a negative result if both the values are false. This can be expressed as,
• If A = True, B = True, then A + B = True
• If A = True, B = False, Or A = false, B = True, then A + B = True
• If A = False, B = False, then A + B = False
2.2 Schematic representation
A schematic representation is based on a logic gate that allows data to be transferred. Logic
gates, use logic to determine whether or not to pass a signal. Logic gates, on the other hand,
govern the flow of information based on a set of rules.
• NOT Gate
The NOT gate is a basic one-input, one-output gate, the output may be calculated using the
Boolean equation Z=A’.
Input Output
A Not A
0 1
1 0
• AND Gate
Two or more inputs and one output can be used in an AND gate.
The schematic representation of an AND operator is given by an AND gate’s based on the
following mathematical procedure if there are two inputs A and B: Z=A.B
Input Output
A B A AND B
0 0 0
0 1 0
1 0 0
1 1 1
• OR Gate
Two or more inputs and one output can be used in an OR gate.
The OR gate’s output will be given by the following mathematical procedure if there are two
inputs A and B: Z=A+B.
Input Output
A B A OR B
0 0 0
0 1 1
1 0 1
1 1 1
3. Other operators
3.1 NOR Gate
A NOR gate, known as a “NOT-OR” gate, consists of an OR gate followed by a NOT gate.
This gate’s output is 1 only when all of its inputs are 0. Alternatively, when all of the inputs
are low, the output is high.
The Boolean statement for the NOR gate is C=(A+B)’ if there are two inputs A and B.
Input Output
A B A NOR B
0 0 1
0 1 0
1 0 0
1 1 0
From the table above, we can observe that the outputs of the NOR gate are the polar opposite
of those of an OR gate. The NOR gate is sometimes known as a universal gate since it may be
used to implement the OR, AND, and NOT gates.
3.2 NAND Gate
A NAND gate, known as a ‘NOT-AND’ gate, is essentially a Not gate followed by an AND
gate.
This gate’s output is 0 only if none of the inputs is 0. Alternatively, when all of the inputs are
not high and at least one is low, the output is high.
If there are two inputs A and B, the Boolean expression for the NAND gate is C=(A.B)’
Input Output
A B A NAND B
0 0 1
0 1 1
1 0 1
1 1 0
By comparing their truth tables, we can observe that their outputs are the polar opposite of an
AND gate. The NAND gate is known as a universal gate because it may be used to implement
the AND, OR, and NOT gates.
3.3 XOR Gate
The Exclusive-OR or ‘Ex-OR’ gate is a digital logic gate that accepts more than two inputs
but only outputs one value.
If any of the inputs is ‘High,’ the output of the XOR Gate is ‘High.’ If both inputs are ‘High,’
the output is ‘Low.’ If both inputs are ‘Low,’ the output is ‘Low.’
The Boolean equation for the XOR gate is Z=A’.B+A.B’ if there are two inputs A and B.
Input Output
A B A XOR B
0 0 0
0 1 1
1 0 1
1 1 0
Input Output
A B A XNOR B
0 0 1
0 1 0
1 0 0
1 1 1
A B A+B A.B
1 1 1 1
1 0 1 0
0 1 1 0
0 0 0 0
1 1 0 0 0 0
1 0 0 1 1 1
0 1 1 0 1 1
0 0 1 1 1 1
We can clearly see that truth values for (A.B)’ are equal to truth values for (A)’ + (B)’,
corresponding to the same input. Thus, De Morgan’s First Law is true.
Example 2: Draw Truth Table for A + A.B = A
In the truth table below, we can see that the truth values for A + A.B is exactly the same as A.
A B A.B A + A.B
1 1 1 1
1 0 0 1
0 1 0 0
0 0 0 0
A B A.B A.B + A + B A + B
1 1 1 1 1
1 0 0 1 1
0 1 0 1 1
0 0 0 0 0
6. Boolean functions
6.1 Definition
Boolean function is an expression that produces a Boolean value when evaluated, i.e. it
produces either a true value or a false value. Whereas boolean variables are variables that store
Boolean numbers.
A + B = C is a Boolean expression in which A, B, and C are Boolean variables that can only
store two values: 0 and 1. The 0 and 1 are the synonyms for false and True and are used
in Boolean Algebra, sometimes we also use “Yes” in place of True and “No” in place of False.
Thus, we can say that statements using Boolean variables and operating on Boolean operations
are Boolean functions.
Examples:
F1= A + B
6.2 Boolean Expression for a Logic Circuit
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.
For the example circuit in Figure ??, 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.
→
→
There are three variables in each term and the eight possible binary values are listed in
the left three columns of the following table. The binary values that make the sum terms in
the expression equal to 0 are A + B + C: 000; A + 𝐵̅ + C: 010; A + 𝐵̅ + 𝐶̅ : 011;
𝐴̅ + B + 𝐶̅ : 101; and 𝐴̅ + 𝐵̅ + C: 110. For each of these binary values, place a 0 in
the output column as shown in the table. For each of the remaining binary combinations,
place a 1 in the output column.
Physically, each cell is adjacent to the cells that are immediately next to it on any of its four
sides. A cell is not adjacent to the cells that diagonally touch any of its corners. Also, the cells
in the top row are adjacent to the corresponding cells in the bottom row and the cells in the
outer left column are adjacent to the corresponding cells in the outer right column. This is called
“wrap-around” adjacency because you can think of the map as wrapping around from top to
bottom to form a cylinder or from left to right to form a cylinder.
Figure bellow illustrates the cell adjacencies with a 4-variable map, although the same rules
for adjacency apply to Karnaugh maps with any number of cells.
For an 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 minterm. For
example, for the mintern A𝐵̅C, a 1 goes in the 101 cell on a 3-variable map.
When an SOP expression is completely mapped, there will be a number of 1s on the
Karnaugh map equal to the number of minterms in the standard SOP expression. The
cells that do not have a 1 are the cells for which the expression is 0. Usually, when working
with SOP expressions, the 0s are left off the map. The following steps and the illustration
in the bellow figure show the mapping process.
Step 1: Determine the binary value of each minterm in the standard SOP expression.
Step 2: As each minterm is evaluated, place a 1 on the Karnaugh map in the cell
having the same value as the product term.
Note: A Boolean expression must first be in standard form before you use a Karnaugh map. If
an expression is not in standard form, then it must be converted to standard form by the
procedure covered in Sec 7.3 or by numerical expansion. Since an expression should be
evaluated before mapping anyway. For example, assume that one of the product terms in a
certain 3-variable SOP expression is A𝐵̅. This term can be expanded numerically to standard
form as follows. First, write the binary value of the two variables and attach a 0 for the missing
variable C: 100. Next, write the binary value of the two variables and attach a 1 for the missing
variable C: 101. The two resulting binary numbers are the values of the standard SOP terms
A𝐵̅ 𝐶̅ and A𝐵̅C.
As another example, assume that one of the product terms in a 3-variable expression is B
(remember that a single variable counts as a product term in an SOP expression). This term can
be expanded numerically to standard form as follows. Write the binary value of the variable;
then attach all possible values for the missing variables A and C as follows:
The resulting minimum minterm for each group is shown in the figure above. The related
minimum SOP expressions for each of the Karnaugh maps are:
F(a,b,c,d,e)
Example2: let to simplify the Boolean function F using Karnaugh map at one table as shown
below
F(A,B,C,D,E)
8.3 simplification using Quine-McCluskey Method
For Boolean functions up to four variables, the Karnaugh map method is a powerful
minimization method. When there are five variables, the Karnaugh map method is difficult to
apply and completely impractical beyond five. The Quine-McCluskey method is a formal
tabular method for applying the Boolean distributive law to various terms to find the minimum
sum of products by eliminating literals that appear in two terms as complements.
Unlike the Karnaugh mapping method, Quine-McCluskey lends itself to the computerized
reduction of Boolean expressions, which is its principal use. For simple expressions, with up to
four or perhaps even five variables, the Karnaugh map is easier for most people because it is a
graphic method.
To apply the Quine-McCluskey method, first write the function in standard minterm (SOP)
form. To illustrate, we will use the expression:
F(A,B,C,D) =
and represent each minterm as binary numbers:
F(A,B,C,D) = ∑ (0001,0011, 0100, 0101, 1010, 1100, 1101, 1111)
The second step in applying the Quine-McCluskey method is to arrange the minterms in the
original expression in groups according to the number of 1s in each minterm, as shown in the
following table. In this example, there are four groups of minterms.
Note: the minterm mi denotes the term which is related to the binary code (i)10
Third, compare adjacent groups, looking to see if any minterms are the same in every position
except one. If they are, place a check mark by those two minterms, as shown in the following
table. You should check each minterm against all others in the following group, but it is not
necessary to check any groups that are not adjacent. In the column labeled First Level, you will
have a list of the minterm names and the binary equivalent with an x as the placeholder for the
literal that differs. In the example, minterm m1 in Group 1 (0001) is identical to m3 in Group 2
(0011) except for the C position, so place a check mark by these two minterms and enter 00x1
in the column labeled First Level. Minterm m4 (0100) is identical to m5 (0101) except for the
D position, so check these two minterms and enter 010x in the last column. If a given term can
be used more than once, it should be. In this case, notice that m1 can be used again with m5 in
the second row with the x now placed in the B position.
In the table above, minterm m4 and minterm m12 are identical except for the A position. Both
minterms are checked and x100 is entered in the First Level column . Follow this procedure for
groups 2 and 3. In these groups, m5 and m13 are combined and so are m12 and m13(notice that
m12 was previously used with m4 and is used again). For groups 3 and 4, both m13 and m15 are
added to the list in the First Level column.
In this example, minterm m10 does not have a check mark because no other minterm meets the
requirement of being identical except for one position. This term is called an essential prime
implicant, and it must be included in our final reduced expression.
The terms listed in the First Level have been used to form a reduced table with one less group
than before. The number of 1s remaining in the First Level are counted and used to form three
new groups.
Terms in the new groups are compared against terms in the adjacent group down. You need to
compare these terms only if the x is in the same relative position in adjacent groups; otherwise
go on. If the two expressions differ by exactly one position, a check mark is placed next to both
terms as before and all of the minterms are listed in the Second Level list. As before, the one
position that has changed is entered as an x in the Second Level. For our example, notice that
the third term in Group 1 and the second term in Group 2 meet this requirement, differing only
with the A literal. The fourth term in Group 1 also can be combined with the first term in Group
2, forming a redundant set of minterms. One of these can be crossed off the list and will not be
used in the final expression.
With complicated expressions, the process described can be continued. For our example, we
can read the Second Level expression as B𝐶̅ . The terms that are unchecked will form other
terms in the final reduced expression. The first unchecked term is read as 𝐴̅𝐵̅ D. The next one
is read as 𝐴̅𝐶̅ D. The last unchecked term is ABD. Recall that m10 was an essential prime
implicant, so is picked up in the final expression. The reduced expression using the unchecked
terms is: F(A,B,C,D) =
Although this expression is correct, it may not be the minimum possible expression. There is a
final check that can eliminate any unnecessary terms. The terms for the expression are written
into a prime implicant table below, with minterms for each prime implicant checked.
If a minterm has a single check mark, then the prime implicant is essential and must be included
in the final expression. The term 𝐴̅𝐵̅ D. must be included because m15 is only covered by it.
Likewise m10 is only covered by A𝐵̅C𝐷 ̅ , so it must be in the final expression. Notice that the
two minterms in 𝐴̅𝐶̅ D are covered by the prime implicants in the first two rows, so this term is
unnecessary. The final reduced expression is, therefore,
F (A,B,C,D) =