Unit 2 Boolean Algebra and Logic Gates Complete Notes
Unit 2 Boolean Algebra and Logic Gates Complete Notes
UNIT 2
Analog system is one which operates on continuous data, usually of a physical nature such as
length, voltage or current, etc. An analog machine is usually a special purpose device dedicated
to a single task. Analog systems are based on analog signals that are continuous signals.
These types of systems were widely used in scientific and industrial applications. These are used
in a hospital to measure the size of the stone in kidney and mental diseases diagnostics.
Analog system works by measuring rather than counting. It is usually used for scientific work
rather than personal purpose and commercial use so it is special purpose system. It is powerful in
solving differential equations.
Digital System:
Digital systems contain devices such as logic gates, flip-flops, shift registers and counters.
Boolean algebra is the algebra of logic that deals with the study of binary
variables and logical operations. It makes possible to transform logical statements into
mathematical symbols and to calculate the truth or falsity of related statements by using rules. It
is named after George Boole, a 19th-century Mathematician and Philosopher, who was the first
to try and to formalize what we call logic or reasoning.
In computer science field, binary logic is referred as 'Digital Logic' which is considered as the
heart of the operation of all modern digital computers. It shows the logical relationship between
two or more logical functions. Instead of the use of T and F for true and false (which is
frequently used for the truth tables) for the indication of the state of the sentences, Boolean
algebra usually denotes it by 1 and 0 respectively. It is a branch of algebra in which the values of
the variables are the truth values; true or false respectively.
This symbolic logic which was designed using variables and symbols is the language used to
describe and manipulate logical statements and determine whether they are true or not. Through
this, certain logical statements can be expressed in mathematical terms. For example, the
symbols '•', '-' and '+' represent 'and', 'not „and 'or „respectively. Aside from its many applications
in the design of computers, it serves as the foundation of information theory.
Boolean variable:
A Boolean variable is the variables which have only two states i.e. true/
false or right/ wrong or on/off or 0/1. As a computer is a binary system, it operates on an
electronic signal which has only 2 possible states.
The signal that does not change its state with time is called constant signal and its value always
remains the same i.e. either 1 or 0 whereas a variable signal continuously changes its state
according to the time. At some point, the value of the variable signal may be 1 and at some
another point, it might be 0.Therefore, these variables which consist of only two values i.e. 1 and
0 are Boolean variables or logic variables. These variables are denoted by English capital letters
like A, B, X, Y, etc.
unary operator called NOT. The unary operator performs on a single operand whereas a binary
operator requires more than one operand. Followings are their symbols:
Operator Symbols
OR ~, +, V, U (Union)
AND (.),^, Intersection
NOT Ë…, („), (‾), Negation
Its basic operations are AND, OR and NOT Its basic operations include addition,
operations. subtraction, multiplication, and division.
It has only a finite set of elements. That is, it It deals with real numbers that contain an
deals with only two elements; 0 and 1. infinite number of elements (1, 2, 3…).
F = X.Y.Z‟+X.YHere, X, Y, Z are Boolean variables. The equation on the right-hand side above
is known as an expression. Each occurrence of a variable or its complement in an expression is
called literal.So, there are altogether three variables i.e. X, Y and Z and five literals; X, Y, Z‟, X,
and Y.
Logical circuit By using transistors or Integrated Circuits (IC) or (LSI), the high and low-level
voltage electrical signals called logical elements are produced. These logical elements are
essential for the composition of a circuit for a specific operation called logical circuit.
Introduction:
An operator is a special symbol that indicates the operation to be carried out between two
operands. An operation is an action to be carried out upon operands. There are 3 basic Boolean
Operations: AND, OR and NOT operations.
AND operation: Known as logical multiplication, it is carried out by dot (.) operator or
simply by AND. If the inputs are true, it generates true output. Otherwise, it generates
false output. Its logical equation is written as C=A.B or C=A AND B. The truth table of
AND operation is:
Inputs Output
A B C=A.B
False False False
False True False
False False False
True True False
OR operation Known as logical addition, it is carried out by plus (+) operator or simply
by OR. If at least one input is true, it generates true output or else, it gives false output.
The logical equation of OR operation is written as C=A+B or C=A OR B. The truth table
of OR operation is given below:
Inputs Output
A B C=A+B
NOT Operation Also known as the logical compliment, it is carried out by prime („)
operator or bar (‾). It generates the output opposite the input i.e. if the input is true, it
generates false output and vice versa. It's logical equation can be written as C=A‟. The
truth table of OR operation is:
Inputs Output
A C=A’
True False
False True
= AA +A (B + C)
= A + AB + AC → since AA = A
= (A+ AB) + AC
= A + AC → since A + AB = A
= A → since A + AC = A
Therefore Ax = A
Similarly, for Bx = B [ A + (B + C) ]
= AB +B (B + C)
= AB + BB + BC
= AB + B + BC → since BB = B
= (B+ BC) + AB
= B + AB → since B + BC = B
= B → since B + AB = B
Using these above equations, we can say that the relation between A, B, C and + operator doesn‟t
change when multiplied by another variable like x, such as xy = yx = x = y.
yx = ((A + B) + C) x
= (A + B) x + Cx
= (Ax + Bx) + Cx
= (A + B) + C
= y xy = (A + (B + C)) y
= Ay + (B + C) y
= Ay + (By + Cy)
= A + (B + C)
=x
So, x = y, which means A + (B + C) = (A + B) + C = B + (A +C)
Example
Take three variables 0, 1 and 0, then
According to associative law,
(0 + 1) + 0 = 0 + (1 + 0)
1+0=0+1
1=1
Hence associative law is verified.
Hence the Associative law is proved, (A + B + C) = (A + B) +C = A + (B + C) = B + (C + A)
Associate Law of Multiplication:
Statement:
Associative law of multiplication states that ANDing more than two variables i.e. mathematical
multiplication operation performed on variables will return the same value irrespective of the
grouping of variables in an equation.
The Associative law using AND operator can be written as
A * (B * C) = (A * B) * C
Distributive law:
This is the most used and most important law in Boolean algebra, which involves in 2 operators:
AND, OR.
Statement1:
The multiplication of two variables and adding the result with a variable will result in same value
as multiplication of addition of the variable with individual variables.
In other words, ANDing two variables and ORing the result with another variable is equal to
AND of ORing of the variable with the two individual variables.
Distributive law can be written as
A + BC = (A + B)(A + C)
This is called OR distributes over AND.
Proof:
If A, B and C are three variables then
A + BC = A * 1 + BC → since A*1 = A
= A (1 + B) + BC → since 1 + B = 1
= A * 1 + AB + BC
= A *(1 + C) + AB + BC → since A*A = A*1 = A
= A *(A + C) + B (A + C)
= (A + C) (A + B)
A + BC = (A + B) (A + C)
Hence, distributive law is proved.
Statement 2:
The addition of two variables and multiplying the result with a variable will result in same value
as addition of multiplication of the variable with individual variables.
In other words, ORing two variables and ANDing the result with another variable is equal to OR
of ANDing of the variable with the two individual variables.
Distributive law can be written as
A (B+C) = (A B) + (A C)
This is called AND distributes over OR.
Proof:
A (B + C) = A (B*1) + A (C*1) → since 1 * B = B, 1 * C = C
= [(AB)*(A*1)] + [(AC) *(A*1)]
=[(AB) * A] + [(AC) *A]
= (A +1) (AB + AC)
= (AB +AC) → since 1 + A = 1
Hence, distributive law is proved.
Example:
Take three variables 0, 1 and 0, then
According to distributive law,
0 (1 + 0) = (0*1) + (0*0)
0 (1) = (0) + (0)
0=0
Hence, distributive law is verified.
Commutative law:
Statement:
Commutative law states that the inter-changing of the order of operands in a Boolean equation
does not change its result.
Using OR operator → A + B = B + A
Using AND operator → A * B = B * A
This law is also having more priority in Boolean algebra.
Example:
Take 2 variables 1 and 0, then
1+0=0+1
1=1
Similarly,
1*0=0*1
0=0
Absorption Law:
Absorption law involves in linking of a pair of binary operations.
i. A+AB = A
ii. A(A+B) = A
iii. A+ĀB = A+B
iv. A.(Ā+B) = AB
3rd and 4th laws are also called as Redundancy laws.
Statement 1: A + AB = A
Proof:
A + AB = A.1 + AB → since A.1 = A
=A(1+B) → since 1 + B = 1
= A.1
=A
Statement 2: A (A + B) = A
Proof:
A (A + B) = A.A + A.B
= A+AB → since A . A = A
= A (1 + B)
= A.1
=A
Statement 3: A + ĀB = A + B
Proof:
A + ĀB = (A + Ā) (A + B) → since A+BC = (A+B)(A+C) using distributive law
= 1 * (A + B) → since A + Ā = 1
=A + B
Statement 4: A * (Ā+B) = AB
Proof: A * (Ā + B) = A. Ā + AB
= AB → since A Ā = 0
Duality Principle in Boolean algebra:
Statement:
Duality principle states that “The Dual of the expression can be achieved by replacing the AND
operator with OR operator, along with replacing the binary variables, such as replacing 1 with 0
and replacing 0 with 1”.
This law explains that, replacing the variables doesn‟t change the value of the Boolean function.
But while interchanging the names of the variables, we must change the binary operators also.
“If the operators and variables of an equation or function that produce no change in the output of
the equation, though they are interchanged is called “Duals”.
The Duality principle is also known as “De Morgan Duality”, which states that „Interchanging of
Duals pairs in Boolean algebra will result in same output of the equation‟.
There is one special type of operation in duality that is „Self-dual‟. A self-dual operation
processes the input to the output, without making any changes to it. So, this is also called “Do
nothing operation”.
Example:
If we have the Boolean equation like A + B = 0, then the equation formed by replacing the
variable 0 with 1 and replacing the OR operator with AND operator is A * B = 1. This means
both the Boolean functions are represents the operation of logic circuit.
As per Duality principle, if A, B are two variables then both the equations A + B = 0 and A * B =
1 are true in case of same logic circuit.
Simplification of Boolean functions using Duality
The De Morgan‟s first theorem states, “The complement of the sum is equal to the product of
complement of individual variable”. Let X and Y be two Boolean variables then De Morgan‟s
theorem mathematically expressed as (X + Y)l = Xl . Yl
Proof:
Proof:
De-Morgan's laws can also be implemented in Boolean algebra in the following steps:-
1. While using Boolean algebra, firstly, we exchange the given operator like if (+) is there
then exchange it with (.) and if (.) is there then exchange it with (+).
2. Next, find the complement of each term.
De-Morgan's theorem can be proved by the simple induction method from the table given below.
0 0 1 1 0 0 1 1 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 1 0 0 0 0
From the above table, firstly, the value of X= 0 and the value of Y = 0. Now, for this values X' =
1, Y' = 1. Again, X+Y = 0 and X.Y = 0. Thus (X+Y)' = 1 and (X.Y)' = 1, X' + Y' = 1 and X'.Y' =
1. From this table, we can see that the value of column no. 7 and 8 are equal and column no. 9
and 10 are also equal which proves the De-Morgan's theorem. Again, different values of X and
Y, we see the same thing i.e. column no. 7 and 8 are equal to each other and column no. 9 and 10
are equal to each other. Thus, the above table proves De-Morgan's theorem.
Consensus Theorem:
Consensus theorem is an important theorem in Boolean algebra, to solve and simplify the
Boolean functions.
Statement
The consensus theorem states that the consensus term of a disjunction is defined when the terms
in function are reciprocals to each other (such as A and A ). Consensus theorem is defined in two
statements (normal form and its dual). They are
AB + ĀC+BC = AB+ĀC
(A+B) (Ā+C) (B+C) = (A+B) (Ā+C)
Proof of Consensus theorem
Inverse Law:
This law states that”A+A=1” and “A.A=0”.
Involution Law:
(x')' = x. From Inverse law, we have x + x' = 1 and x.x' = 0, which defines the
complement of x. The complement of x' is x and is also (x')'. Therefore, since the complement is
unique, we have that (x')' = x.
Idempotent Law:
It states that “A.A=A” and “A+A=A”.
Null Law:
It States that”0.A=0” and 1+A=A”.
Logic Gates: AND, OR, NOT, NAND, NOR, XOR, and XNOR- its
definition, use, truth table, logic symbol:
AND Gate:
The AND Gate contain two or more than to input values which produce only one output value.
AND gate produces 1 output when all inputs are 1, otherwise the output will be 0. It can be
explained with the help of two switches connected in series. In AND gate, current is flowing in
the circuit only when both switches, A and B, are closed.
The switch contains two states which are ON or OFF. The ON means the logic 1 and the OFF
means the logic 0. So, when both switches are ON, the output is 1 and when any of the switches
are OFF, the output is 0.
The graphical symbol, logical circuit, algebraic expression and truth table of AND gate is shown
below:
OR Gate:
The OR Gate contains two or more than two input values which produce only one output value.
OR gate produces 1 output, when one of the inputs is 1. If inputs are 0, then the output will be
also 0. It can be explained by taking an example of two switches connected in parallel.
The graphical symbol, algebraic expression and truth table of OR gate is as shown below:
NOT Gate:
The NOT Gate contains only one input value which produces only one output value. This gate is
also known as an inverter. So, this circuit inverts the logical sense of a binary signal. It produces
the complemented function. If the input is 1, then this gate will produce 0 as output and vice-
versa. The graphical symbol, algebraic expression and truth table of a NOT gate is given below.
Universal Gates:
NAND Gate:
The NAND Gate contains two or more than two input values which produce only one output
value. This gate is the combination of AND and NOT gates. This gate is a complement of AND
functions. This gate produces output 0, when all inputs are 1, otherwise, output will be 1.
The graphical symbol, algebraic expression and truth table of NAND gate is shown below:
NOR Gate:
The NOR Gate contains two or more than two input values which produce
only one output value. This gate is a combination of OR and NOT gate. This gate is the
complement of the OR function. This gate produces 1 output, when all inputs are 0 otherwise
outputs will 0.
The graphical symbol, algebraic expression and truth table of NOR gate is given below:
Combinational Gates:
This gate contains two or more than two input values which produce only one output value. The
graphical symbol of X-OR gate is similar to OR gate except for the additional curve line on the
input side. This gate produces 1 as output, if any input is 1 and 0 if both inputs are either 1 or 0,
otherwise its output is 0.The graphical symbol, algebraic expression and truth table of X-OR gate
isgivenbelow:
The graphical symbol, algebraic expression and truth table of X-NOR gate is shown below: