0% found this document useful (0 votes)
2K views23 pages

Unit 2 Boolean Algebra and Logic Gates Complete Notes

This document provides an overview of digital logic and Boolean algebra. It defines analog and digital systems, with analog systems operating on continuous data and digital systems operating on discrete binary data. Boolean algebra is then introduced as the algebra of logic that uses binary variables and logical operations. The basic logical operations of AND, OR, and NOT are defined. Finally, the document outlines the differences between Boolean and ordinary algebra, and defines a logic function as a Boolean expression using binary variables and logical operators.

Uploaded by

ram5nath-3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views23 pages

Unit 2 Boolean Algebra and Logic Gates Complete Notes

This document provides an overview of digital logic and Boolean algebra. It defines analog and digital systems, with analog systems operating on continuous data and digital systems operating on discrete binary data. Boolean algebra is then introduced as the algebra of logic that uses binary variables and logical operations. The basic logical operations of AND, OR, and NOT are defined. Finally, the document outlines the differences between Boolean and ordinary algebra, and defines a logic function as a Boolean expression using binary variables and logical operators.

Uploaded by

ram5nath-3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Lecturer Notes on Digital Logic Department of Computer Engineering & BCA

UNIT 2

BOOLEAN ALGEBRA AND LOGIC GATE

2.1 Introduction to Digital System:


 Analog System:

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.

Characteristics of analog system

 The speed of an analog system is fast but has no state.


 These systems work with physical values such as temperature, pressure etc.
 These systems are based on continuous data.
 These systems are not reliable and are difficult to use and operate.
 These systems are the base for digital systems.
 These systems have small memory.
 No possibility of reprogramming.
 Normally, an analog system cannot be reprogrammed.

 Digital System:

The system which works on discrete data or discontinuous data is known


as a digital system. It works on a binary system where 0 represent off and 1 represents on. It
is based on digital signals i.e. discrete signals.

Digital systems contain devices such as logic gates, flip-flops, shift registers and counters.

DEC Compiled By Er. Harendra Bikram Shah Page 1 of 23


Lecturer Notes on Digital Logic Department of Computer Engineering & BCA

 Advantages of digital system:


 Have made possible many scientific, industrial, and commercial advances that would
have been unattainable otherwise.
 Less expensive More reliable
 Easy to manipulate
 Flexibility and Compatibility
 Information storage can be easier in digital system systems than in analog ones. New
features can often be added to a digital system more easily too.

 Disadvantages of digital system:


 Use more energy than analog circuits to accomplish the same tasks, thus producing more
heat as well.
 Digital circuits are often fragile, in that if a single piece of digital data is lost or
misinterpreted, the meaning of large blocks of related data can completely change.
 Digital system manipulates discrete elements of information by means of a binary code.
 Quantization error during analog signal sampling.

Differences Between Analog and Digital System:

Digital system Analog system


I. Digital system works upon discrete
I. Analog system works on continuous data.
(discontinuous) data.
ii. These systems work with natural or
ii. This system works with a digit.
physical value.
iii. The accuracy is high. iii. The accuracy is low.
iv. It is general purpose in nature. iv. It is a special purpose in nature.
v. It has no or limited storage capacity. v. It has high storage capacity.
vi. It does single purpose job. vi. It does a multi-purpose job.
vii. No possibility of reprogramming. vii. It can be reprogrammed.
viii. The cost is low and portable. viii. The cost is high and easily not portable.
ix. Example: Desktop system ix. Example: Presley

DEC Compiled By Er. Harendra Bikram Shah Page 2 of 23


Lecturer Notes on Digital Logic Department of Computer Engineering & BCA

4.1 Boolean algebra and Logic Function:


 Boolean algebra:

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.

 Boolean algebra as switching algebra:

Boolean algebra which is also known as the Switching algebra


consists of two elements (0 and 1) has two binary operators called OR and AND and another

DEC Compiled By Er. Harendra Bikram Shah Page 3 of 23


Lecturer Notes on Digital Logic Department of Computer Engineering & BCA

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

Differences between Boolean algebra and Ordinary algebra:

Boolean algebra Ordinary algebra

