"Boolean Algebra and Its Application": Master of Science

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 37

Technical Report on the Seminar on

“BOOLEAN ALGEBRA AND ITS


APPLICATION”
Submitted for the partial fulfillment
for the Award of the degree of

Master Of Science
IN MATHEMATICS

By
KOMAL MISHRA
Under the guidance of
Dr. R.K. PANDEY

Department of Mathematics & computer Science


School of Basic Sciences, Babu Banarasi Das
University Lucknow (226 028), Uttar Pradesh, India
Academic Year : 2021-2022
Technical Report on the Seminar on

“BOOLEAN ALGEBRA AND ITS


APPLICATION”
Submitted for the partial fulfillment
for the Award of the degree of

Master Of Science
IN MATHEMATICS

By
KOMAL MISHRA
Under the guidance of
Dr. R.K. PANDEY

Professor, Department of Mathematics & Computer Science,


School of Basic Science, Babu Banarasi Das University,
Lucknow

Department of Mathematics & computer Science


School of Basic Sciences, Babu Banarasi Das
University Lucknow (226 028), Uttar Pradesh,
India
Academic Year : 2021-2022
DECLARATION

I hereby declare that Technical Report entitled “BOOLEAN ALGEBRA AND


ITS APPLICATION” is Based on my Seminar course (course code MMS13) and
has been written by me under the supervisor of Dr. R.K. PANDEY, Professor,
Department of Mathematics & computer Science, School of Basic Science, Babu
Banarasi Das University, Lucknow. This work has not been previously formed the
basis for the award of any degree of diploma or certificate nor has been submitted
elsewhere for the award of any degree of diploma. Further, the content of this
report is not being presented by any other student to this or any other University
for the award of a degree.

KOMAL MISHRA
M.Sc. (Mathematics)-Third Semester (2021-
22) University Roll No.

29 November 2021
CERTIFICATE

Certified that the Technical Report entitled “BOOLEAN ALGEBRA AND ITS
APPLICATION” based on the Seminar (Course Code MMS13), is a bonafide work
carried out by KOMAL MISHRA Student of M.Sc. (Mathematic)-Third Semester
(University Roll No.1201080004) under my supervisor in partial fulfillments for the
award of the degree of Master Science in mathematics of Babu Banarasi Das
University, Lucknow, Uttar Pradesh India.

Dr. R. K. Pandey
Professor

29 November 2021
CONTENTS
1 INTRODUCTION
2 NOTATION, SYMBOLS AND OPERATIONS
3 LAWS OF BOOLEAN ALGEBRA

i. USE OF BRACKETS
ii. NAND GATES
4 READING A COMPOUND STATEMENT GIVEN ITS TRUTH TABLE
a. MANIPULATION OF COMPOUND BOOLEAN STATEMENTS
b. SIMPLIFICATION OF COMPOUND BOOLEAN STATEMENTS
c. APPLICATIONS TO THE DESIGN OF LOGIC CIRCUITS
5 BOOLEAN ALGEBRA: SUMMARY OF IMPORTANT SKILLS
2. BOOLEAN ALGEBRA
INTRODUCTION

We introduced binary numbers and binary arithmetic. As you


saw in binary arithmetic and in the handling of floating-point
numbers, there is a need for accurate specification of
procedures and schemes for manipulating and interpreting
binary numbers! This chapter will begin to address how binary
numbers are manipulated in a systematic manner by a
computer. The principles of such manipulation are called
Boolean Algebra, which is the foundation of digital logic circuit
design and analysis. This algebra is conceived to handle
variables, known as statements, each of which can take on one
of two values, and on which operations are performed
according to prescribed rules.

For example, let us model our thinking processes in the adding


of two binary digits. A brief examination of this simple problem
leads us to consider all possible cases, since there are not too
many of them. The two binary (input) digits will be called A 0 and
B0. The result (output) of the addition is represented by a sum-
bit and a carry-bit, which we shall call S 0 and C1, respectively.
There are four possibilities of combinations of the two binary
inputs. For each of these possibilities, we will specify the
outputs:
Inputs
OutputsA0 B0 C 1 S0
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0

This table represents all that one needs to know about the
specific task of adding exactly two (not more!) single-digit
binary numbers. We can now examine and attempt to describe
the functional (see a later chapter for a formal definition of a
“function”), relationship between the inputs and outputs. A little
thought will lead to the following conclusions:
C1 is 1 only if both A0 and B0 are 1, otherwise it is 0
S0 is 1 only if either A0 or B0 are 1, but not both
In this chapter, we will introduce algebraic operators, such as
“and”, “or”, “not” and “exclusive-or”, which allow us to
systematically build such sets of functional specifications. For the
simple case of two single-digit binary numbers, this may not seem
necessary, but becomes very useful even for slightly more complex
situations. The example below (called the “full-adder”, briefly
explained in the previous chapter), brings only one more variable,
the carry digit from the next-less-significant binary addition
operation, so that now we are adding exactly three single-digit
binary numbers, represented by Ai, Bi , and Ci. Now we need to
consider 8 possible cases of input, because 23 = 8. We still need
only 2 output bits, because the sum of three single-digit binary
numbers can be no more than 3, which is represented by Ci+1=1
and Si=1. How shall we organize the eight cases? The simplest and
most convenient way is to count from 0 to 7, arranging the input
digits to represent the case- number, as shown in the table below:

