logic gates - and, or, not, nor, nand, xor, xnor gates

36
LOGIC GATES Presented By, Satya Prakash Joshi.

Upload: satya-joshi

Post on 09-Dec-2014

3.443 views

Category:

Technology


12 download

DESCRIPTION

Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates. Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates. Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.

TRANSCRIPT

Page 1: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

LOGIC GATESPresented By,Satya Prakash Joshi.

Page 2: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

LOGIC GATE• Actually the term logic is applied to digital circuits used to implement

logic functions. Several kinds of digital logic circuits are the basic elements that form the building blocks for such complex digital system as the computer.

• The lines connected to each symbols are the inputs and outputs. • The inputs are on the left of each symbol and the output is on the right.

• A circuit that performs a specific logic operation (AND, OR) is called a logic gate.

Page 3: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

THE INVERTER• The inverter (NOT circuit) performs the operation called inversion or

complementation. • The NOT operation changes one logic level to the opposite logical level.

When the input is Low, the output is high. When the input is high, the output is low.

• The inverter changes one logic level to the opposite level. In terms of bits, it changes a 1 to a 0 and 0 to 1.

Page 4: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

TRUTH TABLE OF INVERTERInput Output

0 11 0

When a High level is applied to an inverter input, a Low level will appear on its output. When a Low level is applied to its input, a High will appear on its output.

LOGICAL EXPRESSION OF INVERTERX = A’

Page 5: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

Logical Symbol.

Page 6: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

THE AND GATE• An AND gate can have two or more inputs and performs what is know as

multiplication. • The output of AND gate is high when all inputs are high otherwise all

outputs are low.

Page 7: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

OPERATION OF AND GATE• An AND gate produces a HIGH output only when all of the inputs are HIGH. When

any of the inputs is LOW, the output is LOW. Therefore, the basic purpose of AND gate is to determine when certain conditions are simultaneously true, as indicated by High levels on all of its inputs, and produces a High on its output.

Inputs OutputA B X0 0 00 1 01 0 01 1 1

Logical Symbol Truth Table

Page 8: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates
Page 9: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

LOGICAL EXPRESSION

• It’s logical expression is, X=A.B

X=ABCAB

X=AB

Page 10: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

FOR THREE INPUT AND GATEINPUT OUTPUT

X Y Z O=X.Y.Z

0 0 0 0

0 0 1 0

0 1 0 0

0 1 1 0

1 0 0 0

1 0 1 0

1 1 0 0

1 1 1 1

Page 11: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

THREE INPUT AND GATE USING (2/1 AND GATES)

Page 12: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

• To determine the total number of possible combination of binary inputs to a gate is determined by the following formula.

N=2n

Where N is the number of possible input combinations and n is the number of input variables.

Example,Two inputs variables; N=22 = 4 Combinations.Three inputs variables; N=23 = 8 Combinations.Four inputs variables; N=24 = 16 Combinations.

Page 13: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

THE OR GATE• OR gate can have two or more inputs and performs what is known as

logical addition. • The output of OR gate is Low when all inputs are low, otherwise all

outputs are high

Page 14: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

OPERATION OF AN OR GATE • An OR gate produces a High on the output when any of the inputs is High.

The output is Low only when all of the inputs are Low. Therefore, an OR gate determines when one or more of its inputs are High and produces a High on its output.

Logical SymbolInputs Output

A B X0 0 00 1 11 0 11 1 1

Truth Table

Page 15: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates
Page 16: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

LOGICAL EXPRESSION• It’s logical expression is, X=A+B

AB

X=A+BABC

X=A+B+C

Page 17: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

FOR THREE INPUT OR GATE

INPUT OUTPUT

X Y Z O=X+Y+Z

0 0 0 0

0 0 1 1

0 1 0 1

0 1 1 1

1 0 0 1

1 0 1 1

1 1 0 1

1 1 1 1

Page 18: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

THREE INPUT OR GATE USING 2/1 OR GATE

Page 19: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

THE NAND GATE• The NAND gate is the one of the popular logic element because it can be

used as a universal gate; that is NAND gate can be used in combination to perform the AND, OR, and inverter operations.