Its basic operations are AND, OR and NOT Its basic operations include addition,
operations. subtraction, multiplication, and division.

There is no exponents or coefficients involved It consists of coefficients and exponents


in Boolean algebra i.e. A+A=A and A.A=A. such as A+A=2A and A.A=A2.

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…).

It holds both distributive laws:


It holds only one distributive law:
A.(B+C)=(A.B)+(A.C)and
A.(B+C)=(A.B)+(A.C)
A+(B.C)=(A+B).(A+C)

It is used in the field of digital electronics. It is used in the field of mathematics.

DEC Compiled By Er. Harendra Bikram Shah Page 4 of 23


Lecturer Notes on Digital Logic Department of Computer Engineering & BCA

 Logic function (Boolean function):

Boolean function, commonly known as a logic function is an expression


expressed algebraically with binary variables, logical operation symbols, parenthesis and equal
sign. For a given value of the binary variables, the logic function can be either 0 or 1.

Example: Consider the logic function in algebraic expression:

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.

Basic Logical/ Boolean Operation:

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

DEC Compiled By Er. Harendra Bikram Shah Page 5 of 23


Lecturer Notes on Digital Logic Department of Computer Engineering & BCA

 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

False False False

False True True

True False True

True True True

 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

DEC Compiled By Er. Harendra Bikram Shah Page 6 of 23


Lecturer Notes on Digital Logic Department of Computer Engineering & BCA

Basic Laws and Proofs


The basic rules and laws of Boolean algebraic system are known as “Laws of Boolean algebra”.
Some of the basic laws (rules) of the Boolean algebra are
i. Associative law
ii. Distributive law
iii. Commutative law
iv. Absorption law
v. Consensus law
vi. Involution Law
vii. Inverse Law
viii. Idempotent Law
ix. Null Law
Associative Law
 Associate Law of Addition
Statement:
Associative law of addition states that OR ing more than two variables i.e. mathematical addition
operation performed on variables will return the same value irrespective of the grouping of
variables in an equation.
It involves in swapping of variables in groups.
The Associative law using OR operator can be written as
A+(B+C) = (A+B)+C
Proof:
If A, B and C are three variables, then the grouping of 3 variables with 2 variables in each set
will be of 3 types, such as (A + B), (B + C) and(C + A).
According to associative law
(A + B + C) = (A + B) +C = A + (B + C) = B + (C + A)
We know that, A + AB = A (according to Absorption law)
Now let‟s assume that, x = A + (B + C) and y = (A + B) + C
According to associative law, we need to prove that x = y.
Now, find Ax = A [ A + (B + C)]

DEC Compiled By Er. Harendra Bikram Shah Page 7 of 23


Lecturer Notes on Digital Logic Department of Computer Engineering & BCA

= 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,

DEC Compiled By Er. Harendra Bikram Shah Page 8 of 23


Lecturer Notes on Digital Logic Department of Computer Engineering & BCA

(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)

DEC Compiled By Er. Harendra Bikram Shah Page 9 of 23


Lecturer Notes on Digital Logic Department of Computer Engineering & BCA