Inputs Outputs
Case # Ai Bi Ci Ci+1 Si
0 0 0 0 0 0
1 0 0 1 0 1
2 0 1 0 0 1
3 0 1 1 1 0
4 1 0 0 0 1
5 1 0 1 1 0
6 1 1 0 1 0
7 1 1 1 1 1

In this full-adder example, the specification of the output is much


more laborious and complicated than in the previous two-digit
example:
Si := 1 if [(Ai is 0) and (Bi is 0) and (Ci is 1)]
or [(Ai is 0) and (Bi is 1) and (Ci is 0)]
or [(Ai is 1) and (Bi is 0) and (Ci is 0)] Note the
or [(Ai is 1) and (Bi is 1) and (Ci is 1)] two levels
of brackets

Ci+1 := 1 if [(Ai is 0) and (Bi is 1) and (Ci is 1)]


or [(Ai is 1) and (Bi is 0) and (Ci is 1)]
or [(Ai is 1) and (Bi is 1) and (Ci is 0)]
or [(Ai is 1) and (Bi is 1) and (Ci is 1)]

Of course, one can also look for logical patterns in such a set of
specifications, such as:

Ci+1 := 1 if [(Ai is 0) and (Bi is 1) and (Ci is 1)] or


[(Ai is 1) and [(Bi is 1) or (Ci is 1)]]
Note the three levels of brackets.

There are several possible representations of each of S i and Ci+1.


Efficient representation, simplification and manipulation of logical
expressions such as these is the main subject of this chapter on
Boolean Algebra.

NOTATION, SYMBOLS AND OPERATIONS

PRIMITIVE STATEMENT: Typically, capital letters (such as A,B,C)


denote statements (also called variables). In a logic circuit, a
statement could mean that a voltage at a designated point is above
a certain threshold level. We assign to A, the value of 1 when A is
true, namely when the voltage is above the threshold level, and the
value of 0 when A is false, namely when the voltage is below the
threshold level. Symbolically, we write A = 1 or A = 0. Some texts
use the symbols T and F instead of 1 and 0.
There are three basic operations known as NOT, AND and OR. As
well, there is an additional commonly-used operation known as
the exclusive-OR (also called the “half-adder”), which can be
expressed in terms of the three basic operations. We will define
these operations, introduce the notation used in Boolean algebra
and give the graphical symbols used in logic circuits.

NOT: (for example “NOT A”; written as A’ orA) This operation on


A simply inverts the assignments of 1 and 0.

AND: (for example “A AND B”; written as AB): This operation


compares the values of A and B and assigns 1 as a result if both A
and B are true or 0 if A or B or both A and B are false.

OR: (for example “A OR B”; written as A+B, meaning “A or B or


both”): This operation compares the values of A and B and assigns
1 as a result if A is true or B is true or both are true, and assigns 0
if both A and B are false.

These definitions are summarized below in a special kind of table


known as a Truth Table. Each line (row) of a truth table specifies
the output “truth value” for a particular combination of truth
values of the input Boolean statements (variables).

A A' A B AB A+B
0 1 0 0 0 0
1 0 0 1 0 1
1 0 0 1
1 1 1 1

Note the similarities to familiar arithmetic operations. It is also


