Digital Logic Design
Digital Logic Design
(DLD)
Lecture # 4
DeMorgans Theorem
Multiple-input Gates
2
There are three basic kinds of gates, andgates, or-gates, and not-gates (or inverters).
One
Onebit
bitas
asinput
inputproduces
producesits
itsopposite
oppositeas
asoutput.
output.
~X
~~X = X
X ~X ~~X
0 1 0
1 0 1
AND GATE
AND
X
Z
Y
Z = X & Y
AND GATE
Two
Two or
or more
more input
input bits
bits produce
produce one
one output
output
bit.
bit.
Both
Both inputs
inputs must
must be
be true
true (1)
(1) for
for the
the output
output to
to
be
be true.
true.
Otherwise
Otherwise the
the output
output is
is false
false (0).
(0).
AND GATE
In order for current to flow, both switches
must be closed
Logic notation AB = C
(Sometimes AB = C)
10
OR GATE
OR
X
Y
Z = X | Y
11
OR GATE
Two
Two or
or more
more input
input bits
bits produce
produce one
one output
output bit.
bit.
Either
Either inputs
inputs must
must be
be true
true (1)
(1) for
for the
the output
output to
to
be
be true.
true.
12
OR GATE
Current flows if either switch is closed
Logic notation A + B = C
13
NAND GATE
NAND
X
Z
Y
Z = ~(X & Y)
nand(Z,X,Y)
14
NAND GATE
AND-NOT
X
W
Y
W = X & Y
Z = ~W = ~(X & Y)
15
NAND GATE
ab
(ab)
16
NOR GATE
NOR
X
Y
Z = ~(X | Y)
nor(Z,X,Y)
17
NOR GATE
OR-NOT
X
X
0
0
1
1
Y
0
1
0
1
W
0
1
1
1
Z
1
0
0
0
W = X | Y
Z = ~W = ~(X | Y)
18
NOR GATE
a
a+b
(a+b)
19
DE MORGANS THEOREM-1
~(X & Y) = ~X | ~Y
NOT all variables
Change & to | and | to &
NOT the result
20
Y
Z = ~(X & Y)
X
0
0
1
1
Y
0
1
0
1
W
0
0
0
1
Z
1
1
1
0
Z = ~X | ~Y
X
0
0
1
1
Y ~X ~Y
0 1 1
1 1 0
0 0 1
1 0 0
Z
1
1
1
0
21
DE MORGANS THEOREM-2
~(X | Y) = ~X & ~Y
NOT all variables
Change & to | and | to &
NOT the result
22
Z = ~(X | Y)
X
0
0
1
1
Y
0
1
0
1
Z
1
0
0
0
Z = ~X & ~Y
X
0
0
1
1
Y ~X ~Y
0 1 1
1 1 0
0 0 1
1 0 0
Z
1
0
0
0
23
EXCLUSIVE-OR GATE
XOR
X
Y
Z = X ^ Y
xor(Z,X,Y)
X Y
Z
0 0 0
0 1 1
1 0 1
1 1 0
24
EXCLUSIVE-NOR GATE
XNOR
X
Y
Z = ~(X ^ Y)
Z = X ~^ Y
xnor(Z,X,Y)
X Y
Z
0
0
1
1
0
1
0
1
Z
1
0
0
1
25
MULTIPLE-INPUT GATES
Z1
Z2
Z3
Z4
26
Z1
27
MULTIPLE-INPUT OR GATE
Z2
28
Z3
29
Z4
30