logic-gates

You might also like

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

Logic Gates

1
Table of Contents
2

• Postulates of Boolean Algebra


• Positive & Negative Logic
• Truth Table
• Logic Gates:
• AND
• OR
• NOT
• NAND
• NOR
• Exclusive-OR Gate,
• Universal Gates.
Postulates of Boolean Algebra
3

•Postulates means assume the existence, fact, or


truth of something as a basis for reasoning,
discussion, or belief.
•In our everyday life, we have frequently faced
with two valued queries like “is action right or
wrong”, “a result is true or false” and lots of our
energy is wasted for answering these types of
question, by utilizing our thinking and logic.
Postulates of Boolean Algebra
4

•The logic has a connection with mathematics and


it was first proposed by De-Morgan, but George
Boole tried to perform a mathematical analysis of
logic and on the basis of his investigation of the
laws of thought, a Gorge Boole constructed a
“Logical Algebra” and this is known as “Boolean
Algebra”.
Postulates of Boolean Algebra
5

•Boolean algebra deals with any logical variables


and these variables can have only one value at a
time among two values i.e. variable can have
either 0 or 1.
•Example:-
•If Computer is on then A=1 and if Computer is
off then A=0.
Postulates of Boolean Algebra
6

•The basis for reasoning of this Boolean Algebra is


that any variable can have only two states.
•If A=1 then A≠0
•If A=0 then A≠1
•Here value of A has no numerical significance as
these denotes logic states only.
Postulates of Boolean Algebra
7

•If Student is Present then B=1


•If Student is not Present then B=0

•If B=0 then B ≠ 1


Positive & Negative Logic
8

•Positive logic: If the signal that activates the logic


gate has for its high (1) level a voltage more
positive than for its low (0) level then the polarity
of the logic is called positive logic.
•Negative logic: If the signal that activates the logic
gate has for its high (1) level a voltage more
negative than for its low (0) level then the polarity
of the logic is called negative logic.
Positive & Negative Logic
9

• When a circuit requires logic 1 to operate, engineers may refer


to this condition as positive logic. Thus, the more
positive voltage causes the action to take place.
• On the other hand, if a circuit requires a logic 0 to cause action,
this type circuit is referred to as negative logic.
• There is nothing negative or positive about these various
circuits.
• The notation simply provides a shorthand that tells engineers
and users whether a logic 1 or a logic 0 causes an action.
Positive & Negative Logic
10

Sr No Positive Negative Sr No Positive Negative


1 On Off 7 Present AB
2 1 0 8 First Last
3 High Low 9 Activate Deactivate
4 Right Wrong 10 Start End / Stop
5 True False 11 Normal Abnormal
6 Up Down 12 If else
11

Logic Gates
Logic Gates
12

•Digital systems are said to be constructed by


using logic gates.
•Logic gates are the basic building blocks of any
digital system.
•It is an logic circuit which can have one or more
than one input and only one output.
•The relationship between the input and the
output is based on a certain logic.
The above said logic gates can be
classified into following categories:
13
Truth Table
14

• Truth tables help understand the behavior of logic


gates. A table is combinations of the binary variables
showing the relationship between the values that the
variables can have and the values of the output results
associated with that Logic Gate.
• One of the common tool in specifying a gate function is
the truth table. All possible combination of the inputs
A, B … etc, are enumerated, one row for each possible
combination. Then a column is used to show the
corresponding output value.
Truth Table
15

• Then a column is used to show the corresponding


output value.
a) They show how the input(s) of a logic gate relate to
its output(s).
b) The gate input(s) are shown in the left column(s) of
the table with all the different possible input
combinations. This is normally done by making the
inputs count up in binary.
c) The gate output(s) are shown in the right hand side
column.
Truth Table
16

Inputs Output
A B Y=A+B
0 0 0
0 1 1
1 0 1
1 1 1
BOOLEAN EXPRESSIONS
17

•Boolean Algebra Expressions can be used


to construct digital logic truth tables for
their respective functions.
•The Boolean expression means a
mathematical representation of inputs
and its associated outputs for any logic
gate.
1) NOT GATE
18

•The NOT gate is a single input single output gate.


•A NOT gate also called as Inverter / Complement
because it performs the inversion of the applied
binary signal.
•Logically with NOT gates, the input and the
output swap, so if you input 1 it outputs as 0;
likewise if you input 0 it outputs as 1.
The logic symbol of NOT Gate:-
19

