0% found this document useful (0 votes)
25 views111 pages

Ece Unit3complete Lpu Notes

Ece
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)
25 views111 pages

Ece Unit3complete Lpu Notes

Ece
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/ 111

lOMoARcPSD|31279878

ECE249: BASIC ELECTRICAL AND ELECTRONICS ENGINEERING


Introduction to Number System and Logic Gates

UNIT-3
LECTURE Prepared by Dr. Krishan Kumar

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

INFORMATION
•CA-2(Assignment) based on Porteous Software,
assignment after Midterm Exam, Assignment
given in 9th WEEK and submit in 10th Week
•CA-3(Project)-Form group of 4 students, submit
your project title in first week of October, submit
Project with in 15th November to 20th November

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Project Report
FRONT PAGE-GROUP DETAIL
-INTRODUCTION
-CIRCUIT DIAGRAM
-WORKING
-APPLICATION
-ADVENTAGE/DISADVENTAGE
-CONCLUSION
Note-Submit report each project group during project
presentation in month of November(15th November to 20th
November)

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

KEYWORDS
• OR
• NOT
• AND
• EX-OR
• EX-NOR
• DECIMAL
• HEXADECIMAL
• OCTAL
Downloaded by Vibhav ([email protected])
lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Binary to Decimal Convert 11012 to


decimal.
The same method can be used to convert
binary number to decimal:
= (1x23)+(1x22)+(0x21)+(1x20)
= 8 + 4 +0 +1
= 1310
Therefore 11012 = 1310.
Downloaded by Vibhav ([email protected])
lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Convert B2D16 to decimal.


Using the same method to convert
hexadecimal to decimal.
= (Bx162)+(2x161)+(Dx160)
= (11x162)+(2x161)+(13x160)
= 2816 + 32 +13
= 286110
Therefore B2D16 =
286110.
Downloaded by Vibhav ([email protected])
lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

BCD to Excess-3 Steps


Step 1 -- Convert BCD to decimal.
Step 2 -- Add (3)10 to this decimal number.
Step 3 -- Convert into binary to get excess-3 code.
Example − convert (0110)BCD to Excess-3.
Step 1 − Convert to decimal (0110)BCD = (6)10
Step 2 − Add 3 to decimal (6)10 + (3)10 = (9)10
Step 3 − Convert to Excess-3 (9)10 = (1001)2
Result
(0110)BCD = (1001)XS-3

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Logic gate
Logic gates are used to carry out logical operations on single
or multiple binary inputs and give one binary output. In simple
terms, logic gates are the electronic circuits in a digital
system.

A logic gate is a device that acts as a building block for


digital circuits.

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

The basic logic gates are categorized into seven


types as AND, OR, XOR, NAND, NOR, XNOR, and
NOT.

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Applications of logic gates

• Logic gates are used in


• Microprocessors,
• Microcontrollers,
• Embedded system applications, and
• in electronic and electrical project circuits.

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Advantages of Logic Gates

•Logic gates are quick yet use low energy.


•Logic gates don't get overworked.
•Logic gates can lessen the prescribed number of I/O ports
needed by a microcontroller.

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Real life example of logic gates


The basic logic gates are used in
many circuits like
•Push button lock,
•Light activated burglar alarm,
•Safety thermostat,
•an Automatic watering system
etc.
Downloaded by Vibhav ([email protected])
lOMoARcPSD|31279878

AND Gate

A circuit which performs an AND operation is shown in figure.


It has n input (n >= 2) and one output.

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

OR Gate
A circuit which performs an OR operation is shown in figure. It has
n input (n >= 2) and one output.

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

NOT Gate
NOT gate is also known as
Inverter. It has one input A and
one output Y.

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

NAND Gate
A NOT-AND operation is known as NAND operation. It has n input
(n >= 2) and one output.

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

NOT Gate
NOT gate is also known as
Inverter. It has one input A and
one output Y.

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

NOR Gate
A NOT-OR operation is known as NOR operation. It has n input (n >= 2) and one output.

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

The XOR gate is used in the adder, subtractor and controlled inverter circuit.
It is also used in the computers for implementing the binary addition.

A B Z
0 0 0
0 1 1
1 0 1
1 1 0

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

“Exclusive-NOR Gate” is a combination


of the Exclusive-OR gate and the NOT gate but has a
truth table similar to the standard NOR gate in that
it has an output that is normally at logic level “1”
and goes “LOW” to logic level “0” when ANY of its
inputs are at logic level “1”.

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

PROBLEM-Design combinational circuit by using gate for


given expression

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

PROBLEM 2 -Design circuit with logic expression by logic gate, expression