= (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:

DEC Compiled By Er. Harendra Bikram Shah Page 10 of 23


Lecturer Notes on Digital Logic Department of Computer Engineering & BCA

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

DEC Compiled By Er. Harendra Bikram Shah Page 11 of 23


Lecturer Notes on Digital Logic Department of Computer Engineering & BCA

= 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.

DEC Compiled By Er. Harendra Bikram Shah Page 12 of 23


Lecturer Notes on Digital Logic Department of Computer Engineering & BCA

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

Example of simplification of Boolean function by using Duality concept


(A +B‟ C)‟ = A‟ B C + A‟ B C‟ + A‟ B‟ C‟
= A‟ B (C + C‟) + (B + B‟) A‟ C‟
= A‟ B + A‟ C‟ – – – – – – – -> (1)
Taking inverse on both sides, the equations becomes
(A +B‟ C) = (A + B‟) (A + C) – – – – – – – -> (2)
If we observe the equations 1 and 2, we can observe that the AND operator and OR operators are
interchanged. Hence Duality theorem is proved.
Boolean functions can be simplified by using max terms (SOP) and mean terms (POS) method,
based on Duality principle.
SOP method means, sum of products. In this method, the max terms of Boolean variables are
written as their sum of products.
POS method means, product of sums. In this method, the min terms of Boolean variables are
written as their product of sums.
 De Morgan’s Theorem:
De Morgan's theorem is associated with Boolean algebra, which was given by great logical
and mathematician, De Morgan. So, it is called "De Morgan's theorem".
De Morgan proposed 2 theorems, which will help us in solving the algebraic problems in
digital electronics.
The De Morgan‟s statements are,

 First Theorem(Addition Law):

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:

DEC Compiled By Er. Harendra Bikram Shah Page 13 of 23


Lecturer Notes on Digital Logic Department of Computer Engineering & BCA

 Second Theorem (Multiplication Law):

De Morgan‟s second theorem states,” The complement of a product is


equal to the sum of the complements 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:

DEC Compiled By Er. Harendra Bikram Shah Page 14 of 23


Lecturer Notes on Digital Logic Department of Computer Engineering & BCA

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.

X Y X‟ Y' X+Y X.Y (X+Y)‟ X‟.Y‟ (X.Y)‟ X‟+Y‟

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

DEC Compiled By Er. Harendra Bikram Shah Page 15 of 23


Lecturer Notes on Digital Logic Department of Computer Engineering & BCA

Statement 1: AB + ĀC+BC = AB+ĀC


AB+ĀC+BC = AB + ĀC + BC.1
= AB + ĀC + BC (A + Ā) → since A + Ā = 1
= AB + ĀC + ABC + ĀBC
= AB (1 + C) + ĀC (1 + B)
= AB + ĀC → since 1 + B = 1 + C = 1
Example
By using consensus theorem, prove that A‟BD‟ + BCD + ABC‟ + AB‟D = BC‟D‟ + AD + A‟BC
Sol:
A‟BD‟ + BCD + ABC‟ + AB‟D = A‟BD‟ + BCD + ABC‟ + AB‟D + A‟BC + BC‟D‟ + ABD
= AD + A‟BD‟ + BCD + ABC‟ + A‟BC + BC‟D‟
= AD + A‟BC + BC‟D‟
Dual of Consensus Theorem
The statement of dual of consensus theorem is
(A+B) (B+C) (A‟+C) = (A+B) (A‟+C)
Proof
Step 1: Reducing the left side of the equation
(A + B) (B + C) (A‟ + C) = ((A + B) (B + C)) (A‟ + C)
= (AB + AC + BB + BC) (A‟+C)
= (AB + AC + B + BC) (A‟ + C)
=(AB + AC + (B + BC)) (A‟ + C)
= (AB + AC + B) (A‟ + C)
= (B + AB + AC) (A‟ + C)
= ((B + AB) + AC) (A‟ + C)
= (B + AC) (A‟ + C)
= A‟B + BC + AA‟C + ACC
= A‟B + BC + 0 + AC
= A‟B + BC + AC

DEC Compiled By Er. Harendra Bikram Shah Page 16 of 23


Lecturer Notes on Digital Logic Department of Computer Engineering & BCA

Step 2: Reducing the right side of the equation


(A+B) (A‟+C) = AA‟ + A‟B + AC + BC
=0 + A‟B + AC + BC
=A‟B + AC + BC
Now we can see that, R.H.S. = L.H.S.
Hence, the Dual of the consensus theorem is proved.

 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:

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:

DEC Compiled By Er. Harendra Bikram Shah Page 17 of 23


Lecturer Notes on Digital Logic Department of Computer Engineering & BCA

 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:

DEC Compiled By Er. Harendra Bikram Shah Page 18 of 23


Lecturer Notes on Digital Logic Department of Computer Engineering & BCA

 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:

Two universal gates are given below:

 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:

DEC Compiled By Er. Harendra Bikram Shah Page 19 of 23


Lecturer Notes on Digital Logic Department of Computer Engineering & BCA

 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:

 Exclusive OR (X-OR) Gate:

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:

DEC Compiled By Er. Harendra Bikram Shah Page 20 of 23


Lecturer Notes on Digital Logic Department of Computer Engineering & BCA

 Exclusive NOR (X-NOR) Gate:

This gate contains two or more than two input values


which produce only one output value. The X-NOR is the complement of the X-OR, as indicated
by the small circle in the graphical symbol. This gate produces 1 output, when all inputs are
either 0 or 1, otherwise its output value is 0.

The graphical symbol, algebraic expression and truth table of X-NOR gate is shown below:

 Canonical and Standard form:

 Concept of Literals and Terms:


Y=AB+BC
Y=ABC+A’BC+A’B’C

A Boolean function or logical function is an expression that consists of binary variable


either in normal or in complement forms. And connected by logical operators. Each
variable in the Boolean function is called “literals” and group of literals is called “Term”.
E.g. Y=ABC+AB+ABC‟
Where, A,B and C are literals and ABC ,AB,ABC‟ are terms.
Usually literals and terms are arranged in a one of two standard forms.

I). Sum of Products (SOP):