crucial to note the difference: 1+1 = 1 and not 10, (or 0 if one
drops the leading 1 as one would in modulo 2 (binary arithmetic).
There are related differences in the associated algebra: A + A = A; 1
+ A = 1; AA = A.
A commonly-used derived operation, Exclusive OR, is defined as
follows.

EXCLUSIVE OR, or XOR, also known as the Half-adder : (for example


“A EXCLUSIVE-OR B”; written as AB, meaning “A or B but not
both”). This operation compares the values of A and B and assigns
1 as a result if A or B (but not both), is true and assigns 0 if both A
and B are true or both A and B are false. The truth table equivalent
of the definition is:

A B AB
0 0 0
0 1 1
1 0 1
1 1 0

We call this a derived operation because, as is demonstrated in the


truth table below, it can be written as a combination of basic
operations, namely,

AB = A’B + AB’.

A B A’ B’ A’B AB’ A’B+AB’


0 0 1 1 0 0 0
0 1 1 0 1 0 1
1 0 0 1 0 1 1
1 1 0 0 0 0 0

COMPOUND STATEMENT: A compound statement is one that can be


written as a combination of primitive statements. The XOR
operation is an example of a compound statement.
LOGIC GATE SYMBOLS: These are symbols for integrated circuits,
known as gates, which carry out the electrical equivalents of
Boolean operations. Inputs and outputs consist of voltages. When
voltages are above or below a preset threshold level, then these
are equivalent to the Boolean values of 1 or 0.

DERIVED
BASIC OPERATIONS OPERATION
NOT AND OR XOR
AA' A A A
B AB B A+B B A'B + AB'

Also NAND A
B'
AB’
(AB)'
knownas A A'
AB

B A’B
B

an inverter
made from an AND gate and an inverter XOR circuit made up of
NOT, AND and OR gates
One way of looking at the two basic connectives, AND and OR, is to
use the switch analogy. We have two switches, p and q, which
control a light bulb. If these two switches are in series, then they
must both be closed if the bulb is to light. This is p and q (pq). If the
two switches are in parallel, then if either one or both are on, the
bulb will light. This is p or q (p+q).

and: or:
pqp

stable switch, an input “p” can be stably connected to either of two output lines, one
“p” and the other called “not-p”.(Notethatthe symbolismpmeansthe
as p’.)
LAWS OF BOOLEAN ALGEBRA

Each of the laws stated below can be proven through the use of
truth tables. These should be examined carefully. While some of
them are the same as the laws of ordinary algebra, some of them
are not. In particular, one should note De Morgan’s laws, the first
distribution law, the idempotency laws, the first domination law
and the absorption laws.

1. A''=A Double Complement


2. (AB)' = A'B' De Morgan
(AB) ' = A'B'
3. AB = BA Commutation
AB=BA
4. (AB) C = ABC) Association
(AB) C = ABC)
5. ABC) = (AB)AC) Distribution
ABC ) = (AB)  AC)
6. AA=A Idempotency
AA=A
7. A=A Identity
A1=A
8. AA' = 1 Inverse
AA' = 
9. A1= 1 Domination
A= 
10. A AB) = A Absorption
AAB) = A

For example, in Boolean Algebra, the first distribution law


indicates that 1 + (1)(1) is equivalent to (1 + 1)(1 + 1) = (1)(1) = 1,
while in ordinary algebra, 1+(2)(3) = 7 is not equivalent to (1+2)
(1+3) = (3)(4) = 12.
As an example, we prove De Morgan’s laws.

A B A’ B’ A+B (A+B)’ A’B’ AB (AB)’ A’+B’


0 0 1 1 0 1 1 0 1 1
0 1 1 0 1 0 0 0 1 1
1 0 0 1 1 0 0 0 1 1
1 1 0 0 1 0 0 1 0 0

THE PRINCIPLE OF DUALITY


Except for the law of double complement, all of the above laws
appear in pairs. The pairs are called duals of each other.

In general, given any compound statement S, one can obtain its


dual Sd as follows:
 Replace each AND by an OR and each OR by an AND.
 Replace each 0 by a 1 and each 1 by a 0.

Example: If S = AB’C’ + A’BC,


then Sd = (A + B’ + C’)(A’ + B + C).
Note: There is no reason in general to expect S to equal Sd.
There is also no reason in general to expect S to be the
negation of Sd.
USE OF BRACKETS
Without brackets, the order of operations is negation (‘),
conjunction (and) and finally, disjunction (+). Brackets should be
used whenever we wish to change the order or where there could be
any ambiguity of interpretation. Where there are sets of nested
brackets, operations on pairs of inner brackets are executed ahead
of those on pairs of outer brackets. For example, the meaning of
P+Q’ is "P or (not Q)" while (P+Q)’ means "not (P or Q)".

Note that the variables A,B,C, … P,Q can each represent any
Boolean expression (single variable or compound statement).
It can be shown, by using the Laws of Boolean Algebra, that the
XOR operation is commutative and associative, namely that:
AB = BA and that A(BC) = (AB)C. We can therefore
without loss of clarity omit the brackets and write ABC.

A(BC)
= A’(BC’ + B’C) + A(BC’ + B’C)’ definitions
= A’(BC’ + B’C) + A[(BC’)’ (B’C)’] deMorgan
= A’(BC’ + B’C) + A[(B’+C) (B+C’)]deMorgan
= A’(BC’ + B’C) + A[B’B+B’C’+CB+CC’] distributive
= A’(BC’ + B’C) + A[0+B’C’+CB+0]inverse
= A’(BC’ + B’C) + A[B’C’+CB] identity
= A’BC’ + A’B’C + AB’C’+ABC distributive
= A’BC’ + AB’C’ + A’B’C + ABC commutative
= (A’B + AB’)C’ + (A’B’ + AB)C distributive
= (AB)C’ + (AB)’C definitions

Note: it can be easily shown that*:


(AB)’ = (A’B+AB’)’ = A’B’ + AB.

* In our treatment on logic we will define the derived operation “if and only if” with a special
symbol , so that (AB)’ = AB
NAND GATES

