logical gates

4
Gates Gates are Fundamentals Building blocks of digital system. These are digital circuits constructed from diodes, transistors and resistors that produce output from some given inputs. They are also called Logic Gates. Tables of Gates called “Truth Tables”. In Logic Gates, we use binary values (1, 0). We can say Low and High values (1=high value, 0=low value). We have other names of these values, are True and False (1=true, 0=false). Usually Gates have two inputs except the NOT gate. We have 7 gates. AND, OR, NOT, NOR, NAND, XOR and XNOR. (1) AND: In AND gate, if we have both inputs true, then output will be true. Otherwise the output will be false. Operation: A.B & A&B Truth Inpu t Output A B A AND B 0 0 0 0 1 0 1 0 0 1 1 1

Upload: first-time-productions

Post on 07-Aug-2015

53 views

Category:

Engineering


2 download

TRANSCRIPT

Page 1: Logical Gates

GatesGates are Fundamentals Building blocks of digital system.These are digital circuits constructed from diodes, transistors and resistors that produce output from some given inputs. They are also called Logic Gates. Tables of Gates called “Truth Tables”.In Logic Gates, we use binary values (1, 0). We can say Low and High values (1=high value, 0=low value). We have other names of these values, are True and False (1=true, 0=false). Usually Gates have two inputs except the NOT gate.

We have 7 gates. AND, OR, NOT, NOR, NAND, XOR and XNOR.

(1) AND:

In AND gate, if we have both inputs true, then output

will be true. Otherwise the output will be false.

Operation: A.B & A&B

(2) OR:

In OR gate, if any input is true then output

Will be true.

Operation: A+B

Truth Table

Input Output

A B A AND B

0 0 0

0 1 0

1 0 0

1 1 1

Input OutputA B A OR B0 0 00 1 11 0 11 1 1

Page 2: Logical Gates

(3) NOT:

This gate has only one input. We also called it

Inverter. It inverts the values.

Operation: or ~

(4) NAND:

It is addition of AND gate with NOT gate, they form NAND gate. NOT gate inverted outputs of AND gate and give the result of a NAND gate.

Operation: A.B or A|B

(5) NOR:

It is addition of OR and NOT gate.

The small ball ( ) indicates NOT gate.

Operation: A+B or A-B

Input Output

A NOT A

1 0

0 1

Input OutputA B A NAND B0 0 10 1 11 0 11 1 0

Input OutputA B A NOR B0 0 10 1 01 0 01 1 0

Page 3: Logical Gates

(6) XOR:

In XOR gate, same inputs give False output, and different inputs give True output.

Operation:

(7) XNOR:

It is addition of XOR and NOT gates. We simply read it “ex-nor” or “e-nor”.Basically, it is “exclusive-NOR”.

Operation: or

Using combinations of logic gates, complex operations can be performed. In theory, there is no limit to the number of gates that can be arrayed together in a single device. But in practice, there is a limit to the number of gates that can be packed into a given physical space.

Input OutputA B A XOR B0 0 00 1 11 0 11 1 0

Input Output

A B A XNOR B

0 0 1

1 0 0

0 1 0

1 1 1