"Boolean Algebra and Its Application": Master of Science
"Boolean Algebra and Its Application": Master of Science
"Boolean Algebra and Its Application": Master of Science
Master Of Science
IN MATHEMATICS
By
KOMAL MISHRA
Under the guidance of
DR. R.K. PANDEY
Master Of Science
IN MATHEMATICS
By
KOMAL MISHRA
Under the guidance of
DR. R.K. PANDEY
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.) under my supervisor in partial fulfillments for the award of the
degree of Master Science in mathematic of Babu Banarasi Das University, Lucknow,
Uttar Pradesh India.
29 November 2018
1.
CONTENTS
o INTRODUCTION
o USE OF BRACKETS
o NAND GATES
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 A 0 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
Of course, one can also look for logical patterns in such a set of
specifications, such as:
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
A B AB
0 0 0
0 1 1
1 0 1
1 1 0
known A
(AB)' B
A'
A’B
and: or:
p q p
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.
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:
AB = BA and that A(BC) = (AB)C. We can therefore
without loss of clarity omit the brackets and write ABC.
A(BC)
= 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
= (AB)C’ + (AB)’C definitions
* In our treatment on logic we will define the derived operation “if and only if” with a special
symbol , so that (AB)’ = AB
NAND GATES
A
B'
A A' (AB’)'
which is A
B
(AB)'
(AB)'' = AB B'
A'
(A’B)'
AB
B (A'B')' = A+B
the same B
as
A A'
Inputs Output
A B C F
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
A B C G
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 1
B' A'BC'
B
C' AABBC’C' ’
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.
One could also have converted the result of Example 1 into OR-
then-AND format, by working from the 0’s, as follows:
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'
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)
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
DeMorgan
(inner brackets) double negation
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)]’ + (AB’C’)’(AB’C)’(ABC’)’]’
deMorgan
(inner brackets)
negation
i. F = AB + AB’
= A(B + B’) (Distributive)
= A(1) (Inverse)
=A (Identity)
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
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
Example 3: Given the following truth table, find and simplify the
Boolean expression.
NAND
minterms
format
Don’t cares
D = A'B + AB'
A D
B
S
C S
(AB)C (i+1)th digit
ABC
B
AB
AB
A
5 status lights
indicating
sound volume
So, given that there are 5 lights, and 6 levels, we will need more
than 2 bits to represent the 6 different input sound levels.
Therefore, we will need 3 bits, but we won’t need to use all 8
possible patterns that can be represented in 3 bits.
Therefore, we devise a series of five status conditions, S1
through S5, which are coded in binary as shown in the table
below. As such the values A, B, and C are to be considered as
inputs to the logic circuit. We wish to design a logic circuit that
allows a series of five lights L1 through L5, to be turned on
according to the following specifications. Status S1 will result
in L1 being turned on; status S2 will result in both L1 and L2
being turned on, etc., and finally, status S5 will result in all five
lights being turned on. There is an assumed sixth specification
in that if none of the status conditions occur, we do not want
any of the lights turned on.
You will note that the table contains all possible three-digit
binary numbers, of which there are eight. We only need the six
that correspond to the six status conditions. The remaining
two correspond to “don’t care” conditions. There will not be an
input signal corresponding to these two conditions. We have
inserted X into the appropriate rows. The specifications S1
through S5 are in bold type while the “don’t care” conditions
D6 and D7 and the “off” condition, S0, are in plain type.
For each light, ask the question “what is it about the associated
rows that distinguishes them from the rest of the rows?” For
example, for L3, what is it about the input conditions S3, S4,
and S5 that distinguishes them from the other input
conditions, S0, S1, and S2? Note that we don’t need to
distinguish them from the “don’t care” conditions D6, D7.
Inputs B
AC
L4: Initially we have that L4 = S4 + S5 = AB’C’+AB’C. = AB’.
We now note that D6 + D7 = ABC’ + ABC = AB and that
AB’ + AB = A. We now proceed to add these “don’t care”
conditions into the original specification for L4 and obtain
L4 = (AB’C’+AB’C)+(ABC’+ABC) = AB’+AB = A .
L1 L2 L3 L4 L5
C
AC
L5 = AC;
L4 = A;
L3 =
A+BC;
L2 = A+B;
L1 = A+B+C = (A+B)+C.
Outputs
L1 L2 L3 L4 L5
A+BC
A
A+B
Inputs B
BC
C A+B+C
AC
4. (a) Show that the dual of the exclusive OR, S = AB =A’B + AB’, is Sd =
A’B’ + AB. (In logic, this called the “if and only if” statement and is
represented using AB.)
(b) Show that the negation of S = AB = Sd .
(c) The negation of a Boolean statement is not usually equivalent to its
dual. Verify this for the following pairs of dual Boolean expressions:
(A+B)’ vs. (AB)’; (A+B) vs. (AB); (A+B+C) vs. (ABC); (A+0) vs. (A1).
8. The following are several Boolean expressions related to the full adder.
Implement each of them in logic gates corresponding to the particular
Boolean operations represented in the expressions.
Si = 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 Si
= Ai Bi Ci (using XOR gates)
Ci+1 = Ai Bi C’i + Ai B’i Ci + A’i Bi Ci + Ai Bi Ci Ci+1
= (Ai Bi) Ci + Ai Bi (using an XOR gate)
9. The table below defines two Boolean functions, b1(a1,a2,a3,a4) and b2(a1,a2,a3,a4). Each
row (line) gives the output for a specific combination of inputs (a1,a2,a3,a4). For each of
the two functions, write the equivalent Boolean expression, simplify it as much as
possible, and implement it by drawing logic gates.
a1 a2 a3 a4 b1 b2
0 0 0 0 1 0
0 0 0 1 1 0
0 0 1 0 0 0
0 0 1 1 0 1
0 1 0 0 1 0
0 1 0 1 1 0
0 1 1 0 0 1
0 1 1 1 0 1
1 0 0 0 0 0
1 0 0 1 0 0
1 0 1 0 0 0
1 0 1 1 0 1
1 1 0 0 0 0
1 1 0 1 0 0
1 1 1 0 0 1
1 1 1 1 0 1
(12) The table below defines two Boolean functions, f1(A,B,C) and f2(A,B,C). Each row
(line) gives the output for a specific combination of inputs (A,B,C).
(a) For each of the two functions, write the equivalent Boolean expression, and then
simplify your Boolean expression as much as possible.
(b) Then implement f2 by drawing logic gates.
A B C f1 f2
0 0 0 1 0
0 0 1 1 1
0 1 0 1 0
0 1 1 1 1
1 0 0 1 0
1 0 1 0 0
1 1 0 1 0
1 1 1 1 0
(13) Draw the Boolean circuit for G = [(A’B)’(AB’)’C’]’, using only NAND gates
(each gate having up to 3 inputs).
(14) Consider the conversion of an 8-bit binary number into its 2’s complement,
particularly the shortcut method described in Chapter 1. One method for doing
the conversion in a computer would be as follows:
let Ai represent the bits (A7 … A0) of the binary number being converted.
let Bi represent the bits (B7 … B0) of the binary number after conversion.
let Fi represent flag bits (F7 … F0) which will be used to flag whether we have
reached the first “1”, as prescribed in Chapter 1. This bit responds to the
question (“starting from the right, have I reached the first “1” yet?”)
before the conversion begins, all the flag bits are 0, to be changed as needed
by the Boolean function you will design.
the conversion begins at the rightmost bit (A0), and proceeds, bit-by-bit, toward
the left, until all bits are converted into 2’s complement.
after the conversion is complete, Fi should be 0 up to and including the first “1”
encountered from the right, and then Fi should be 1 for all subsequent bits.
The problem:
(a) Specify the truth table for the Boolean function which takes as input Ai and
Fi, and gives as output Bi and Fi+1.
(b) Translate the truth table into symbolic Boolean functions for Bi and
Fi+1. Suggestion: draw a diagram showing how you will be changing the bits.
… Fi+1 = Fi= …
… … Ai= …
… … Bi= …
You decide based on these two, what to put into
these two
REFERENCE
Boole, George (2011-07-28). The Mathematical Analysis of LogicBeing an Essay Towards a
Calculus of Deductive Reasoning.
Boole, George (2003) [1854]. An Investigation of the Laws of Thought.Prometheus
Books.ISBN 978-1-59102-089-9.
"The name Boolean algebra (or Boolean 'algebras') for the calculus originated by Boole, extended
by Schröder, and perfected by Whitehead seems to have been first suggested by Sheffer, in 1913." E.
V. Huntington, "New sets of independent postulates for the algebra of logic, with special reference to
Whitehead and Russell's Principia mathematica", in Trans. Amer. Math. Soc.35 (1933), 274-304;
footnote, page 278.
Peirce, Charles S. (1931). Collected Papers.3. Harvard University Press.p. 13.ISBN 978-0-674-
13801-8.
Givant, Steven; Halmos, Paul (2009). Introduction to Boolean Algebras.Undergraduate Texts in
Mathematics, Springer.ISBN 978-0-387-40293-2.
Lenzen, Wolfgang. "Leibniz: Logic". Internet Encyclopedia of Philosophy.
J. Michael Dunn; Gary M. Hardegree (2001). Algebraic methods in philosophical logic. Oxford
University Press US. p. 2.ISBN 978-0-19-853192-0.
Weisstein, Eric W. "Boolean Algebra". mathworld.wolfram.com. Retrieved 2020-09-02.
Norman Balabanian; Bradley Carlson (2001). Digital logic design principles.John Wiley. pp. 39–
40. ISBN 978-0-471-29351-4., online sample
Rajaraman&Radhakrishnan (2008-03-01). Introduction To Digital Computer Design. PHI
Learning Pvt. Ltd. p. 65.ISBN 978-81-203-3409-0.
John A. Camara (2010). Electrical and Electronics Reference Manual for the Electrical and
Computer PE Exam.www.ppi2pass.com. p. 41. ISBN 978-1-59126-166-7.
Shin-ichi Minato, SaburoMuroga (2007). "Binary Decision Diagrams". In Wai-Kai Chen (ed.).
The VLSI handbook (2nd ed.). CRC Press.ISBN 978-0-8493-4199-1.chapter 29.
Alan Parkes (2002). Introduction to languages, machines and logic: computable languages,
abstract machines and formal logic. Springer.p. 276.ISBN 978-1-85233-464-2.
Jon Barwise; John Etchemendy; Gerard Allwein; Dave Barker-Plummer; Albert Liu (1999).
Language, proof, and logic.CSLI Publications.ISBN 978-1-889119-08-3.
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.