given below

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Boolean Algebra
• Boolean algebra is a branch of mathematics that deals
with operations on logical values with binary variables.
• The Boolean variables are represented as
binary numbers to represent truths: 1 = true and 0 =
false.
• Elementary algebra deals with numerical
operations whereas Boolean algebra deals with
logical operations.
• Boolean Algebra is used to analyze and simplify the
digital (logic) circuits.
• It uses only the binary numbers i.e. 0 and 1. It is also
called as Binary Algebra or logical Algebra. Boolean
algebra was invented by George Boole in 1854.
Downloaded by Vibhav ([email protected])
lOMoARcPSD|31279878

Boolean Algebra
Rule in Boolean Algebra
•Variable used can have only two values. Binary 1 for HIGH and
Binary 0 for LOW.
•Complement of a variable is represented by an overbar (-). Thus,
complement of variable B is represented as B Bar. Thus if B = 0
then B Bar = 1 and B = 1 then B Bar = 0.
•ORing of the variables is represented by a plus (+) sign between
them. For example ORing of A, B, C is represented as A + B + C.
•Logical ANDing of the two or more variable is represented by
writing a dot between them such as A.B.C. Sometime the dot may
be omitted like ABC.

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

simplify this Boolean function on the basis of rules given by


Boolean algebra.
AB + A (B+C) + B (B+C)
AB + AB + AC + BB + BC {Distributive law; A (B+C) = AB+AC, B (B+C) = BB+BC}

AB + AB + AC + B + BC {Idempotent law; BB = B}

AB + AC + B + BC {Idempotent law; AB+AB = AB}

AB + AC +B {Absorption law; B+BC = B}

B + AC {Absorption law; AB+B = B}

Hence, the simplified Boolean function will be B + AC.


The logic diagram for Boolean function B + AC can be represented as:

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Sum of Product

• SOP stands for Sum of Product. SOP form is a set of


product(AND) terms that are summed(OR) together.
• When an expression or term is represented in a
sum of binary terms known as min_terms and sum of
products.
• The terms “product” and “sum” have been
borrowed from mathematics to describe AND and
OR logic operations.
Implement the Function given below using the SOP.
F = ABC + DEF

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Minterm means the term that is true for a


minimum number of combination of inputs.
That is true for only one combination of
inputs.

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

EXAMPLE

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Converting an SOP Expression into a Truth Table


sum of product
Q = A.B.C + A.B.C + A.B.C

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Construct SOP from a Truth Table:

rules that need to follow while constructing a logic circuit from


any truth table. These rules for the SOP circuits are given below:

1.A circuit for a truth table with N input columns can use AND
gates with N inputs, and each row in the truth table with a ‘1’ in
the output column requires one N-input AND gate.

2.Inputs to the AND gate are inverted if the input shows a ‘0’ on
the row, and not inverted if the input shows a ‘1’ on the row.

3.All AND terms are connected to an M-input OR gate, where M


is the number of ‘1’ output rows.

The output of the OR gate is the function output.


Downloaded by Vibhav ([email protected])
lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Sum-of-Product Example
The following Boolean Algebra expression is given as:
Q = A(BC + BC + BC) + ABC
1.Convert this logical equation into an equivalent SOP term.
2.Use a truth table to show all the possible combinations of input conditions
that will produces an output.
3.Draw a logic gate diagram for the expression.

1. Convert to SOP term

Q = A.B.C + A.B.C + A.B.C + A.B.C

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Converting shorthand notation to SOP expression


The process of converting shorthand notation to SOP
is the reverse process of converting SOP expression
to shorthand notation.
Example
Let us assume that we have a boolean function F,
which defined on two variables X and Y. The minterms
for the function F are expressed as shorthand
notation is as follows:
F=∑(1,2,3)

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Product of Sum (POS)

Consists of Maxterms. The Boolean function F is defined on


two variables X and Y. The X and Y are the inputs of the boolean
function F whose output is true when only one of the inputs is
set to true.
The truth table for Boolean expression F is as follows:

Inputs Output
X Y F
0 0 0
0 1 1
1 0 1
1 1 0

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Inputs Output
X Y F M
0 0 0 X'+Y'
0 1 1 X'+Y
1 0 1 X+Y'
1 1 1 X+Y

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Product of Sums (POS):

As the name suggests, it is formed by


multiplying(AND operation) the sum terms.
These sum terms are also called as ‘max-
terms’. Max-terms are represented with ‘M’,
they are the sum (OR operation) of Boolean
variables either in normal form or
complemented form.
Therefore, POS is product of maxterms and is
represented as:
F in POS = Pi M(1, 2) Here, F is product of
maxterm1 and maxterm2.

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

