Lecture 03 Boolean Algebra
Lecture 03 Boolean Algebra
Learning Objectives
By the end of the Boolean algebra topic, students will be able to:
1
5. Evaluate the Practical Applications of Boolean Algebra:
o Solve problems related to memory storage and retrieval using Boolean algebra.
o Demonstrate how Boolean algebra is foundational to the design of control units,
arithmetic units, and data paths in computer architecture.
6. Apply Boolean Algebra to Problem-Solving in Computer Science:
o Use Boolean algebra for solving real-world problems in areas like search
engines, computer networks, and digital electronics.
o Work with Boolean expressions in programming and algorithm design,
particularly in optimization problems and machine learning.
Boolean Algebra
Boolean algebra is a branch of mathematics that provides a set of operations and rules to
manipulate and process binary variables. It is considered the foundation of digital electronics and
computer science.
Boolean algebra is based on the binary number system. In this chapter, we will cover the basic
theory of Boolean algebra, its significance, advantages, limitations, and applications.
Boolean algebra was developed by a mathematician and logician George Boole in the year of 1847.
Today, Boolean algebra is being used as the fundamental of digital electronics, computer systems,
and information technology.
Since, Boolean algebra is based on the binary number system. Hence, the Boolean variables can
take only two possible values i.e., 0 and 1. Here, the value 0 represents the False state, while the
value 1 represents the True state.
The operations in Boolean algebra are based on the three fundamental logical operations namely,
AND, OR, and NOT.
AND Operation
2
In Boolean algebra, a logical operation in which the outcome is true (1) only when all the input
values are true (1), otherwise, the output is false (0) is termed as AND operation. The AND
operation is represented by a dot (.). For example, A AND B can be represented as A.B in symbolic
form.
OR Operation
In Boolean algebra, the OR operation is another logical operation in which the output is false (0)
only when all input values are false (0), otherwise the output is true (1). The OR operations is
denoted by a plus (+). For example, A OR B can be represented as A + B.
NOT Operation
In Boolean algebra, the NOT operation is performed to obtain the inverted version of the input
value. Thus, the result of the NOT operation is false (0), if the input is true (1) and vice-versa. The
NOT operation is represented by the symbol "~". For example, NOT A is represented as ~A.
These are the basic operations used in the Boolean algebra. However, there are many more logical
operations and rules that used in the Boolean algebra to perform complex tasks.
Boolean Variable
A Boolean variable is a symbol that can take one of the two possible binary values i.e., 0 and 1.
Boolean Value
It is nothing but a value representing the state of a variable. It can be either True (1) or False (0).
Logic Gate
A logic gate is a digital circuit that can perform a specific logical operation. There are 7 main logic
gates used in digital electronics, they are AND gate, OR gate, NOT gate, NOR gate, NAND gate,
XOR gate, and XNOR gate.
These are the basic terms used in Boolean algebra and provides a foundation for its understanding
and working.
3
Significance of Boolean Algebra in Digital Electronics
Boolean algebra plays a crucial role in building the foundation of the digital electronics and
computer science.
Here is a list of some of key factors that make Boolean algebra an important concept in the field of
digital electronics −
• Boolean algebra utilizes binary number system that provides a simplified way of
representing on and off states of a digital system. Where, 0 is used to denote the off state,
while 1 is used to represent the on state of the system.
• Boolean algebra provides various efficient methods like K-map, QC method, etc. to
simplify complex logical operations.
• Boolean algebra allows to implement various arithmetic and logical operations using
simple logic gates.
• Boolean algebra enables us to develop switching algorithms that are essential components
in various computer networks and communication systems.
• Boolean algebra provides various rules and sets of operations used in computer
programming to perform logical and decision-making operations.
• Boolean algebra simplifies the data storage and transmission processes.
• Boolean algebra provides a foundation for developing artificial intelligence and machine
learning technologies.
Overall, the Boolean algebra creates a fundamental structure and framework to develop and
implement various digital electronic systems and information-based technologies. Hence, it is an
important concept in the field of digital electronics.
• Boolean algebra provides a rich set of laws and theorems to simplify complex logical
functions so that they can implemented using a smaller number of digital components. This
simplification makes the digital circuits significantly cost-effective, simpler to design and
implement, and low power consuming.
• Boolean algebra provides various tools to analyze and verify the functionality of digital
systems to meet the desired requirements.
• The operations based on Boolean algebra can be analyzed and simulated using digital tools
and software.
• Boolean algebra provides the logical foundation for programming and software
development.
• Boolean algebra enables us to create, analyze, and simulate the real-world systems.
• Boolean algebra helps understand the working and logical implementation of digital
circuits, systems, and software.
Hence, all these advantages of Boolean algebra make it a perfect foundation for understanding,
analyzing, and designing the digital systems.
4
Disadvantages of Boolean Algebra
Boolean algebra is a powerful tool in terms of design and analysis of digital systems. But it also
has some disadvantages.
• Boolean algebra is based on the binary number system and is best suited for digital systems.
It cannot be used in the applications where continuous representation of information is
desired.
• Boolean algebra is based on the true or false statements. Hence, it is not suitable for
quantitative representation of information.
• Boolean algebra has a limited set of logical operations like AND, OR, and NOT.
• Boolean algebra becomes complex to manage in the case of large digital systems due to a
greater number of variables.
• Boolean algebra does not provide any mean to directly represent the arithmetic operations
such as addition, subtraction, multiplication, and division.
• Boolean algebra cannot represent the analog signals or continuous functions.
• Boolean algebra does not support various advanced mathematical concepts which are
required in numerous engineering and scientific applications.
Although it has some disadvantages, Boolean algebra still forms the foundation of digital
electronics and computer science.
These are some common examples of applications of Boolean algebra. Although, this list can
extend to any number because Boolean algebra is the foundation of digital systems and computer
science.
Conclusion
5
In conclusion, Boolean algebra is a mathematics of logic that provides a set of rules and a
framework to design and develop digital and logical systems.
Boolean algebra is basically a tool developed to design, analyze, and optimize the digital circuits
and systems. It helps simplify the design and implementation of digital circuits.
Boolean algebra is an important concept in the field of digital electronics, computer programming,
internet, databases, digital communication, artificial intelligence, etc.
The key feature of Boolean algebra is that it can represent information in the binary form that can
be processed using digital systems and computers.
The laws and rules in Boolean algebra are the sets of logical statements or expressions upon which
all the logical expressions are built. Each law of the Boolean algebra can be interpreted as an
operation performed by a logic circuit like a logic gate.
In this chapter, we will learn about laws and rules of Boolean algebra that are used to simplify
the logical functions and Boolean expressions. These laws and rules are essential tools in Boolean
algebra that help to reduce the complexity and optimize the digital circuits and systems.
Let us learn the primary laws and rules of Boolean algebra in detail that are used to perform logical
operations.
0 AND 0 = 0 0 OR 0 = 0 NOT of 0 = 1
0 AND 1 = 0 0 OR 1 = 1 NOT of 1 = 0
1 AND 0 = 0 1 OR 0 = 1
1 AND 1 = 1 1 OR 1 = 1
6
AND Laws
In Boolean algebra, there are four AND laws given below −
OR Laws
There are four OR laws described below −
Complementation Laws
There are following five complementation laws in Boolean algebra −
• Law 1 − 0' = 1
• Law 2 − 1' = 0
• Law 3 − If A = 0, Then A' = 1
• Law 4 − If A = 1, Then A' = 0
• Law 5 − (A')' = A (This is called double complementation law)
Commutative Laws
There are following two commutative laws in Boolean algebra −
Law 1 − According to this law, the operation A OR B produces the same output as the operation B
OR A, i.e.,
A+B=B+A
Hence, the order of the variables does not affect the OR operation.
This law can be extended to any number of variables. For example, for three variables, it will be,
A+B+C=C+B+A=B+C+A=C+A+B
Law 2 − According to this law, the output of the A AND B operation is same as that of the B AND
A operation, i.e.,
A·B=B·A
7
This law states that the order in which the variables are ANDed does not affect the result.
We can extend this law to any number of variables. For example, for three variables, we get,
A·B·C=A·C·B=C·B·A=C·A·B
Associative Laws
Associative laws define the ways of grouping the variables. There are two associative laws as
described below.
Law 1 − The expression A OR B ORed with C results the same as the A Ored with B OR C, i.e.,
(A + B) + C = A + (B + C)
This law can be extended to any number of variables. For example, for 4 variables, we get,
(A + B + C) + D = A + (B + C + D) = (A + B) + (C + D)
Law 2 − The expression A AND B ANDed with C results the same as the expression A ANDed
with B AND C, i.e.,
(A · B) · C = A · (B · C)
We can extend this law to any number of variables. For example, if we have 4 variables, then
Distributive Laws
In Boolean algebra, there are the following two distributive laws that allow for multiplying or
factoring out of expressions.
Law 1 − According to this law, we OR several variables and then AND the result with a single
variable.
It gives the same result as the expression in which the single variable is ANDed with each of the
several variables and then ORed the product terms, i.e.,
A · (B + C) = AB + AC
Law 2 − According to this law, if we AND several variables and then the result is ORed with a
single variable.
8
It gives the same result as we OR the single variable with each of the several variables and then the
sum terms are ANDed together, i.e.,
A + BC = (A + B)(A + C)
RHS = (A + B)(A + C)
= AA + AB + AC + BC
= A + AB + AC + BC
= A (1 + B + C) + BC
Since,
1+B+C=1+C=1
Therefore,
A · 1 + BC = A + BC = LHS
Law 1 − According to this law, if we OR a variable with the AND of the complement of the variable
and another variable. Then, it is same as the OR of the two variables, i.e.,
A + A’B = A + B
= 1 · (A + B) = A + B = RHS
Law 2 − According to this law, if we AND a variable with the OR of the complement of the variable
and another variable, it is equivalent to when we AND the two variables, i.e.,
A(A’ + B) = AB
= 0 + AB = AB = RHS
9
Both these laws show that the complement of a term appearing in another term is redundant. Hence,
the rule is named as Redundant Literal Rule.
Idempotence Laws
The term "idempotence" is a synonym for "same value". There are two idempotence laws in
Boolean algebra. They are,
Law 1 − According to this law, ANDing a variable with itself is equal to the variable, i.e.,
A·A=A
Law 2 − According to this law, ORing a variable with itself is equal to the variable, i.e.,
A+A=A
Absorption Laws
There are two absorption laws in Boolean algebra and they are explained below.
Law 1 − According to this law, if we OR a variable with the AND of the that variable and another
variable, then it is equal to the variable itself, i.e.,
A+A·B=A
LHS = A + A · B = A · (1 + B)
= A · 1 = A = RHS
Law 2 − According to this law, the AND of a variable with the OR of that variable and another
variable is equivalent to the variable itself i.e.,
A(A + B) = A
LHS = A(A + B) = AA + AB
= A + AB = A(1 + B) = A · 1 = A = RHS
Hence, this law proves that if a term appears in another term, then the latter term will become
redundant and can be removed from the expression.
DeMorgan's Theorem
In Boolean algebra, DeMorgan’s theorem defines two laws which are explained below.
10
Boolean Functions
In digital electronics, boolean function is a fundamental concept that defines the logical and
mathematical relationship between input binary variables and binary result. These functions are
defined as per the rules of Boolean algebra and binary number system.
In this chapter, we will explain the fundamentals of Boolean functions, their properties, advantages,
applications. So, let’s get started with a basic introduction to Boolean function.
The Boolean functions are defined using the rules of Boolean algebra and binary number system.
These functions build the foundation of design and development of digital circuits and systems.
• Binary Variables
• Logical Operators
Binary Variables
A binary variable is a symbol that can take one of the two possible values i.e., 0 and 1. If a binary
variable has a value 0 associated to it. Then, it represents a low or false state. While if the value of
the binary variable is 1, then it represents the high or true state.
11
Logical Operators
A logical operator is a symbol that represents a logical operation or process. In Boolean algebra,
there are three basic logical operators −
AND Operator
It is denoted by a dot (.). The output of the AND operation is true or high or logic 1, if and only if
all its input variables have a value true or high or logic 1. It is a binary operator, as it requires
minimum two input variables.
OR Operator
It is denoted by a plus sign (+). It is also a binary operator, as minimum two input variables are
required. The output of the OR operation is true or high or logic 1, if any of its inputs is true or high
or logic 1.
NOT Operator
The NOT operator is represented by the symbol tilde (~). It is a unary operator requires only one
input variable. The NOT operator inverts or complements the value of the input variable. Thus, if
the value of the input variable is 1, it gives 0 as output and vice versa.
Mathematical Form
In this form, the Boolean expression is represented as a mathematical expression consisting of
binary variables and logical operators in their symbol form. For example,
Y(A,B,C) = AB + ABC + BC
Truth Table
In this form, a Boolean function is represented in a tabular format. The table represents all the
possible combinations of binary variables and their corresponding binary outputs of the Boolean
function.
For example, Y = A + B is a Boolean function and its truth table representation is shown below.
12
A B Y
0 0 0
0 1 1
1 0 1
1 1 1
The logic circuit diagram of a Boolean function Y = AB + AC is shown in the following figure.
Boolean functions provide an efficient and logical way of expressing the relationship between these
binary variables, so that the system can understand and manipulate the binary information.
Boolean functions also provide a basis for designing of logic gates and other digital circuits.
Basically, they provide a systematic and mathematical approach to design and analyze digital
systems.
We can also use Boolean functions to understand and verify the behavior of the digital circuits for
different possible inputs. Therefore, Boolean functions are also utilized as the debugging and
optimization tools for digital systems.
Overall, Boolean function is a standardized tool used in the field of digital electronics to perform
various tasks, such as implementation, analysis, optimization, and verification of operation of
digital circuits and systems.
13
Characteristics of Boolean Functions
A Boolean function has several important characteristics that makes it a crucial tool for designing,
implementing, and analyzing digital circuits. Some of the key characteristics of Boolean functions
are listed below −
• Boolean functions provide a simple and clear method to express a logical relationship
between input variables and output of a digital system.
• A Boolean function can be used as an instrument to understand the behavior of a digital
circuit for different input combinations.
• Boolean functions are composed of binary variables. Hence, they can be directly realized
using logic gates.
• Boolean functions also help determining the output of digital systems without their actual
implementation.
• Boolean functions also play a crucial role in reducing system complexity and cost
minimization.
• Boolean functions allow to detect and correct the errors in digital system design to improve
the accuracy and reliability.
All these are the important characteristics of Boolean function. Apart from these advantages,
Boolean functions also have several limitations, which are listed in the next section.
• Boolean functions are dependent on binary number system. Hence, they are not suitable to
represent many problems outside the field of digital electronics.
• Boolean functions are very sensitive to small variations in the input values. This high
sensitivity can sometimes produce unpredictable results.
• Boolean functions cannot express the natural arithmetic operations directly.
• Boolean functions are not convenient for some applications like statistical modeling.
• Boolean functions are used to design, analyze, and implement the digital circuits.
• The design and operation of computer systems and microprocessors is defined through the
Boolean functions.
• Boolean functions are also used to express the outputs of the logic gates, flip-flops,
counters, decoders, and all the other digital systems.
• Boolean functions are also used to design the circuits employed for digital signal
processing.
14
• Boolean functions are used in electrical and electronics engineering to design, implement,
and analyse the control systems, automation systems, etc.
Conclusion
In conclusion, a Boolean function is an elementary tool used to specify a systematic, mathematical,
and logical relationship between binary variables and the output of a digital system.
Boolean functions are so versatile that they can be used for various purposes such as designing,
analysis, implementation, optimization, etc. of the digital systems.
DeMorgan's Theorem
In Boolean algebra, several rules are defined to perform operations in digital logic circuits. Boolean
algebra is a tool to perform operation on binary digits, i.e. 0 and 1. These two binary digits 0 and 1
are used to denote FALSE and TRUE states of a digital circuit at input and output ends. Boolean
algebra, developed by George Boole, uses 0s and 1s to create truth tables and logic expressions of
digital circuits like AND, OR, NOT, etc. which are used to analyze and simplify the complex
circuits.
There were another English mathematician Augustus DeMorgan who explained the NAND and
NOR operations as NOT AND and NOT OR operations respectively. This explanation was named
De Morgan's Theorem. In this tutorial, we will discuss the DeMorgan's theorem in detail.
15
The logic implementation of left side and right side of this law is shown in Figure 1.
Thus, DeMorgan's first law proves that the NOR gate is equivalent to a bubbled AND gate. The
following truth table shows the proof of this law.
0 0 1 1 1 1
0 1 0 1 0 0
1 0 0 0 1 0
1 1 0 0 0 0
This truth table proves that the Boolean expression on the left is equivalent to that on the right side
of the expression of DeMorgan's first law.
Also, the first law of DeMorgan's theorem can be extended to any number of variables, or a
combination of variables.
16
From the above discussion, we may conclude that the DeMorgan's First Law converts an expression
from a sum form under a NOT sign to a product form.
In other words, the complement of two or more ANDed variables is equal to the sum of the
complement of each of the individual variables, i.e.,
The logic implementation of left and right sides of this expression is shown in Figure 2.
Hence, DeMorgan's second law proves that the NAND gate is equivalent to a bubbled OR gate.
The following truth table shows the proof of this law.
17
Left Side Right Side
0 0 0 1 1 1
0 1 1 1 0 1
1 0 1 0 1 1
1 1 1 0 0 0
This truth table proves that the Boolean expression on the left side is equivalent to that on the right
side of the expression of DeMorgan's second law.
Similar to the first law, we may extend the DeMorgan's second law for any number of variables or
combination of variables.
For example,
Hence, from the above discussion, we can conclude that DeMorgan's second law transforms a
product form of variables or combination of variables under a NOT sign into a sum form.
Example 1
Apply DeMorgan's theorem to the following Boolean expression,
18
This is the equivalent or the dual of the given expression.
Example 2
Apply DeMorgan's theorem to the following Boolean expression,
In this chapter, we explained the two laws of DeMorgan's Theorem and showed how they are
helpful in performing different operations in digital logic circuits.
19
SOP (Sum of Products) Form
The SOP or Sum of Products form is a form of expressing a logical or Boolean expression. In
SOP, different product terms of input variables are logically ORed together. Therefore, in the case
of SOP form, we first logically AND the input variables, and then all these product terms are
summed together with the help of logical OR operation.
This is a logical expression in three variables. Here, ABC, A'BC, and ABC' are the three product
terms which are summed together to get the expression in SOP form.
Here, f is a logical expression in three variables. From this example, it can be seen that there are
three sum terms which are ANDed together to obtain the POS form of the given expression.
Now, let us discuss the Standard Sum of Products (SSOP) form and Standard Product of Sum
(SPOS) form in detail.
A Boolean or logical expression can be represented into two standard forms namely,
• SSOP Form
• SPOS Form
20
Since, each product term of the SSOP form contains all the variables, hence it is also known
as Expanded Sum of Products form. The SSOP form is also known Disjunctive Canonical Form
(DCF) or Canonical Sum of Products Form or Normal Sum of Products Form.
We can simply obtain the standard sum of products form of a logical expression from the truth
table by determining the sum of all the terms that correspond to those combinations for which the
given logical expression (say f) has the value 1.
We can also obtain the standard sum of products (SSOP) form of an expression from the sum of
products (SOP) form by using Boolean algebra.
This is the Standard Sum of Products form of the given logical expression. We can notice that in
the SSOP form, each product term contains all the variables of the logic function either in
complemented or un-complemented form. Each of these product terms is called a minterm. A
logical function or expression in ‘n' variables can have maximum 2n minterms. The sum of
minterms of a logical expression whose value is 1 is called the standard sum of products form of
the expression.
SPOS form is also known as Conjunctive Canonical Form (CCF) or Expanded Product of
Sums Form or Normal Product of Sums Form or Canonical Product of Sums Form.
The SPOS form of each term is derived by considering the combinations of variables for which the
output is equal to 0. Each term is a sum of all the variables of the expression.
In the SPOS form, a variable appears in its complemented form if it has a value of 1 in the
combination, and it appears in un-complemented form if it has a value of 0 in the combination.
In the case of standard product of sums form, a term which contains each of the n variables of the
function in either complemented or un-complemented form is called a maxterm. For a logical
21
function in n variables, there could be at the most 2nmaxterms. The product of maxterms of a logical
expression whose value is 0 is called the standard product of sums form of the expression.
Similar to the SSOP form, we can obtain the standard product of sums form from the truth table of
the logical expression by determining the product of all the sum terms that correspond to those
combinations of variables for which the given logical expression (say f) has the value equal to 0.
Also, the SPOS form of a logical expression can be obtained by using Boolean algebra.
This is the Standard Product of Sums (SPOS) form of the given logical expression. Here, we can
note that in the SPOS form, each sum term contains all the variables of the logic function either in
complemented or un-complemented form.
On the other hand, when the Boolean expression is represented as a product of sum terms, where
each sum term contains all the variables of the function, it is called Standard Product of Sums
(SPOS) form. In the Standard POS form, each sum term of the Boolean expression is called
a maxterm.
Now, let us discuss the expansion of a Boolean expression in POS form to Standard POS form.
• Write down all the sum terms of the given Boolean expression.
• If one or more variables are missing in any sum term, then add the products of each of the
missing variables and its complement to that term.
• Expand the terms according to the rules of Boolean algebra.
• Finally, drop out the redundant terms from the expression.
22
Let us understand the conversion of a Boolean expression in POS form to Standard POS form with
the help of examples.
Example 1
Convert the following 3-variable Boolean expression in POS form to its Standard POS form.
The given Boolean expression is in its POS form. In this, the variable C is missing from the first
term, variable A is missing from the second term, and variable B is missing from the third term.
Therefore, to convert this given function into its SPOS form, we will add the product of missing
variable and its compliment to each term of the function, i.e.
Example 2
Convert the following 4 variable Boolean function into its standard POS form.
23
Since, there is no redundant term in the expression. Thus, this is the standard POS form of the given
Boolean function.
Example 3
Convert the following 2 variable Boolean function into Standard POS form.
24
This is the standard POS form of the given Boolean expression.
Numerical Problems
Q 1. − Convert the following 3 variable Boolean expression in POS form to its Standard POS form.
25