Download as pdf or txt
Download as pdf or txt
You are on page 1of 73

ECE249: BASIC ELECTRICAL AND ELECTRONICS ENGINEERING

Introduction to Number System and Logic Gates

UNIT-3
LECTURE Prepared by Dr. Krishan Kumar
INFORMATION
• CA-2(Assignment) based on Porteous Software,
assignment after Midterm Exam
• 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
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)
KEYWORDS
• OR
• NOT
• AND
• EX-OR
• EX-NOR
• DECIMAL
• HEXADECIMAL
• OCTAL
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.
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.
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
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.
The basic logic gates are categorized into seven
types as AND, OR, XOR, NAND, NOR, XNOR, and
NOT.
Applications of logic gates

• Logic gates are used in


• Microprocessors,
• Microcontrollers,
• Embedded system applications, and
• in electronic and electrical project circuits.
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.
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.
AND Gate

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


It has n input (n >= 2) and one output.
OR Gate
A circuit which performs an OR operation is shown in figure. It has
n input (n >= 2) and one output.
NOT Gate
NOT gate is also known as Inverter.
It has one input A and one output Y.
NAND Gate
A NOT-AND operation is known as NAND operation. It has n input
(n >= 2) and one output.
NOT Gate
NOT gate is also known as Inverter. It
has one input A and one output Y.
NOR Gate
A NOT-OR operation is known as NOR operation. It has n input (n >= 2) and one output.
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
“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”.
PROBLEM-Design combinational circuit by using gate for
given expression
PROBLEM 2 -Design circuit with logic expression by logic gate, expression
given below
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.
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.
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:
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
Minterm means the term that is true for a
minimum number of combination of inputs.
That is true for only one combination of
inputs.
EXAMPLE
Converting an SOP Expression into a Truth Table
sum of product
Q = A.B.C + A.B.C + A.B.C
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.


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


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)
Product of Sum (POS)
A canonical product of sum is a Boolean expression Entirely
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
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
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.
Any Queries

You might also like