K-Map
In many digital circuits need to find expression with minimum variables. We can minimize
Boolean expressions of 3, 4 variables very easily using K-map without using any Boolean
algebra theorems. K-map can take two forms Sum of Product (SOP) and Product of Sum
(POS) according to the need of problem. K-map is table like representation but it gives
more information than TRUTH TABLE.
We fill grid of K-map with 0’s and 1’s then solve it by making groups.
Steps to solve expression using K-map-
1.Select K-map according to the number of variables.
2.Identify minterms or maxterms as given in problem.
3.For SOP put 1’s in blocks of K-map respective to the minterms (0’s
elsewhere).
4.For POS put 0’s in blocks of K-map respective to the maxterms(1’s
elsewhere).
5.Make rectangular groups containing total terms in power of two like
2,4,8 ..(except 1) and try to cover as many elements as you can in one
group.
From the groups made in step 5 find the product terms and sum them up
for SOP form.
Downloaded by Vibhav ([email protected])
lOMoARcPSD|31279878

The Karnaugh Map also called as K Map is a graphical


representation that provides a systematic method for
simplifying the boolean expressions.
For a boolean expression consisting of n-variables, number
of cells required in K Map = 2n cells.

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Three Variable K Map-

Three variable K Map is drawn for a boolean expression consisting of three variables.
The number of cells present in three variable K Map = 23 = 8 cells.
So, for a boolean function consisting of three variables, we draw a 2 x 4 K Map.

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Four Variable K Map-

Four variable K Map is drawn for a boolean expression consisting of four variables.
The number of cells present in four variable K Map = 24 = 16 cells.
So, for a boolean function consisting of four variables, we draw a 4 x 4 K Map.

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Rule-07:
There should be as few groups as possible.

EXAMPLE1:
Minimize the following boolean function-
F(A, B, C, D) = Σm(0, 1, 2, 5, 7, 8, 9, 10, 13, 15)

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

EXAMPLE-02
Minimize the following boolean function-
F(A, B, C, D) = Σm(0, 1, 3, 5, 7, 8, 9, 11, 13, 15)

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

EXAMPLE 3
Minimize the following boolean function-
F(A, B, C, D) = Σm(1, 3, 4, 6, 8, 9, 11, 13, 15) + Σd(0, 2, 14)

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

EXAMPLE 4

Minimize the following boolean function-


F(A, B, C) = Σm(0, 1, 6, 7) + Σd(3, 5)

Solution-

Since the given boolean expression has 3 variables, so we


draw a 2 x 4 K Map.

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

EXAMPLE6

Minimize the following boolean function- F(A, B, C) = Σm(0, 1, 6, 7) + Σd(3, 4, 5)


Solution-
Since the given boolean expression has 3 variables, so we draw a 2 x 4 K Map.
We fill the cells of K Map in accordance with the given boolean function. Then, we
form the groups in accordance with the above rules.

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Question

Minimize the following boolean function-


F(A, B, C, D) = Σm(0, 2, 8, 10, 14) + Σd(5, 15)

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

PROBLEM

Minimize the following boolean function-


F(A, B, C, D) = Σm(3, 4, 5, 7, 9, 13, 14, 15)

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

QUESTION

Consider the following boolean function-


F(W, X, Y, Z) = Σm(1, 3, 4, 6, 9, 11, 12, 14)

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

QUAD UNDERSTANDING WITH POS

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

If we take the product of these three terms,


then we will get this final expression –

(P’ + Q’) (P’ + R’) (P + Q + R)

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

4 variables K-map

F (P, Q, R, S) = π (3, 5, 7, 8, 10, 11, 12, 13)

Finally, we will express these in the form of the product –

(R + S’+ Q’).(R’ + S’+A).(P’+ R + S).(P’+ Q + R’)

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Always remember that POS ≠ (SOP)’


the correct form would be (POS of F)
= (SOP of F’)’

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Gray Code is a form of binary that uses a different


method of incrementing from one number to the next.
With Gray Code, only one bit changes state from one
position to another.
This feature allows a system designer to perform some
error checking (i.e., if more than one bit changes, the
data must be incorrect).

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Excess-3 CODE

Excess-3, also called XS3, is a non-weighted code used to express decimal number-s.
It is another important binary code. It is particularly significant for arithmetic operations as it
overcomes the shortcomings encountered while using the 8421 BCD code to add two decimal digits
whose sum exceeds 9. This code is used in some old computers.

The Excess-3 code for a given decimal number is determined by adding ‘3’ to each decimal digit in
the given number and then replacing each digit of the newly found decimal number by its four bit
binary equivalent. For example, XS3 code of 24 is obtained as

2 4

+3 +3

5 7

0101 0111

Thus, XS3 code of 24 is 0101 0111.

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Downloaded by Vibhav ([email protected])


lOMoARcPSD|31279878

Any Queries

Downloaded by Vibhav ([email protected])

You might also like