Truth Table:-

Input (A) Output (Y= Ā)


0 1
1 0
Observation:-
20

1) If input is 1 (High) then output will be Zero (Low).


2) If input is Zero (Low) then output will be 1 (High).
• The symbol of the not gate is a triangle with a bubble
on its end.
• This bubble is known as the inversion bubble.
• It gives the complement of the input signal.
• It is also known as the decision making devices because
it has only one input.
2) OR GATE
21

•An OR gate has two or more than two inputs and


having only one output.
•It performs Logical Addition on inputs and It does
not perform mathematical addition.
•This gate is represented by plus (+) symbol
between two variables.
The logic symbol of OR Gate:-
22

• Boolean Expression: - Y= A+B


Truth Table of OR Gate
23

Inputs Output
A B Y= A+B
0 0 0
0 1 1
1 0 1
1 1 1
Observation:-
24

1)If any one of the input is 1 (High) then


output will be 1 (High).
2)If all the inputs are Zero (Low) then
output will be Zero (Low).
3) AND Gate
25

•An AND gate is a digital logic gate with two or


more inputs and one output that performs
logical conjunction / Multiplication.
•It does not perform mathematical
Multiplication.
•This gate is represented by dot (.) between
two variables.
The logic symbol of AND Gate:-
26

Boolean Expression: - Y= A . B
Truth Table of AND Gate
27

Inputs Output
A B Y= A.B
0 0 0
0 1 0
1 0 0
1 1 1
Observation:-
28

•If any one of the input is Zero (Low)


then output will be Zero (Low).
•If all the inputs are 1 (High) then
output will be 1 (High).
4) NAND GATE
29

•The Logic NAND Gate is a combination of AND


gate and a NOT gate connected together in series.
•An NAND gate (sometimes referred to by its
extended name, Negated AND gate) is a logic gate
with two or more inputs but having only one
output. The output of NAND gate is exactly
opposite to AND gate.
The logic symbol of NAND Gate:-
30

Simplified Symbol Extended Symbol

Boolean Expression: -
Truth Table of NAND Gate
31

Inputs Output
A B Y= A.B
0 0 1
0 1 1
1 0 1
1 1 0
32

•A=1,B=1
•1.1 = 1 = 0
Observation of NAND Gate
33

1)If any one of the input is Zero


(Low) then output will be 1 (High).
2)If all the inputs are 1 (High) then
output will be Zero (Low).
5) NOR Gate
34

•The Logic NOR gate is a combination of the OR


gate and NOT gate connected together in series.
•A NOR gate (sometimes referred to by its
extended name, Negated OR gate) is a logic gate
with two or more inputs but having only one
output.
•The output of NOR gate is exactly opposite to OR
gate.
The logic symbol of NOR Gate:-
35

Simplified Symbol Extended Symbol

Boolean Expression: -
Truth Table of NOR Gate
36

Inputs Output
A B Y= A+B
0 0 1
0 1 0
1 0 0
1 1 0
Observation of NOR Gate
37

1)If any one of the input is 1 (High)


then output will be Zero (Low).
2)If all the inputs are Zero (Low) then
output will be 1 (High).
6) EX-OR GATE
38

• EX-OR gate also called as X-OR gate and it is pronounced


as Exclusive OR gate. It is a special purpose logic gate.
• This gate has two or more inputs and having only one
output.
• The EX-OR gate has a high output only when an odd
number of inputs are high.
• For the two input EX-OR gates, the output will be high
when the set of input is either 01 or 10.
The logic symbol of EX-OR Gate:-
39

Simplified Symbol Extended Symbol

Boolean 𝒀=𝑨 ⊕𝑩 ഥ𝑩+𝑨𝑩


𝒀= 𝑨 ഥ
Expression: -
Truth Table of NOR Gate
40

Inputs Output
A B 𝒀= 𝑨⊕𝑩
0 0 0
0 1 1
1 0 1
1 1 0
Boolean ഥ𝑩+𝑨𝑩
𝒀= 𝑨 ഥ
Expression: -
41
Inputs Output
1) For AB: 00
A B 𝒀= 𝑨⊕𝑩
Y= 𝟎ഥ .𝟎 + 𝟎 .𝟎

0 0 0
0 1 1
= 𝟏 .𝟎 + 𝟎 .𝟏
1 0 1
1 1 0
=𝟎+𝟎

