Unit 3 Boolean Algebra and Logic Gates
Unit 3 Boolean Algebra and Logic Gates
UNIT :3
Boolean Algebra and Logic Gates
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, in 1854 AD, Mathematician and Philosopher, who was the first to
try and to formalize what we call logic or reasoning.
❖ 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.
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. Y Here, 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.
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
Inputs Output
A C=A’
True False
False True
Truth Table:
The truth table is a table of all possible combinations of the variables showing the
relation between the values that variables may take and the result of the operation. The table used
to represent the Boolean expression of a logic gate function called a truth table. A truth table shows
each possible input combination to the gate or circuit with the resultant output depending upon the
combination of input.
3.2 Logic Gates: AND, OR, NOT, NAND, NOR, XOR, and XNOR- its
definition, use, truth table, logic symbol:
A logic gate is an electronic circuit that operates on one or more input signals to produce an output
signal. A logic gate is also known building block of a digital circuit. Mostly, the logic gate consists
of two inputs and one output. Gates produce the signals 1 or 0 if input requirements are satisfied.
Digital computer uses different types of logical gates. Each gate has a specific function and
graphical symbol. The function of the gate is expressed by means of an algebraic expression. The
basic gates are described below:
• 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 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.
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 function.
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 output will 0.
The graphical symbol, algebraic expression and truth table of NOR gate is given below:
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:
➢ De Morgan’s Theorem:
• First Theorem:
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 for two variable
Proof:
• Second Theorem:
Proof:
3.5 Minterm, Maxterm, SoP and PoS, Canonical and Standard Form:
A minterm is a product (AND) of all variables in the function, in direct or complemented form.
Example:
The min terms are x’y’, x’y, xy’ and xy.
A maxterm is a sum (OR) of all the variables in the function, in direct or complemented form.
Example:
The Max terms are x + y, x + y’, x’ + y and x’ + y’.
The following table shows the representation of min terms and MAX terms for 2 variables.
0 0 m0=x’y’ M0=x + y
0 1 m1=x’y M1=x + y’
1 0 m2=xy’ M2=x’ + y
1 1 m3=xy M3=x’ + y’
P Q F Minterms
0 0 0 P’Q’
0 1 1 P’Q
1 0 1 PQ’
1 1 1 PQ
P Q F Maxterms
0 0 0 P+Q
0 1 1 P+ Q’
1 0 1 P’+Q
1 1 0 P’+Q’
Finally, we can take the product of all max terms that has 0 for F. Thus; the final expression is as
follows.
F = (P+Q). (P’ + Q’)
Standard PoS form means Standard Product of Sums form. In this form, each sum term need not
contain all literals. So, the sum terms may or may not be the Max terms. Therefore, the Standard
PoS form is the simplified form of canonical PoS form.
We will get Standard PoS form of output variable in two steps.
Get the canonical PoS form of output variable
Simplify the above Boolean function, which is in canonical PoS form.
Follow the same procedure for other output variables also, if there is more than one output variable.
Sometimes, it may not possible to simplify the canonical PoS form. In that case, both canonical
and standard PoS forms are same.
Example
Convert the following Boolean function into Standard PoS form.
f = p+q+rp+q+r.p+q+r′p+q+r′.p+q′+rp+q′+r.p′+q+rp′+q+r
The given Boolean function is in canonical PoS form. Now, we have to simplify this Boolean
function in order to get standard PoS form.
Therefore, both Standard SoP and Standard PoS forms are Dual to each other.
NOTE: Above Concept will be fully used in Upcoming Units. So, students are
requested to take a look, a very serious look at above topics too.