• NAND Gate is constructed by attaching NOT Gate at the output of AND Gate, hence NAND Gate is called NOT- AND Gate.

• NAND Gate has two or more input and only one output. • The output of NAND gate is low when all inputs are high, otherwise all

outputs are high.

Page 20: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

OPERATION OF A NAND GATE• A NAND gate produces a Low output only when all the inputs are High.

When any of the inputs is Low, the output will be High.

Logical SymbolInputs Output

A B X0 0 10 1 11 0 11 1 0

Truth Table

Page 21: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates
Page 22: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

LOGICAL EXPRESSION OF NAND• It’s logical expression is, X= (AB)’

Inputs A B0 0 (0.0)’=

0’=10 1 (0.1)’=

0’=11 0 (1.0)’=

0’=11 1 (1.1)’=

1’=0

Page 23: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

FOR THREE INPUT NAND GATEINPUT OUTPUT

X Y Z O=(X.Y.Z)’

0 0 0 1

0 0 1 1

0 1 0 1

0 1 1 1

1 0 0 1

1 0 1 1

1 1 0 1

1 1 1 0

Page 24: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

THREE INPUT NAND GATE USING 2/1 NAND GATE

Page 25: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

THE NOR GATE• The NOR gate, like the NAND gate, NOR gate is also useful logical

element because it can also be used as a universal gate. • NOR gate can be used in combination to perform the AND, OR and

Inverter operations. • NOR Gate is the combination of NOT gate at the output of OR gate, hence

NOR gate is type of NOT-OR gate. • NOR gate has two or more input and only one output. • The Output of NOR gate is high when all inputs are low otherwise the

output is low.

Page 26: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

OPERATION OF NOR GATE• A NOR gate produces a Low output when any of its inputs is high. Only

when all of it’s inputs are low is the output high.

Logical SymbolInputs Output

A B X0 0 10 1 01 0 01 1 0

Truth Table

Page 27: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates
Page 28: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

EXPRESSION OF NOR GATE• It’s expression is, X=(A+B)’

Inputs A B0 0 (0+0)’=

0’=10 1 (0+1)’=

0’=01 0 (1+0)’=

0’=01 1 (1+1)’=

1’=0

Page 29: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

FOR THREE INPUT NOR GATEINPUT OUTPUT

X Y Z O=(X+Y+Z)’

0 0 0 1

0 0 1 0

0 1 0 0

0 1 1 0

1 0 0 0

1 0 1 0

1 1 0 0

1 1 1 0

Page 30: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

THREE INPUT NOR GATE USING 2/1 NOR GATE

Page 31: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

THE EXCLUSIVE- OR GATE• The exclusive-OR gate has a graphical symbol similar to that of the OR

gate, except for the additional curved line on the input side. • It can take only 2 inputs.• We can’t construct Ex-OR Gate using three input Ex-OR gate. • If both inputs are Low or both are High then it produces the output Low or

0. otherwise it produce the High.

Page 32: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

TRUTH TABLE• Logical Symbol Inputs Output

A B AB’+A’B=X0 0 0.0’+0’.0

=0+0=00 1 0.1’+0’+1=0+

1=11 0 1.0’+1’.0=1+0

=11 1 1.1’+1’.1=0+0

=0

Page 33: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

LOGICAL EXPRESSION• It’s logical expression is X=AB’+A’B

Page 34: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

EXCLUSIVE-NOR GATE• The exclusive-NOR gate is the complement of the exclusive-OR gate, as

indicated by small circle on the output side of the graphic symbol. • It can take only 2 inputs.• We can’t construct Ex-NOR Gate using three input Ex-OR gate. • If both inputs are Low or both are High then it produces the output High

or 1. otherwise it produce the Low output.

Page 35: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

TRUTH TABLE• Logical symbol Inputs Output

A B AB’+A’B=X0 0 0.0+0’.0’=0+1

=00 1 0.1+0’+1’=0+

0=01 0 1.0+1’.0’=0+0

=01 1 1.1+1’.1’=1+0

=1

Page 36: Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates

LOGICAL EXPRESSION• It’s logical expression is