=𝟎
Boolean ഥ𝑩+𝑨𝑩
𝒀= 𝑨 ഥ
Expression: -
42
Inputs Output
2) For AB: 01 A B 𝒀= 𝑨⊕𝑩
Y= 𝟎 ഥ .𝟏 + 𝟎 .𝟏
ഥ 0 0 0
0 1 1
1 0 1
= 𝟏 .𝟏 + 𝟎 .𝟎 1 1 0

=𝟏+𝟎

=𝟏
Boolean ഥ𝑩+𝑨𝑩
𝒀= 𝑨 ഥ
Expression: -
43
Inputs Output
3) For AB: 10 A B 𝒀= 𝑨⊕𝑩
Y= 𝟏ഥ .𝟎 + 𝟏 .𝟎
ഥ 0 0 0
0 1 1
1 0 1
= 𝟎 .𝟎 + 𝟏 .𝟏 1 1 0

=𝟎+𝟏
=𝟏
Boolean ഥ𝑩+𝑨𝑩
𝒀= 𝑨 ഥ
Expression: -
44
Inputs Output
4) For AB: 11 A B 𝒀= 𝑨⊕𝑩
Y= 𝟏 ഥ .𝟏 + 𝟏 .𝟏
ഥ 0 0 0
0 1 1
= 𝟎 .𝟏 + 𝟏 .𝟎 1 0 1
1 1 0

=𝟎+𝟎
=𝟎
45
Inputs Output
1) For AB: 00
A B 𝒀= 𝑨⊕𝑩
Y= 𝟎ഥ .𝟎 + 𝟎 .𝟎
ഥ = 𝟏 .𝟎 + 𝟎 .𝟏 = 𝟎 + 𝟎 = 𝟎
0 0 0
2) For AB: 01 0 1 1
Y= 𝟎ഥ .𝟏 + 𝟎 .𝟏
ഥ = 𝟏 .𝟏 + 𝟎 .𝟎 = 𝟏 + 𝟎 = 𝟏 1 0 1
3) For AB: 10 1 1 0

Y= 𝟏ഥ .𝟎 + 𝟏 .𝟎
ഥ = 𝟎 .𝟎 + 𝟏 .𝟏 = 𝟎 + 𝟏 = 𝟏
4) For AB: 11
Y= 𝟏ഥ .𝟏 + 𝟏 .𝟏
ഥ = 𝟎 .𝟏 + 𝟏 .𝟎 = 𝟎 + 𝟎 = 𝟎
Observation of EX-OR Gate
46

1)The EX-OR gate has a high output


only when an odd number of inputs
are high.
7) EX-NOR
47

• EX-NOR gate also called as X-NOR gate and it is pronounced


as Exclusive NOR gate. It is a special purpose logic gate.
• This gate has two or more inputs and having only one output.
• The EX-NOR gate has a Low output only when an odd number
of inputs are Low.
• For the two input EX-NOR gates, the output will be Low when
the set of input is either 01 or 10.
• It is the complementary of the EX-OR gate.
• EX-NOR gate works exactly opposite to EX-OR gate.
The logic symbol of EX-NOR Gate:-
48

Simplified Symbol Extended Symbol

Boolean 𝒀=𝑨 ⊕𝑩 ഥ𝑩+𝑨𝑩



𝒀= 𝑨
Expression: -
Truth Table of NOR Gate
49

Inputs Output
A B 𝒀= 𝑨⊕𝑩
0 0 1
0 1 0
1 0 0
1 1 1
50

Inputs Output
1) For AB: 00
A B 𝒀= 𝑨⊕𝑩
Y= 𝟎 ഥ .𝟎 + 𝟎 .𝟎
ഥ 0 0 1
0 1 0
ഥ .𝟎 + 𝟎 .𝟎
ഥ = 𝟏 .𝟎 + 𝟎 .𝟏 1 0 0
Y= 𝟎 1 1 1

ഥ .𝟎 + 𝟎 .𝟎
Y= 𝟎 ഥ = 𝟏 .𝟎 + 𝟎 .𝟏 = 𝟎 + 𝟎

ഥ .𝟎 + 𝟎 .𝟎
Y= 𝟎 ഥ = 𝟏 .𝟎 + 𝟎 .𝟏 = 𝟎 + 𝟎 = 𝟎
ഥ=𝟏
51

2) For AB: 01 Inputs Output