It should be noted that the most common integrated circuit


implementation of logic gates is through the interconnection of
what are known as NAND gates since these have the best
operational performance characteristics. A NAND gate has the
same symbol as the AND gate with the addition of a small circle at
the front end. It implements (AB)’. We now show how each of the
four Boolean operations can be realized using NAND gates alone.

Note that a NAND gate with both inputs connected together (left-
most column) behaves as an inverter.

NOT AND OR XOR


A A'

A
A A'
B'
(AB’)'
which is A (AB)'
AB

B (AB)'' = AB B B' (A’B)'


(A'B')' = A+B
B
the same

as
A A'

AB = ((AB)’)’ A+B = (A’B’)’ (A’B+AB’) =


(by double- (by deMorgan) (A’B+AB’)’’ =
negation) [(A’B)’(AB’)’]’
sMANIPULATION OF COMPOUND BOOLEAN
STATEMENTS

Manipulation of compound Boolean statements using the laws of


Boolean algebra is a critical skill in computer engineering.
Function specifications, such as in the examples above, need to be
converted into specific formats for implementation in digital logic,
and in general need to be simplified for efficiency.

The Boolean “AND-then-OR” format consists of a Boolean “sum”


of terms, each of which is a Boolean “product” of (possibly-
negated) primitive statements. The result of Example 1 above is in
AND-then- OR1 format:

F = A’B’C + A’BC’ + AB’C’ + ABC.

This is a form suitable for representation in a circuit of AND gates


followed by OR gates (AND gates whose outputs are then
connected by OR gates.)
A' A'B'C

B' A'BC'

C' AABBC’C' ’

ABC

1 When each Boolean “product” term contains all of the available variables, in this case A,B and C,
then it is called a Boolean “sum of products”.
The initial result of Example 2, G’ = A’B’C’ + ABC’, is also a AND-
then- OR result for the function G’ (not for G). We could obtain the
AND- then-OR result for G by using the laws of logic: G = [(A’B’ +
AB)C’]’
G = (A’B’)’(AB)’ + C (deMorgan)
G = (A+B)(A’+B’)+C (deMorgan)
G=AA’+AB’+A’B+BB’+C (Distributive)
G=0+AB’+A’B+0+C (Inverse)
G=AB’+A’B+C (Identity)
This is in AND-then-OR format.

There are at least two other important formats for digital logic
design, the Boolean “OR-then-AND” and NAND formats. Boolean
functions can be converted between these various formats using
the laws of logic. Note that, although these are different
representations of the same function, the three formats are
logically equivalent (the truth table for the function remains the
same).
In the Boolean OR-then-AND format, the function is represented
as a simple Boolean “product” of parenthesized expressions, each
of which is a Boolean “sum” of (possibly-negated) primitive
statements.

For example, one can convert the above AND-then-OR result for G’
in Example 2, into OR-then-AND format for G (not G’) as follows:

G’ = A’B’C’ + ABC’
G’’ = (A’B’C’ + ABC’)’ (negation of both sides)
G = (A’B’C’ + ABC’)’ (double negation)
G = (A’B’C’)’(ABC’)’ (deMorgan)
G = (A+B+C)(A’+B’+C) (deMorgan)
This is the result for G in OR-then-AND format.

One could also have converted the result of Example 1 into OR-
then-AND format, by working from the 0’s, as follows:

F’ = A’B’C’ + A’BC + AB’C + ABC’


F’’ = (A’B’C’ + A’BC + AB’C + ABC’)’ (negation)
F = (A’B’C’ + A’BC + AB’C + ABC’)’ (double-negation)
F = (A’B’C’)’(A’BC)’(AB’C)’(ABC’)’ (deMorgan)
F = (A+B+C)(A+B’+C’)(A’+B+C’)(A’+B’+C) (deMorgan)
This is the result for F in OR-then-AND format.

One can of course, reverse the process to convert a OR-then-


AND to a AND-then-OR.
F = (A+B+C)(A+B’+C’)(A’+B+C’)(A’+B’+C)
F = ((A’B’C’)’(A’BC)’(AB’C)’(ABC’)’) (deMorgan)
F = (A’B’C’ + A’BC + AB’C + ABC’)’ (deMorgan)
At this point, one notes that the negation of this AND-then-OR
expression consists of the other four terms that appear in an eight-
row truth table. We thus have: F = A’B’C + A’BC’ + AB’C’ + ABC.
As mentioned above, it is often useful to convert Boolean functions
into a form where they can be implemented using only NAND
operations (gates). Note that this format involves only AND and
NOT operations. If we inspect the two examples of derivations
toward OR-then-AND above, we will see that in each case the next-
to-last line is in a format convenient for conversion and
implementation by 3-input NAND gates. To complete the
conversion:

G = (A’B’C’)’(ABC’)’
G = [[(A’B’C’)’(ABC’)’]’]’ (double-negation)

A A'

