Logic Gates and Boolean
Logic Gates and Boolean
Logic Gates and Boolean
ALGEBRA
Introduction to Logic Mathematics
Mathematical logic is a subfield of mathematics exploring the applications of formal logic to
mathematics. It bears close connections to meta-mathematics, the foundations of mathematics,
and theoretical computer science.
Set theory
A set can be defined as a collection of things that are brought together because they obey a
certain rule.
These 'things' may be anything you like: numbers, people, shapes, cities, bits of text ..., literally
anything.
The key fact about the 'rule' they all obey is that it must be well-defined. In other words, it
enables us to say for sure whether or not a given 'thing' belongs to the collection. If the 'things'
we're talking about are English words, for example, a well-defined rule might be:
Requirement of a set
1. A set must be well defined i.e. it must not leave any room for ambiguities e.g sets of all
students- which? Where? When?
A set must be defined in terms of space and time
2. The objective (elements or members) from a given set must be distinct i.e each object
must appear once and only once, Must appear but not more than once
Types of Sets
In set theory, there are different types of sets. All the operations in set theory could be based on
sets. Set should be a group of individual terms in domain. The universal set has each and every
element of domain. We are having different types of sets. We will see about the different types
of sets.
Page 64 of 199
Different Types of Sets
There are different types of sets in set theory. They are listed below:
Universal Set
Empty set
Singleton set
Finite and Infinite set
Union of sets
Intersection of sets
Difference of sets
Subset of a set
Disjoint sets
Equality of two sets
Universal Set
The set of all the 'things' currently under discussion is called the universal set (or sometimes,
simply the universe). It is denoted by U.
The universal set doesn‘t contain everything in the whole universe. On the contrary, it restricts us
to just those things that are relevant at a particular time. For example, if in a given situation
we‘re talking about numeric values – quantities, sizes, times, weights, or whatever – the
universal set will be a suitable set of numbers (see below). In another context, the universal set
may be {alphabetic characters} or {all living people}, etc.
Singleton Set:
A set which contains only one element is called a singleton set.
For example:
• A = {x : x is neither prime nor composite}
It is a singleton set containing one element, i.e., 1.
• B = {x : x is a whole number, x < 1}
This set contains only one element 0 and is a singleton set.
• Let A = {x : x ∈ N and x² = 4}
Here A is a singleton set because there is only one element 2 whose square is 4.
• Let B = {x : x is a even prime number}
Here B is a singleton set because there is only one prime number which is even, i.e., 2.
Finite Set:
A set which contains a definite number of elements is called a finite set. Empty set is also called
a finite set.
For example:
• The set of all colors in the rainbow.
• N = {x : x ∈ N, x < 7}
• P = {2, 3, 5, 7, 11, 13, 17, ...... 97}
Page 65 of 199
Infinite Set:
The set whose elements cannot be listed, i.e., set containing never-ending elements is called
an infinite set.
For example:
• Set of all points in a plane
• A = {x : x ∈ N, x > 1}
• Set of all prime numbers
• B = {x : x ∈ W, x = 2n}
Note:
All infinite sets cannot be expressed in roster form.
For example:
The set of real numbers since the elements of this set do not follow any particular pattern.
B = {A, L, G, E, B, R}
Therefore, n(B) = 6
Equivalent Sets:
Two sets A and B are said to be equivalent if their cardinal number is same, i.e., n(A) = n(B).
The symbol for denoting an equivalent set is ‗↔‘.
For example:
A = {1, 2, 3} Here n(A) = 3 B = {p, q, r} Here n(B) = 3 Therefore, A ↔ B
Equal sets:
Two sets A and B are said to be equal if they contain the same elements. Every element of A
is an element of B and every element of B is an element of A.
For example:
A = {p, q, r, s} B = {p, s, r, q}
Therefore, A = B
The various types of sets and their definitions are explained above with the help of
examples.
Page 66 of 199
Empty Set
In mathematics, empty set is a set theory related topic. A set without any elements is said to be
an empty set. This article helps you understand empty set by giving a clear idea about empty set
with some example problems.
Page 67 of 199
Properties of Preparation for Empty Set:
1. Empty set is considered as subset of all sets. ϕ⊂X
2. Union of empty set ϕ with a set X is X. A∪ϕ=A
Intersection of an empty set with a set X is an empty set.
Solved Examples
Question 1: A is a set of alphabets and B is a set of numbers. What is the intersection of A and B?
Solution: A ∩ B = { }
If we have two sets A and B in such a way that both the sets are empty sets, then A X B = ϕ x ϕ =
ϕ. It is clear that, the cartesian product of two empty sets is again an empty set.
If A is an empty set and B = {1, 2, 3}, then the cartesian product of A and B is as
follows: A X B = {ϕ}. {1, 2, 3} = {ϕ X 1, ϕ X 2, ϕ x 3} = {ϕ, ϕ, ϕ} = {ϕ}
So, we say that if one of the set is an empty set from the given two sets, then again the
Cartesian product of these two sets is an empty set.
Page 68 of 199
1. A set of cats with 4 legs
Solution:
Option 1: A set of cats with 4 legs. This set is possible where cats are having 4 legs.
Option 2: A set of apples with red color. This set is possible where apple is in red color.
Option 3: A set of positive numbers in which all are less than 1.
This set is not possible because the positive numbers must be greater than 1. So, this set
is considered as empty set.
Answer: 3
Question 2: A is a set of numbers from 1 to 10 B is a set of negative numbers. What is the
intersection of A and B?
Solution:
Given:
A = set of number from 1 to 10. = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} B = set of negative numbers
= {-1, -2, -3, -4,….} Intersection of A and B = A ∩ B = { }
Subset
Consider the sets, X = set of all students in your school and Y = set of all students in your class.
It is obvious that set of all students in your class will be in your school. So, every element of Y is
also an element of X. We say that Y is a subset of X. The fact that Y is a subset of X is
expressed in symbol as Y⊂X. The symbol ⊂ stands for "is a subset of" or "is contained in".If Y is
a subset of X, then X is known to be a superset of Y. The subset of a set will have elements
equal to or less than the elements in the given set.
Subset Definition
A set A is said to be a subset of a set B, if every element of A is also an element of B. In other
words, A⊂B if whenever a∈A, then a∈B. It is often convenient to use the symbol ⇒ which
means "implies". Suppose, for two sets A and B, A = {1, 2, 3} and B = {1} then B is the subset
of A.
Subset Symbol:
Using the symbol ⇒, we can write the definition of subset as follows:
Page 69 of 199
A⊂B if a∈A⇒ a∈B
Operation of a Set
Union of Sets
Set is an important part of the mathematics. It is applied in almost many branch of mathematics.
Set is the relation of some givenn data. There are many functions of set like union, intersection.
Here, we will discuss about union of sets.
We denote the union of A and B by A∪B. Thus, AUB=x|x∈Aorx∈Borx∈AandB. We write
AUB=x|x∈Aorx∈B where, it is unnderstood that the word 'or' is used in the inclusive sense. That
is, x∈A or x∈B stands for x∈A or x∈B or x∈AandB.
Page 70 of 199
If A = {1,2,3,4} and B = {3,4,5,66,7} then A∪B = {1, 2, 3, 4, 5, 6, 7}.
With the help of Venn diagram, we can prove it.
Conversely, let us suppose that we have two countable sets X and Y. And, we can define two
surjection functions f: N → X and g : N → Y. Let Z = X ∪ Y. Then, we can define h : N → Z in
a way that h(2n + 1) = f(n) for n = 0, 1, .... and h(2n) = g(n), n = 1, 2,... Then, h is well defined
function for every value of i ∈ N is either odd or even, so h(i) is defined. Since h is onto
function for any z ∈ Z, then z ∈ X or z ∈ Y. If z ∈ X, then h(2q + 1) = z for some value of q and
if z ∈ Y then h(2p) = z for some value of p. Hence, Z is countable. So, we can say that the union
of two countable sets is again a countable set.
Page 71 of 199
Union of Sets Examples
Given below are some of the examples on union of sets.
Solved Examples
Question 1: Find the union of each of the following two sets:
1. X = {1, 3, 6} Y = {1, 2, 6}
2. X = {a, e, i, o, u} Y = {a, e, c}
3. X = {3 , 4 ,5} B = φ
Solution:
X∪Y = {1, 2, 3, 6}
X∪Y = {a, c, e, i, p, u}
X∪Y = {3, 4, 5}
Question 2:
If X = {1, 2, 5, 6}, Y = {3, 4, 6, 9}, Z = {3, 5, 6, 9} and W = {3, 6, 9, 11}. Find
1. X∪Y
2. X∪Z
3. Y∪Z
4. Y∪W
5. X∪Y∪Z
6. X∪Y∪W
7. Y∪Z∪W
Page 72 of 199
Solution:
1. X∪Y = {1, 2, 3, 4, 5, 6,9}
2. X∪Z = {1, 2, 3, 5, 6, 9}
3. Y∪Z = {3, 4, 5, 6, 9}
4. Y∪W = {3, 4, 5, 6, 9,11}
5. X∪Y∪Z = {1, 2, 3, 4, 5, 6, 9}
6. X∪Y∪W = {1, 2, 3, 4, 5, 6, 9, 11}
7. Y∪Z∪W = {3, 4, 5, 6, 9,11}
Solved Examples
Question 1:
Two sets are given.
A = {5, 12, 13, 16, 19}
B = {5, 10, 13, 16, 19}
Find A∪B
Solution:
Given sets are:
A = {5, 12, 13, 16, 19}
B = {5, 10, 13, 16, 19}
A∪B = {5, 10, 12, 13, 16, 19}
Question 2:
Find X∪Y for the following set.
X = {4, 6, 8, 9, 11}
Y = {3, 5, 6, 8, 11}
Page 73 of 199
Solution:
Given sets are
X = {4, 6, 8, 9, 11}
Y = {3, 5, 6, 8, 11}
So, X∪Y = {3, 4, 5, 6, 8, 9, 11}
Here, common element is taken only one time.
Intersection of Sets
Intersection is an operation on sets. It is just opposite to union. It is a very useful and
important concept in set theory. Before we learn about intersection, we need to understand
some basic concept like what is set.
A set is a well-defined collection of data. It's data is known as it's members or elements. We
represent the set by capital letters A, B, C, X, Y, Z, etc. We use the concept of set in daily life.
For example, a team has five members. So, this is a set.
Solved Examples
Question 1:
If A = {1, 3, 4, 6, 9} and B = {2, 4, 6, 8}, find A ∩ B. What do you conclude?
Solution:
We have given that A = {1, 3, 4, 6, 9} and B = {2, 4, 6, 8}
We have to find the intersection of A and B.
So, A ∩ B = {1, 3, 4, 6, 9} ∩ {2,4,6,8}
A ∩ B = {4, 6}
Question 2:
If A = {1, 3, 5, 7, 9} and B = {2,4,6,8}, find A ∩ B. What do you conclude?
Page 74 of 199
Solution:
We have A ∩ B = {1, 3, 5, 7, 9} ∩
{2,4,6,8} = $\phi$
If no data match in both the sets, both the sets are known as disjoint sets. Thus, A and B are
disjoint sets.
Question 3:
If A = {1, 2, 3, 4, 5, 6, 7}, B = {2, 4, 6, 8, 10} and C = {4, 6, 7, 8, 9, 10, 11}, then find A ∩
B and A ∩ B ∩ C.
Solution:
Given sets are
A = {1, 2, 3, 4, 5, 6, 7}
B = {2, 4, 6, 8, 10}
C = {4, 6, 7, 8, 9, 10, 11}
First, we have to find A ∩ B. Then, we have to treat A ∩ B as a single
set. For A ∩ B, we select those elements which are common in sets A and
B. So, A ∩ B = {2, 4, 6}
So, (A ∩ B) ∩ C = {4, 6}
So, A ∩ B ∩ C = {4, 6}
Question 4:
If A = {1,3,5,7,9}, B = {2,4,6,8} and C = {2,3,5,7,11}, find (A ∩ B) and (A ∩ C) What do
you conclude?
Solution:
We have given that
A = {1, 3, 5, 7, 9}
B = {2, 4, 6, 8}
C = {2, 3, 5, 7, 11}
Page 75 of 199
A ∩ B = {1, 3, 5, 7, 9} ∩ {2, 4, 6, 8} = $\phi$
Thus, A and B are disjoint sets while A and C are intersecting sets.
Intersection of Two Sets
The intersection of two sets is the set of all the elements of two sets that are common in both of
them. If we have two sets A and B, then the intersection of them is denoted by A $\cap$ B and it
is read as A intersection B.
Let X = {2, 3, 8, 9} and Y = {5, 12, 9, 16} are two sets.
Now, we are going to understand the concept of Intersection of set. It is represented by the
symbol " $\cap$ ".
If we want to find the intersection of A and B, the common part of the sets A and B is the
intersection of A and B. It is represented as A $\cap$ B. That is, if an element is present in both
A and B, then that will be there in the intersection of A and B. It will be more clear with the
below figure.
Let A and B are two sets. Then, the intersection of A and B can be shown as below.
Page 76 of 199
In the same way, if A1, A2, ........., An is a finite family of sets, then their intersection
is represented by A1$\cap$ A2 $\cap$......$\cap$ An.
Solved Example
Question:
If we have A = {1, 3, 5, 7, 6, 8}, B = {2, 4, 6, 8, 9} and C = {1, 3, 6, 8 }, then find the A ∩ B ∩ C.
Solution:
Given that A = {1, 3, 5, 7, 6, 8}, B = {2, 4, 6, 8, 9} and C = {1, 3, 6, 8 }.
Then, it is clear that the elements 6 and 8 are common in all the three given sets.
Hence, we get A ∩ B ∩ C = {6, 8}.
Page 77 of 199
Intersection of Open Sets
Every intersection of open sets is again an open set. Let us have two open sets A1 and A2. If
the intersection of both of them is empty and empty set is again an open set. Hence, the
intersection is an open set.
If A1 and A2 are open sets, then there exists some x $\in$ A1 $\cap$ A2. Since the given sets
are open, we have some r1 and r2 in such a way that $B_{r_{1}}(x)\subset A_{1}$ and
$B_{r_{2}}(x)\subset A_{2}$. So, we can choose a number $B_{r}(x)\subset A_{1}\cap
A_{2}$.
So, we can say that if the intersection is not empty, then by the use of definition of intersection
and non emptiness, there exists any x $\in$ Ai for all Ai's, where all Ai's are open sets. Then,
we have $B_{r_{i}}(x)\subset A_{i}$ for some ri > 0.
Complement of a Set
In set theory, complement set is one of the branch. Set of all elements in the universal set that are
not in the initial set are said to be complement set. The complement of a set is represented by the
symbol A‘. The set is a collection of the object. Set is denoted by the symbols {}. In this article,
we see in detail about the complement set.
Complement of a Set Definition
If we have a set A, then the set which is denoted by U - A, where U is the universal set is called
the complement of A. Thus, it is the set of everything that does not belong to A. So, the
complement of a set is the set of those elements which does not belong
c
to the given set but
belongs to the universal set U. Mathematically, we can show it as A = {x \ x ∉ A but x ∈ U}
Since we know that every set is the subset of the universal set U, then the complementary set is
also the subset of U. The total number of elements in the complementary set is equal to the
difference between the number of elements of the set U and the number of elements of the given
c
set (say A). If A is the given set, then the complement of A is denoted as A or A'.
Page 78 of 199
Complement of a Set Example
Given below are some of the examples on complement of a set.
Solved Examples
Question 1: Value of set U = {2, 4, 6, 7, 8, 9, 10} and A = {7, 8, 9, 10} and B = {8, 9, 10}. Find
the complement of A, complement of B, complement of A union B.
Solution:
Step 1: Given
U = {2, 4, 6, 7, 8, 9, 10}
A = {7, 8, 9, 10}
B = {8, 9, 10}
Step 2: The element of set U is {2, 4, 6, 7, 8, 9, 10}. The element that does not belong to A is
{2, 4, 6}. Complement of A is {2, 4, 6}.
Page 79 of 199
Question 2: Values of set U = {3, 5, 7, 8, 9, 10, 12} and A = {8, 9, 10, 12}. Find the compliment
of A.
Solution:
Step 1: Given
U = {3, 5, 7, 8, 9, 10, 12}
A = {8, 9, 10, 12}
Step 2: The element of set U is {3, 5, 7, 8, 9, 10, 12}. Elements {3, 5, 7} does not belong to the
set A. So, A‘ = {3, 5, 7}
Solution:
Step 1: Given
U = {1, 4, 6, 7, 8, 10}
A = {6, 7, 8}
Step 2: The element of set U is {1, 4, 6, 7, 8, 10}. Elements {1, 4, 10} does not belong to the
set A. A‘ is {1, 4, 10}.
Set Difference
Here, we are going to learn about an operation on set called difference of sets. In mathematics, a
set can have a limited number of elements. Set is a collection of data. We can perform many
operations on set. The difference operation is one of them. The subtract(difference) symbol in the
function represents the removal of the values from the second set from the first set. The
operation of subtraction is a removing or taking away objects from group of object.
The differences of two sets P and Q, is written as P - Q, It contains elements of P which are
not present in elements of Q. Here, result P - Q is obtained. Take set P as usual and compare
Page 80 of 199
with set Q. Now, remove those element in set P which matches with set Q. If P = {a,b,c,d} and Q
= {d,e}, then P - Q = {a,b,c}.
In symbol, we write it as
A - B = {x: x $\in$ A and x $\notin$ B}
Similarly B - A = {x: x $\in$ B and $\notin$ A}.
By representing it in the Venn diagram,
$A \triangle B = \left \{x \setminus x \in A \wedge x \notin B \right \} \vee \left \{ x \notin A
\wedge x\in B \right \}$
Page 81 of 199
The symmetric difference of sets is associative. So, if we have three sets A, B and C, then
$(A \triangle B) \triangle C = A \triangle(B \triangle C)$
The symmetric difference of two sets is commutative i.e. for all sets A and B, we have
$A \triangle B = B \triangle A$
Solved Examples
Question 1: Consider the two sets A = {11,12, 13, 14, 15, 16}, B = {12, 14, 16, 18}. Find the
difference between the two sets?
Solution:
Given A = {11,12, 13, 14, 15, 16}
B = {12, 14, 16, 18}
A - B = {11, 13, 15}
B - A = {18}
The set of all elements are present in A or in B. But, not in both is called the symmetric
difference set.
Page 82 of 199
Here, all elements of A is available in B except 9.
So, the difference A - B = {9}.
Here, all elements of B are available in A except 12.
So, the difference B - A = {12 }.
Question 3: Consider two sets A = {a, b, f, g, h}, B = {f, g, a, k}. Find A - B and B - A?
Solution:
Given A = {a, b , f , g , h}
B = {f, g, a, k} So, A - B = {b, h} and B - A = {k}
Question 4: Consider given sets P = {19, 38, 57, 76, 95} and Q = {7, 19, 57, 75, 94}. Find P -
Q and Q - P.
Solution:
Given P = {19, 38, 57, 76, 95}
Q = {7, 19, 57, 75, 94} So, P - Q = {38,76,95} and Q - P = {7,75,94}
Venn Diagrams
In mathematics, we can use the graphs and diagrams to solve some problems in geometry as well
as in algebra. To follow this procedure, we can show some relations in set theory with the help
of diagram, which is called as the Venn diagram. It is also known as set diagram. Venn
diagrams are named so in the name of its founder John Venn in around 1880.
In set theory, Venn diagrams are studied. A set is defined as a collection of the same types of
things. Venn diagram is an important and unique way of representing sets and various
operations on them. It is a pictorial representation of sets. It is an easy way to understand about
set theory. Venn diagrams are everywhere in set theory. With the help of Venn diagrams, we are
able to show the operations of union, intersection, difference, complement etc. on the given sets.
In this page, we can discuss about these things with the help of a Venn diagram. In this process,
the sets are represented by circles. Venn diagrams are generally used to represent operations on
two or three sets. In order to learn about set theory in detail, one needs to command on Venn
diagrams. In this article, students will learn about different types of Venn diagrams. So, go
ahead with us and understand about Venn diagrams in detail.
Page 83 of 199
What is a Venn Diagram?
A Venn diagram is a pictorial representation of sets by set of points in the plane. The universal
set U is represented pictorially by interior of a rectangle and the other sets are represented by
closed figures viz circles or ellipses or small rectangles or some curved figures lying within the
rectangle.
Venn diagram is a graphical tool in which we use overlapping circles to visually presentation
among some given sets information. In Venn diagram, we can use two or more than two circles
to show sets.
For example, if A and B are any two arbitrary sets, elements such that, some elements are in A
but not in B, some are in B but not in A, some are in both A and B, and some are in neither A
nor B, we represent A and B in the pictorial form as in shown in the Venn diagram.
Page 84 of 199
Disjoint Sets
A and B are disjoint sets as shown in the Venn diagram.
For example, let A = {a, b, c, d, e}, B = {a, b, f, g, h} and C = {a, c, e, f, g, j, k}. Here, we can
find A ∩ B, B ∩ C, A ∩ C and A ∩ B ∩ C with the help of triple Venn diagram.
Page 85 of 199
4 Circle Venn Diagram
Some times, we have four sets in a given problem and we want to show their relationship with
the help of Venn diagram. For this, we can draw four circles in a rectangle box, each circle
represents a unique set. Then, according to sets relation fill all the elements at their place.
Page 86 of 199
Picture of a Venn Diagram
If we have two sets A and B, then A ∪ B i.e. A union B:
A ∩ B i.e. A intersection B:
Page 87 of 199
A and B are disjoint sets:
A subset B:
Solved Example
Question: There are 40 players participated in tournament match. In that, 20 players play in
volley ball match and 20 players play in football match and 5 players play in both volley ball and
Page 88 of 199
football match. Solve this problem by using Venn diagram. How many of the players are either
in match and how many are in neither match?
Solution:
There are two categories, one is volleyball and other one is football.
Step 1:
Draw Venn diagram depending up on the classification given in the problem.
Step 2:
Note that 5 players play both volleyball and football match
Step 3:
Here, we accounted for 5 of the 20 players in volleyball match, leaving 15 players taking
volleyball match but not football match. So, I will put "15" in the "volleyball only" part of the
"volley ball" circle.
Page 89 of 199
Step 4:
Here, we accounted for 5 of the 20 players in football match, leaving 15 players taking
football match but not volleyball match. So, I will put "15" in the "football only" part of the
"football" circle.
Step 5:
The total of 5 + 15 + 15 = 35 players are in either volley ball match or football match (or
both). The total numbers of players are 40 and participating players are 35 only.
40 - 35 = 5 players
Page 90 of 199
Boolean Algebra
In 1850, George Boole, an English mathematician developed rules and theorems that became
Boolean algebra.
Logic can be used to break down complex problems to simple and understandable problems.
The binary nature of logic problems was studied by Cloude Shannon of MTI in 1938. Shannon
applied Boolean algebra to relay logic switching circuits as means of realizing electric circuits.
Electric circuits used for digital computers are designed to generate only two voltage levels
The binary number system requires two symbols hence its logical to identify a binary symbol
with each voltage level. If we interpolate the high level as a binary 1and low level as a binary 0,
then we are using a positive logic system.
Boolean operation is any logical operation in which each of the operands and the result take
one of two values, as “true” and “false” or “circuit on” and “circuit off.”
Truth tables
A truth table is a breakdown of a logic function by listing all possible values the function can
attain. Such a table typically contains several rows and columns, with the top row representing
the logical variables and combinations, in increasing complexity leading up to the final function.
Page 91 of 199
Logic Functions gates and circuitry
From Boolean algebra, we get three basic logic factions that form the basis of all digital
computer functions. These basic functions are: AND, OR and NOT
NOTE – The input and output variables are usually represented by letters as ABC or XYZ
AND function
The AND function can be thought of as a series circuit containing two or more switches
A B
Circuit diagram
The logic indicator L will be ON only when logic switches A and B are both crossed. Switches A
and B have two possible logic states, open and crossed. This can be represented in binary form
as 0 – open and 1 – crossed.
Truth table
A B L(x.y)
0 0 0
0 1 0
1 0 0
1 1 1
The truth table is used to illustrate all the possible combinations of input and output conditions
that can exist in a logic circuit. The Boolean expression used to represent an AND function is as
follows
A.B=L
Page 92 of 199
And is symbolized as
A
L
B
OR function
The function can be thought of as a parallel circuit containing two or more logic switches
L
B
Circuit Diagram
Here, the logic indicator L will be ON whenever logic switch A and B are crossed. The truth
table, Expression and Symbol of OR function is as follows
Truth table
A B L(x+y) A
0 0 0 A+B=L L
0 1 1 B
1 0 1
Symbol diagram
1 1 1
NOT function
It can be thought of as an inverter or negative circuit.
Page 93 of 199
L
A
Circuit diagram
Truth table
A L(x)‘
0 1 A =A’ A A’
1 0
Symbol diagram
NAND
If an AND gate is followed by an NOT gate then the combination is called an NAND gate and has
following truth table and Boolean expression.
Truth table
A B L (x.y)‘ A
(A.B)’=L
0 0 1 L
0 1 0 B
1 0 0
1 1 0 B Symbol diagram
NOR
If an OR gate is followed by an NOT gate then the combination is called an NOR gate and has
following truth table and Boolean expression.
Page 94 of 199
Truth table
A B L (x+y)‘
0 0 1 A
(A+B)’=L L
0 1 1
1 0 1 B
1 1 0
B Symbol diagram
B
XOR
This output strictly on condition that input is either high but not 2 highs
Truth table
A B L (x±y) A
0 0 0 A + B =L L
0 1 1 B
1 0 1
1 1 0 B Symbol diagram
B
XNOR
This output strictly on condition that input is either high but not 2 highs
Truth table
A B L (x±y)‘ A
A B=L L
0
0
0
1
1
0
* B
1 0 0 B
1 1 1
. B
Boolean theorems
1. Cumulative laws
i. A+B=B+A ii. AB=BA
2. Associative laws
i. (A+B)+C=A(B+C)=A+B+C ii. A(BC)=A(BC)=ABC
Page 95 of 199
3. Distributive laws
i. A(B+C)=AB+AC ii. A+BC=(A+B)(A+C)
- This state that an expression can be expanded by multiplying term by term just like
ordinary algebra. It indicates thus we can factor an expression
4. Identity law
i. A+A=A ii. AA=A
5. Negative law
i. A’=A’ ii. A’’=A
6. Redundancy laws
i. A+AB=A(1+B)=A(1)=1 N/b 1+n=1 where n=any num/char
ii. A(A+B)=AA+AB=A+AB=A
iii. 0+A=A
iv. 0A=0
v. 1+A=1
vi. 1A=A
vii. A’+A=1
viii. A’A=0
ix. A+AB’=A+B
x. A(A’+B)=AB
EXAMPLE
Z=(A’+B)(A+B)=AA’+A’B+AB+BB=0+A’B+AB+B=B(A’+A+1)=B(1+1)=B
Proves
i. AC+ABC=AC
Let y=AC+ABC
ii. (A+B)(A+C)=A+BC
Let y= (A+B)(A+C)
=A(A+C)+B(A+C)=AA+AC+AB+CB=A+AC+AB+CB
Page 96 of 199
= A(1+B)+AC+BC=A+AC+BC=A(1+C)+CB=A+BC
iii. A+A’B=A+B
Let y= A+A’B
= A.1+A’B=A(1+B)+A’B=A.1+AB+A’B=A+AB+A’B
= A+B(A+A’)=A+B
iv. (A+B)(A+B’)(A’+C)=AC
Let y=(A+B)(A+B’)(A’+C)
= (AA+AB’+BA+BB’)A’+C=(A+AB+AB’)(A’+C)
= *A(1+B)+AB’+(A’+C)
= (A+AB’)(A’+C)=A(1+B’)(A’+C)=A.1(A’+C)=A(A’+C)=AA’+AC=AC
B
Y
C
7. Dedmorgans theorems
The theorems are useful in simplifying expressions in which a product or sum of
variables is complimented or inverted.
a) (A+B)’=A’B’
When the OR sum of two variables (A+B) is complimented, this is same as if the 2
variable’s compliments were ANDed.
b) (AB)’=A’+B’
Page 97 of 199
Compliment of an AND product is equal to OR sum of its compliment
In K—map, the Boolean variables are transferred (generally from a truth table) and ordered
according to the principles of gray code in which only one variable changes in between squares.
Once the table is generated and the output possibilities transcribed, the data is arranged into
the largest possible groups containing 2n cells (n=0, 1, 2, 3...) and the minterms generated
through the axiom laws of Boolean algebra
Note
A minterm is a product (AND) of all variables in the function, in directs or complemented form.
A minterm has the property that it is equal to 1 on exactly one row of the truth table.
A maxterm is a sum (OR) of all the variables in the function, in direct or complemented form. A
maxterm has the property that it is equal to 0 on exactly one row of the truth table.
Don't care conditions are represented by X in the K-Map table. A don't-care term for a function is an
input-sequence (a series of bits) for which the function output does not matter (0,1).
AB 00 01 11 10
(A’B’) (A’B) (AB) (AB’)
CD
00 M0 M4 M12 M8
(C’D’)
01 M1 M5 M13 M9
(C’D)
11 M3 M7 M15 M11
(CD)
10 M2 M6 M14 M10
(CD’)
Procedure
K-map method may theoretically be applied to simplify any Boolean expression through works
well with <=6 variable.
Page 98 of 199