In this case product (ANDIng) terms are ORed together.
For e.g. Y=AB+ABC+AB‟C

II). Product of Sum (POS):


In this case (ORing) terms are ANDed together
For e.g. Y= (A+B+C)(A+B)(A+B+C‟)
If each term in Sop and POS contain all the literals present in the logical expression then
they are known as standard SOP and POS term.

DEC Compiled By Er. Harendra Bikram Shah Page 21 of 23


Lecturer Notes on Digital Logic Department of Computer Engineering & BCA

# Converting Non-SOP to SOP:


Non-SOP can be converted into Standard Sop by ANDIng the terms in the expression with the
terms found by ORing the literals and other complements which are not present in that terms.
For e.g. Y=AB+ABC+AC
The non-standard SOP expression is
Y=AB+BC+A‟C
=AB (C+C‟) +BC (A+A‟)+A‟C(B+B‟)
=ABC+ABC‟+ABC+A‟BC+A‟BC+A‟B‟C
= ABC+ABC‟+A‟BC+A‟B‟C

#Converting nonstandard POS to Standard POS:


Non-standard POS can be converted into standard POS by ORing the terms in the expression
with the terms found by ANDIng the literals and there complement which are not present in that
terms.
For e.g.:- The non-standard POS expression is
Y= (A+B) (B+C) (A‟+C)
= [(A+B) + C.C‟]. [(B+C) + AA‟]. [(A‟+C)+BB‟]
= (A+B+C)(A+B+C‟)(ABC)(A‟+B+C)(A‟+B+C)(A‟+B‟+C)
= (A+B+C)(A+B+C‟)(A‟+B+C)(A‟+B‟+C)

 Midterm’s and Maxterms:-


Each individual term in standard SOP is called a minterms and each individual term in
standard POS is Maxterms.
For e.g. Y=ABC+AB‟C+AB‟C Minterms
Y=(A+B+C)(A+B‟+C)(A+B‟+C‟) Maxterms
NOTE: Minterms variable:-0 A‟, 1 A
Maxterms variable:-0 A, 1 A‟

DEC Compiled By Er. Harendra Bikram Shah Page 22 of 23


Lecturer Notes on Digital Logic Department of Computer Engineering & BCA

Variable Minterms Maxterms


A B C Term designation Term designation
0 0 0 A‟B‟C M0 A+B+C M0
0 0 1 A‟B‟C M1 A+B+C‟ M1
0 1 0 A‟BC‟ M2 A+B‟+C M2
0 1 1 A‟BC M3 A+B‟+C‟ M3
1 0 0 AB‟C‟ M4 A‟+B+C M4
1 0 1 AB‟C M5 A‟+B+C‟ M5
1 1 0 ABC‟ M6 A‟+B‟+C M6
1 1 1 ABC M7 A‟+B‟+C‟ M7

Important Questions in this Unit for Exams:


a. Show the universality of NOR and NAND gate?
b. Conversion from SOP to POS ad POS to SOP?
c. State and Prove De-Morgan‟s Theorem?
d. Conversion of Boolean function into minterm and maxterm?

For the solution of above questions refer to class sessions.

DEC Compiled By Er. Harendra Bikram Shah Page 23 of 23

You might also like