[(A’B’C’)’(ABC’)’]’
(A'B'C')'
[(A'B'C')'(ABC')']'
B B'
G

(ABC')'

C
C'

Note that we have used 7 gates. It is possible to realize G using


only six gates.

G = (A’B’C’)’(ABC’)’
G’ = A’B’C’ + ABC’ = (A’B’ + AB)C’ (DeMorgan,distrib’ve)
G = (A’B’ + AB)’ + C (negation, De Morgan)
G=A’B+AB’+C (See page 2.10)
G = [A’B + AB’ +C]’’ (double-negation)
G = [(A’B)’(AB’)’C’]’ (DeMorgan)

The drawing of the circuit is left as an exercise.


Interrelationship among the different formats:

Consider the example of a Boolean function F = A’B’C + ABC. F and


its negation F’ can be expressed in various formats. The
relationships between several of them is mapped out below.
Notice the simple Boolean operations which interrelate them.

Sum of Products Format


F = [(A’B’C) + (ABC)]

DeMorgan
(inner brackets) double negation

F = [(A+B+C')' +
(A’+B’+C')'] F = F’’ = [(A’B’C) + (ABC)]’’

deMorgan deMorgan

NAND Format
F = [(A+B+C')(A’+B’+C')]' F = [(A’B’C)'(ABC)']'
deMorgan
(inner brackets)

negation

Product of Sums Format


F’ = [(A+B+C')(A’+B’+C')]
The same type of analysis can be done for F’. For example, when F
= A’B’C + ABC as above, F’ simply consists of the minterms not
included in F:
F’ = A’B’C’ + A’BC’ + A’BC + AB’C’ + AB’C + ABC’ In this
case, the interrelationships for F’ are:

Sum of Products Format


F’ = [(A’B’C’) + (A’BC’) + (A’BC) + (AB’C’) + (AB’C) + (ABC’)]

DeMorgan
(inner brackets) double negation

F’ = [(A+B+C)’ + (A+B’+C)’ + (A+B’+C’)’ + F’ = [F’]’’ = [(A’B’C’) + (A’BC’) + (A’BC)


(A’+B+C)’ + (A’+B+C’)’ + (A’+B’+C)’] + (AB’C’) + (AB’C) + (ABC’)]’’

deMorgan deMorgan

NAND Format
F’ = [(A+B+C) (A+B’+C) (A+B’+C’) F’ = [(A’B’C’)’(A’BC’)’(A’BC)’
(A’+B+C) (A’+B+C’) (A’+B’+C)]’ deMorgan+ (AB’C’)’(AB’C)’(ABC’)’]’
(inner brackets)
negation

Product of Sums Format


F = [(A+B+C) (A+B’+C) (A+B’+C’)
(A’+B+C) (A’+B+C’) (A’+B’+C)]
SIMPLIFICATION OF COMPOUND BOOLEAN STATEMENTS
In most cases, one should attempt to simplify compound
statements, if for no other reason than to ensure that a minimum
amount of digital logic can be used to implement these statements.
For the purposes of this course, we will define simplification to
mean that after the manipulation fewer primitives appear in the
expression. Any skills gained in doing this are transferable to the
simplification of compound logic statements or of compound set
operations, since the rules governing these are identical to those of
Boolean algebra.

Simple examples are:

i. F=AB+AB’
= A(B + B’) (Distributive)
= A(1) (Inverse)
=A (Identity)

ii. F = A’B’C + ABC can be simplified a bit since


F = (A’B’ + AB)C (Distributive) reducing the number
of primitives from six to five.

iii. F = A + A’B doesn’t look as if it can be simplified – but it can.


An easy way of doing this is use the distribution law with
respect to “+” and write
F=(A+A’)(A+B)
= (1)(A + B) (Inverse)
= (A + B) (Identity)
Another way is to write
F = A + AB + A’B (since A = A + AB by Absorption)
= A + (A + A’)B (Distributive)
= A + (1)B (Inverse)
=A+B (Identity)

iv. F = A’B’ + AB cannot be simplified.


One problem is to know when the statement has been minimized,
namely it can be simplified no more. This is not always obvious,
particularly when the number of variables (or primitive
statements) is large. Further, the solution is not always unique.

The approach we will follow here is useful where Boolean


statements contain up to four variables. It leads into techniques,
such as Karnaugh maps, which will be presented in courses on
logic circuits, and which are useful for statements containing up to
five or six variables. This technique is based on the Boolean AND-
then- OR form discussed above.

What we do is rewrite the statement as a “Boolean sum” of what


are called minterms. A minterm for a compound statement
containing n variables or primitives consists of a “Boolean
product” of n variables. For example, if there are four variables,
then AB’CD’ is a minterm while ABC is not. In the industry, this is
called a “sum-of- products expansion”.

There are two ways of rewriting a given expression as a sum of


minterms. The first way involves the use of the inverse law and of
distribution with respect to the AND (Boolean product) operation.
For example,
F=A+B
= A(B+B’) + (A+A’)B (Identity, Inverse)
=AB+AB’+AB+A’B (Distributive)
=AB+AB’+A’B (Idempotent)

The second way is to write the truth table for the given statement
F, and then read off the values of the variables that make F true,
namely, a truth-value of 1.
For our simple example:

A B F=A+B
0 0 0
0 1 1
1 0 1
1 1 1

F = A’B + AB’ + AB. Note that the technique for reading


specification tables, presented in Section 2.4, generates
minterms.
Once an expression has been converted into its minterms,
simplification (and determination whether any simplification is
available) is relatively straightforward.

Test for determining whether or not a sum of minterms can be


simplified

 It is sometimes possible to simplify sums of minterms through the


use of brackets, e.g., A’B’C + ABC = (A’B’ +AB)C.

 It is sometimes possible to simplify sums of minterms through the


use of the laws of Boolean algebra, for example,
AC + A’BC = A(B’ + B)C + A’BC
= AB’C + ABC + A’BC (sum of minterms)

Now one can recognize that minterms may be repeated, using the
idempotent law. This is done in order to group the repeated
minterm with other minterms, in order to remove literals.

= AB’C + ABC + ABC +A’BC = (AB’C + ABC) + (ABC +A’BC)


= A(B’ +B)C + (A + A’)BC
= AC+BC=(A+B)C.

 A’B’C’ + ABC cannot be simplified at all.

In order to determine if any simplification can take place, we


convert the minterms to ordered strings of 0’s and 1’s. The three
examples given above become:
First example Second example Third example
A’B’C 001 AB’C 101 A’B’C’ 000
ABC 111 ABC 111 ABC 111
A’BC 011
The third 1 is in The third 1 is in There is nothing in
common. This common (Bracket). common. Nothing
means that a bracket First and second can be done.
can be used. minterms differ by
one digit. Second
and third minterms
differ by one digit.
Simplification is
possible as shown
above.

Simplification test for minterms: An expression whose minterms


have nothing in common cannot be simplified.
Examples of the simplification of Boolean statements

The laws of Boolean algebra are available for the simplification of


Boolean statements.

Example 1: Simplify F = A + A’B + A’B’C.

Rewriting as minterms, directly from the functional expression


above, we have:
F= A(B + B’)(C + C’) + A’B(C + C’) + A’B’C
= ABC + ABC’ + AB’C + AB’C’ + A’BC + A’BC’ + A’B’C This

can be simplified substantially.

We have already shown a few pages ago that A + A’B = A + B.

We can reuse this result here as follows:


F=A+A’B+A’B’C=A+A’(B+B’C)=A+A’(B+C)
=A+B+C

Alternatively, we could have constructed the truth table from the


original expression, F = A + A’B + A’B’C:

A B C F
0 0 0 0
0 0 1 1 A’B’C
0 1 0 1 A’B
0 1 1 1
1 0 0 1
1 0 1 1 A
1 1 0 1
1 1 1 1

then examined the truth table and noticed that F’ = A’B’C’, so that F
= (A’B’C’)’ = A + B + C (by De Morgan).
Example 2: Simplify F = AB+A’C+BC
One could construct the minterms in the usual ways: by truth table
and/or by expansion of the three terms AB, A’C, BC.

Writing the truth table we have:


A B C A’ AB A’C BC F Here we note that the final
0 0 0 1 0 0 0 0 result consists of:
0 0 1 1 0 1 0 1 F =A’B’C+A’BC+ABC’+ABC
0 1 0 1 0 0 0 0 which can be simplified as
0 1 1 1 0 1 1 1 follows:
1 0 0 0 0 0 0 0 =A’(B’+B)C+AB(C’+C)
1 0 1 0 0 0 0 0 = A’C+AB
1 1 0 0 1 0 0 1
1 1 1 0 1 0 1 1
Here, since column F contains as many 0’s as 1’s, there would be
no advantage in proceeding to find F’ and converting it to F.

Example 3: Given the following truth table, find and simplify the
Boolean expression.

A B C D F Reading off the minterms, we get:


0 0 0 0 0 F = A’B’CD + A’BCD’ + A’BCD
0 0 0 1 0 + AB’CD + ABCD’ + ABCD.
0 0 1 0 0
0 0 1 1 1 This can be simplified.
0 1 0 0 0 F = (A’ + A)(B’CD + BCD’ + BCD)
0 1 0 1 0 = B’CD + BCD’ + BCD
0 1 1 0 1 = B’CD + BCD + BCD’ + BCD
0 1 1 1 1 = (B’ + B)CD + BC(D’ + D)
1 0 0 0 0 =CD+BC=C(B+D)
1 0 0 1 0
1 0 1 0 0
1 0 1 1 1
1 1 0 0 0
1 1 0 1 0
1 1 1 0 1
1 1 1 1 1
FROM WORDS TO GATES:

Word descriptions of the task or operation

Word descriptions using AND, OR, NOT, brackets

Other Truth table Boolean AND-then-OR Boolean OR-then-AND

formats

minterms NAND
format

Manipulation, simplification, using laws of Boolean Algebra

Don’t cares

Implementation of log ic circuit using logic gates


APPLICATIONS TO THE DESIGN OF LOGIC CIRCUITS
The Full Adder
Recall that in Chapter 1, and again at the beginning of this Chapter,
we examined the addition of binary numbers. We repeat here the
example of the addition of 1003 and 501. The techniques
introduced in this chapter are well-suited to completing the task
that we started.
Addition
11 10 9 8 7 6 5 4 3 2 1 0 Column number
0 1 1 1 1 1 1 1 1 1 1 0 Carry digit - C
0 0 1 1 1 1 1 0 1 0 1 1 First number - A 1003
0 0 0 1 1 1 1 1 0 1 0 1 Second number - 501
B
0 1 0 1 1 1 1 0 0 0 0 0 Sum - S 1504

We indicated that the ith digit Si , (represented by the column


number), of the sum of two binary numbers, A and B, was:
 Si = 1 whenever the values of one member of the triplet (Ci, Ai,
Bi) is a 1, with the other two members being 0’s, or whenever
all three members of the triplet (Ci, Ai, Bi) are 1’s. Otherwise Si
= 0.
The value Ci is the result of the carry
operation determined from the full add operation of the
previous (next-less-significant) column.
 The carry value for the next column, Ci+1 = 1 whenever at least
two of the triplet (Ai, Bi, Ci) are 1’s. In other words,
either two of the triplet are 1’s with the third being 0, or all
three of the triplet are 1’s. Otherwise Ci+1 = 0.
These specifications were summarized in Section 2.1, and are
repeated here: Inputs Outputs
Case # Ai Bi Ci Ci+1 Si
0 0 0 0 0 0
1 0 0 1 0 1
2 0 1 0 0 1
3 0 1 1 1 0
4 1 0 0 0 1
5 1 0 1 1 0
6 1 1 0 1 0
7 1 1 1 1 1
We will now express these specifications as a sum of minterms
(method 3), beginning with the word statements given in Section
The variables Ai, Bi, Ci are considered to be inputs; the
variables Si and Ci+1 are considered to be outputs.

Si := 1 if [(Ai is 0) and (Bi is 0) and (Ci is 1)]


or [(Ai is 0) and (Bi is 1) and (Ci is 0)]
or [(Ai is 1) and (Bi is 0) and (Ci is 0)]
or [(Ai is 1) and (Bi is 1) and (Ci is 1)]

Ci+1 := 1 if [(Ai is 0) and (Bi is 1) and (Ci is 1)]


or [(Ai is 1) and (Bi is 0) and (Ci is 1)]
or [(Ai is 1) and (Bi is 1) and (Ci is 0)]
or [(Ai is 1) and (Bi is 1) and (Ci is 1)]

Now, with the techniques and notations introduced in this chapter,


we are ready to translate these word specifications into the
language of Boolean logic, so that they can be implemented in logic
gates. In Boolean notation, these conditions become:

Si = A’i B’i Ci + A’i Bi C’i + Ai B’i C’i + Ai Bi Ci

Ci+1 = Ai Bi C’i + Ai B’i Ci + A’i Bi Ci + Ai Bi Ci

The first expression as stated, requires 11 2-input AND and OR


operations, (eight 2-input AND gates and three 2-input OR gates),
in addition to 3 inverters, and as a result, 14 logic gates to realize
it. One of several possibilities for simplification is to reorder the
terms and rewrite it as:

Si = Ai B’i C’i + A’i Bi C’i + A’i B’i Ci + Ai Bi Ci


= (Ai B’i C’i + A’i Bi C’i) + (A’i B’i Ci + Ai Bi Ci) Si =
(Ai B’i + A’i Bi )C’i + (A’i B’i + Ai Bi ) Ci

We now let Di = (Ai B’i + A’i Bi ), and recognize it as the Bi.


exclusive OR, namely Di = Ai  We have shown earlier that
Di’ = (A’i B’i + Ai Bi ), which also appears in the expression (ahead of
Ci).

The realization of this using AND and OR gates is shown


below.

A D=A'B +AB'
D

B
S

We have used six gates to realize this.

If, in addition, we have available the XOR gate, we can rewrite it as:
Si = (Ai  Bi ) Ci’ + (Ai  Bi )’ Ci = (Ai  Bi ) Ci
= Ai  Bi  Ci.

We now consider the second expression:

Ci+1 = Ai Bi C’i + Ai B’i Ci + A’i Bi Ci + Ai Bi Ci .

The ABC term can be grouped with each of the 3 previous


terms, so that:
Ci+1=(Ai Bi C’i+Ai Bi Ci)+(Ai B’i Ci+Ai Bi Ci)+(A’i Bi Ci+Ai Bi Ci)
= Ai Bi (C’i + Ci ) + Ai (B’i + Bi ) Ci + (A’i + Ai )Bi Ci
= Ai Bi + Ai Ci + Bi Ci = Ai Bi +(Ai + Bi )Ci
 a reduction from 14 to 4 operations.

Alternately, if XOR gates are used, we can rewrite it as:

Ci+1 = (Ai B’i Ci + A’i Bi Ci) + (Ai Bi C’i + Ai Bi Ci)


= (AiBi’+Ai’Bi)Ci+AiBi(Ci’+Ci) = (Ai Bi) Ci + Ai Bi
This would allow us to use the results of one of the half-adders
used in representing Si.
The circuit to implement the full adder is shown below. What is
not shown are the timing circuits that move the register
connections from one digit to the next.

 ith digit
(A B)C+AB

 C S
(A B)C
(i+1)th digit

B  
A B C

A B
AB
A

The Full Adder Circuit


BOOLEAN ALGEBRA: SUMMARY OF IMPORTANT SKILLS

 Specifications in words and their translation into Boolean


logic
 AND, OR, NOT, XOR operations
 Logic gate symbols and interconnection
 NAND gates
 The Laws of Boolean Algebra (in dual pairs)
 Reading specification (truth) tables
 Manipulation of Boolean statements using the Laws
 3 formats: sum-of-products, product-of-sums, NAND
 Simplification of Boolean statements
 The Full Adder: algebraic description and implementation in
gates
 The use of the “don’t-care” conditions
REFERENCE

Ben Goertzel (1994). Chaotic logic: language, thought, and reality from the perspective of
complex systems science. Springer.p. 48.ISBN 978-0-306-44690-0.
Halmos, Paul (1963). Lectures on Boolean Algebras.vanNostrand.
Bacon, Jason W. (2011). "Computer Science 315 Lecture Notes". Retrieved October 1, 2021.
O'Regan, Gerard (2008). A brief history of computing.Springer.p. 33.ISBN 978-1-84800-
083-4.
"Elements of Boolean Algebra". www.ee.surrey.ac.uk. Retrieved 2020-09-02.
 For bitwise operations in computer programming, it may be helpful to read 1 as 0xFFFF.
All bits of the binary number must be 1.
McGee, Vann, Sentential Calculus Revisited: Boolean Algebra (PDF)
 *Goodstein, R. L. (2012), "Chapter 4: Sentence Logic", Boolean Algebra, Courier Dover
Publications, ISBN  9780486154978
Steven R. Givant; Paul Richard Halmos (2009). Introduction to Boolean algebras.Springer.
pp.  21–22. ISBN  978-0-387-40293-2.
Venn, John (July 1880). "I. On the Diagrammatic and Mechanical Representation of
Propositions and Reasonings" (PDF).The London, Edinburgh, and Dublin Philosophical
Magazine and Journal of Science. 5. 10 (59): 1–18. doi:10.1080/14786448008626877. Archived
(PDF) from the original on 2017-05-16.[1][2]
Shannon, Claude (1949). "The Synthesis of Two-Terminal Switching Circuits".Bell System
Technical Journal.28: 59–98. doi:10.1002/j.1538-7305.1949.tb03624.x.
Koppelberg, Sabine (1989). "General Theory of Boolean Algebras".Handbook of Boolean
Algebras, Vol. 1 (ed. J. Donald Monk with Robert Bonnet). Amsterdam: North Holland.
ISBN 978-0-444-70261-6.
McCune, William; Veroff, Robert; Fitelson, Branden; Harris, Kenneth; Feist, Andrew; Wos,
Larry (2002), "Short single axioms for Boolean algebra", Journal of Automated Reasoning, 29
(1): 1–16, doi:10.1023/A:1020542009983, MR 1940227, S2CID 207582048
Allwood, Jens; Andersson, Gunnar-Gunnar; Andersson, Lars-Gunnar; Dahl, Osten (1977-
09-15). Logic in Linguistics.Cambridge University Press.ISBN 978-0-521-29174-3.
Hausman, Alan; Howard Kahane; Paul Tidman (2010) [2007]. Logic and Philosophy: A
Modern Introduction. Wadsworth Cengage Learning.ISBN 978-0-495-60158-6.
Girard, Jean-Yves; Paul Taylor; Yves Lafont (1990) [1989]. Proofs and Types. Cambridge
University Press (Cambridge Tracts in Theoretical Computer Science, 7). ISBN 978-0-521-
37181-0.
 Not all search engines support the same query syntax. Additionally, some organizations
(such as Google) provide "specialized" search engines that support alternate or extended syntax.
(See e.g.,Syntaxcheatsheet, Google codesearch supports regular expressions).
Doublequote-delimited search terms are called "exact phrase" searches in the Google
documentation.

You might also like