Вы находитесь на странице: 1из 20

Logic Gates

Introduction to Digital Logic


Basics
Hardware consists of a few simple building blocks
These are called logic gates
AND, OR, NOT,
NAND, NOR, XOR,

Logic gates are built using transistors


NOT gate can be implemented by a single transistor
AND gate requires 3 transistors

Transistors are the fundamental devices


Pentium consists of 3 million transistors
Compaq Alpha consists of 9 million transistors
Now we can build chips with more than 100 million
transistors
AND Gate
AND
X Y Z
X 0 0 0
0 1 0
Z
1 0 0
Y 1 1 1

Z = X & Y
OR Gate

OR
X Y Z
X 0 0 0
Z 0 1 1
Y 1 0 1
1 1 1
Z = X | Y
NOT Gate -- Inverter

NOT X Y
X Y 0 1
1 0
Y = ~X
NAND Gate
NAND
X Y Z
X 0 0 1
0 1 1
Z
1 0 1
Y 1 1 0

Z = ~(X & Y)
nand(Z,X,Y)
NAND Gate

NOT-AND
X Y W Z
X 0 0 0 1
W 0 1 0 1
Z
1 0 0 1
Y 1 1 1 0

W = X & Y

Z = ~W = ~(X & Y)
NOR Gate

NOR
X Y Z
X 0 0 1
Z 0 1 0
Y 1 0 0
1 1 0
Z = ~(X | Y)
nor(Z,X,Y)
NOR Gate

NOT-OR
X Y W Z
X 0 0 0 1
W Z 0 1 1 0
Y 1 0 1 0
1 1 1 0
W = X | Y

Z = ~W = ~(X | Y)
Proving NAND gate is universal
Proving NOR gate is universal
Conclusion::
Any circuit which is designed by using NOT,
AND, and OR gates can also be designed using
only NAND gates.

Any circuit which is designed by using NOT,


AND, and OR gates can also be designed using
only NOR gates.

14
Exclusive-OR Gate

XOR X Y Z
X
Z 0 0 0
Y
0 1 1
1 0 1
1 1 0
X Y XY XY
Exclusive-NOR Gate

XNOR X Y Z
X
Z 0 0 1
Y
0 1 0
1 0 0
1 1 1
Z XY
Logical Gates and
Combinatorial Circuits
In circuitry theory, NOT, AND, and OR gates are
the basic gates. Any circuit can be designed using
these gates. The circuits designed depend only on
the inputs, not on the output. In other words,
these circuits have no memory. Also these circuits
are called combinatorial circuits.

The symbols NOT gate, AND gate, and OR gate


are also considered as basic circuit symbols,
which are used to build general circuits.
Summary
Summary for all 2-input gates

Inputs Output of each gate

A B AND NAND OR NOR XOR XNOR

0 0 0 1 0 1 0 1

0 1 0 1 1 0 1 0

1 0 0 1 1 0 1 0

1 1 1 0 1 0 0 1
THE END

Вам также может понравиться