You are on page 1of 13

Digital Logic Design

Lecture 2

Logic Gates

Zelalem Birhanu, AAiT 1


Summary

Signals in digital circuits are represented by


a combination of binary values

Each binary value can be either a logical 0 or


a logical 1

In digital circuits binary values (0 or 1) are


differentiated by voltage levels (logic levels)
Zelalem Birhanu, AAiT 2
Logic Gates
Gate
A simple electronic circuit that realizes a
logical operation
Basic building block of digital circuits

By combining gates we make more complex


digital circuits
Has one or more inputs and
a single output
Zelalem Birhanu, AAiT 3
Logic Gatescntd
Several types
NOT, OR, AND, NOR, NAND, XOR

Each type has its own symbol

The property of a logic gate can be


expressed using
Truth table
Logical expression

Zelalem Birhanu, AAiT 4


NOT Gate (Inverter)
Single input, single output

Output is complement of the input

Y X

X Y
0 1
1 0

Zelalem Birhanu, AAiT 5


OR Gate
Multiple inputs, single output

E.g. Two input OR gate

Y X1 X2
X1 X2 Y
0 0 0
Output is logical 0 only
0 1 1
when all inputs are logical 0
1 0 1
1 1 1

Zelalem Birhanu, AAiT 6


AND Gate
Multiple inputs, single output

E.g. Two input AND gate

Y X1. X2
X1 X2 Y
0 0 0
Output is logical 1 only
0 1 0
when all inputs are logical 1
1 0 0
1 1 1

Zelalem Birhanu, AAiT 7


NOR Gate
Multiple inputs, single output
Output is complement of OR gate
E.g. Two input NOR gate

Y 1 2
X1 X2 Y
0 0 1
Output is logical 1 only
0 1 0
when all inputs are logical 0
1 0 0
1 1 0

Zelalem Birhanu, AAiT 8


NAND Gate
Multiple inputs, single output
Output is complement of AND gate
E.g. Two input NAND gate

Y 1. 2
X1 X2 Y
0 0 1
Output is logical 0 only
0 1 1
when all inputs are logical 1
1 0 1
1 1 0

Zelalem Birhanu, AAiT 9


XOR (Exclusive OR)Gate
Multiple inputs, single output

E.g. Two input XOR gate

Y X1 2
X1 X2 Y
0 0 0 Output is logical 1 only
0 1 1 when the two inputs are at
1 0 1 opposite logic level
1 1 0

Zelalem Birhanu, AAiT 10


Example
Water Tank
Assume a tank has two sensors, S1 and S2, to sense level of water and a
valve to fill the tank. When water touches the surface of the sensors, the
sensors have an output of logical 1, otherwise they have output of 0. A logic
value of 1 means the valve is open, a logic value of 0 means the valve is
closed.

The opening and closing of the valve is controlled by the two sensors. The
valve is always open except when the tank is full(both sensors sense water).
What logic function (gate) should we use to realize this functionality?

Zelalem Birhanu, AAiT 11


Solution

Zelalem Birhanu, AAiT 12


More Readings

1. Digital Fundamentals, Thomas L. Floyd


2. Digital Design Principles & Practices, John F.
Wakerly

ftp://10.5.42.42

Zelalem Birhanu, AAiT 13

You might also like