A B 𝒀= 𝑨⊕𝑩
Y= 𝟎 ഥ .𝟏 + 𝟎 .𝟏
ഥ 0 0 1
0 1 0
ഥ .𝟏 + 𝟎 .𝟏
Y= 𝟎 ഥ = 𝟏 .𝟏 + 𝟎 .𝟎 1 0 0
1 1 1

ഥ .𝟏 + 𝟎 .𝟏
Y= 𝟎 ഥ = 𝟏 .𝟏 + 𝟎 .𝟎 = 𝟏 + 𝟎

ഥ .𝟏 + 𝟎 .𝟏
Y= 𝟎 ഥ = 𝟏 .𝟏 + 𝟎 .𝟎 = 𝟏 + 𝟎 = 𝟏
ഥ=𝟎
52

3) For AB: 10 Inputs Output


ഥ .𝟎 + 𝟏 .𝟎
ഥ = 𝟎 .𝟎 + 𝟏 .𝟏 = 𝟎 + 𝟏 = 𝟏
ഥ=𝟎 A B 𝒀= 𝑨⊕𝑩
Y= 𝟏
0 0 1
3) For AB: 10 0 1 0
1 0 0
Y= 𝟏 ഥ .𝟎 + 𝟏 .𝟎
ഥ = 𝟎 .𝟎 + 𝟏 .𝟏 = 𝟎 + 𝟏 = 𝟏
ഥ=𝟎 1 1 1

3) For AB: 10
Y= 𝟏 ഥ .𝟎 + 𝟏 .𝟎
ഥ = 𝟎 .𝟎 + 𝟏 .𝟏 = 𝟎 + 𝟏 = 𝟏
ഥ=𝟎
3) For AB: 10
Y= 𝟏 ഥ .𝟎 + 𝟏 .𝟎
ഥ = 𝟎 .𝟎 + 𝟏 .𝟏 = 𝟎 + 𝟏 = 𝟏
ഥ=𝟎
53

1) For AB: 00 Inputs Output


ഥ .𝟎 + 𝟎 .𝟎
ഥ = 𝟏 .𝟎 + 𝟎 .𝟏 = 𝟎 + 𝟎 = 𝟎
ഥ=𝟏 A B 𝒀= 𝑨⊕𝑩
Y= 𝟎
0 0 1
2) For AB: 01 0 1 0
Y= 𝟎 ഥ .𝟏 + 𝟎 .𝟏
ഥ = 𝟏 .𝟏 + 𝟎 .𝟎 = 𝟏 + 𝟎 = 𝟏
ഥ=𝟎 1 0 0
1 1 1
3) For AB: 10
Y= 𝟏 ഥ .𝟎 + 𝟏 .𝟎
ഥ = 𝟎 .𝟎 + 𝟏 .𝟏 = 𝟎 + 𝟏 = 𝟏
ഥ=𝟎
4) For AB: 11
Y= 𝟏 ഥ .𝟏 + 𝟏 .𝟏
ഥ = 𝟎 .𝟏 + 𝟏 .𝟎 = 𝟎 + 𝟎 = 𝟎
ഥ=𝟏
54

1) For AB: 00 Inputs Output


ഥ .𝟎 + 𝟎 .𝟎
ഥ = 𝟏 .𝟎 + 𝟎 .𝟏 = 𝟎 + 𝟎 = 𝟎
ഥ=𝟏 A B 𝒀= 𝑨⊕𝑩
Y= 𝟎
0 0 1
2) For AB: 01 0 1 0
Y= 𝟎 ഥ .𝟏 + 𝟎 .𝟏
ഥ = 𝟏 .𝟏 + 𝟎 .𝟎 = 𝟏 + 𝟎 = 𝟏
ഥ=𝟎 1 0 0
1 1 1
3) For AB: 10
Y= 𝟏 ഥ .𝟎 + 𝟏 .𝟎
ഥ = 𝟎 .𝟎 + 𝟏 .𝟏 = 𝟎 + 𝟏 = 𝟏
ഥ=𝟎
4) For AB: 11
Y= 𝟏 ഥ .𝟏 + 𝟏 .𝟏
ഥ = 𝟎 .𝟏 + 𝟏 .𝟎 = 𝟎 + 𝟎 = 𝟎
ഥ=𝟏
Observation of EX-NOR Gate
55

1) EX-NOR gate works exactly opposite to


EX-OR gate.
2) The EX-NOR gate has a Zero (Low)
output only when an odd number of
inputs are Zero (Low).
56

Thank You . . . . . !

You might also like