Download Document

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Boolean Logic
ITI 1121
N. El Kadri
What is a switching network?
X1
X2
Xm
Switching
Network
Z1
Z2
Zm
Combinatorial Network: A stateless network. The
output is completely determined by the values of the input.
Sequential Network: The network stores an internal
state. The output is determined by the input,
and by the internal state.
2
Logic Functions: Boolean Algebra
INVERTER
X
X’
C=A·B
B
0
1
0
1
C
0
0
0
1
If A=1 AND B=1 then C=1
otherwise C=0
C=A+B
A
0
0
1
1
B
0
1
0
1
C
0
1
1
1
If A=1 OR B=1 then C=1
otherwise C=0
OR
A
B
If X=0 then X’=1
If X=1 then X’=0
A
0
0
1
1
AND
A
B
X’
1
0
X
0
1
3
Boolean expressions and logic
circuits
Any Boolean expression can be implemented as a logic circuit.
X = [A(C+D)]’+BE
C
D
C+D
A(C+D)
[A(C+D)]’
[A(C+D)]’+BE
A
B
E
BE
4
Basic Theorems: Operations with
0 and 1
X+0 = X
X
0
X+1 = 1
C=X
X
0
1
0
0
0
C
0
1
X
1
1
1
1
C
1
1
C=X
X
0
1
1
1
1
C
0
1
X·1 = X
X·0 = 0
X
0
C=1
X
0
1
C=0
X
0
1
0
0
0
C
0
0
X
1
5
Basic Theorems:
Idempotent Laws
X+X = X
X
X
C=X
X
0
1
X
0
1
C
0
1
C=X
X
0
1
X
0
1
C
0
1
X·X = X
X
X
6
Basic Theorems:
Involution Law
(X’)’=X
X
B
C=X
X
0
1
B
1
0
C
0
1
7
Basic Theorems:
Laws of Complementarity
X+X’ = 1
X
X’
C=1
X
0
1
X’
1
0
C
1
1
C=0
X
0
1
X’
1
0
C
0
0
X·X’ = 0
X
X’
8
Expression Simplification using
the Basic Theorems
X can be an arbitrarily complex expression.
Simplify the following boolean expressions as
much as you can using the basic theorems.
(AB’ + D)E + 1 = 1
(AB’ + D)(AB’ + D)’ = 0
(AB + CD) + (CD + A) + (AB + CD)’ = 1
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
0
1
0
1
0
1
Y+Z
0
1
1
1
0
1
1
1
X(Y+Z)
0
0
0
0
0
1
1
1
XY
0
0
0
0
0
0
1
1
XZ
0
0
0
0
0
1
0
1
XY+XZ
0
0
0
0
0
1
1
1
15
First Distributive Law
X(Y+Z) = XY+XZ
X
0
0
0
0
1
1
1
1
Y
0
0
1
1
0
0
1
1
Z
0
1
0
1
0
1
0
1
Y+Z
0
1
1
1
0
1
1
1
X(Y+Z)
0
0
0
0
0
1
1
1
XY
0
0
0
0
0
0
1
1
XZ
0
0
0
0
0
1
0
1
XY+XZ
0
0
0
0
0
1
1
1
16
Second Distributive Law
X+YZ = (X+Y)(X+Z)
X
0
0
0
0
1
1
1
1
Y
0
0
1
1
0
0
1
1
Z
0
1
0
1
0
1
0
1
YZ
0
0
0
1
0
0
0
1
X+YZ
0
0
0
1
1
1
1
1
X+Y
0
0
1
1
1
1
1
1
X+Z
0
1
0
1
1
1
1
1
(X+Y)(X+Z)
0
0
0
1
1
1
1
1
17
Second Distributive Law
X+YZ = (X+Y)(X+Z)
X
0
0
0
0
1
1
1
1
Y
0
0
1
1
0
0
1
1
Z
0
1
0
1
0
1
0
1
YZ
0
0
0
1
0
0
0
1
X+YZ
0
0
0
1
1
1
1
1
X+Y
0
0
1
1
1
1
1
1
X+Z
0
1
0
1
1
1
1
1
(X+Y)(X+Z)
0
0
0
1
1
1
1
1
18
Second Distributive Law
(A different proof)
(X + Y)(X + Z) = X(X + Z) + Y(X + Z)
(using the first distributive law)
= XX + XZ + YX + YZ
(using the first distributive law)
= X + XZ + YX + YZ
(using the idempotent law)
= X·1 + XZ + YX + YZ
(using the operation with 1 law)
= X(1 + Z + Y) + YZ
(using the first distributive law)
= X·1 + YZ
(using the operation with 1 law)
= X + YZ
(using the operation with 1 law)
19
Simplification Theorems
XY + XY’ = X
XY + XY’ = X(Y + Y’) = X·1 = X
X + XY = X
X(1 + Y) = X·1 = X
(X + Y’)Y = XY
XY + Y’Y = XY + 0 = XY
(X + Y)(X + Y’) = X
(X + Y)(X + Y’) = XX + XY’ + YX + YY’
= X + X(Y’ + Y) + 0
= X + X·1
=X
X(X + Y) = X
X(X + Y) = XX + XY = X·1 + XY
= X(1 + Y) = X·1 = X
XY’ + Y = X + Y
(using the second distributive law)
XY’ + Y = Y + XY’ = (Y + X)(Y + Y’)
= (Y + X)·1 = X + Y
20
Examples
Simplify the following expressions:
W = [M + N’P + (R + ST)’][M + N’P + R + ST]
X = M + N’P
Y = R + ST
W = (X + Y’)(X + Y)
W = XX + XY + Y’X + Y’Y
W = X·1 + XY + XY’ + 0
W = X + X(Y + Y’) = X + X·1 = X
W = M + N’P
21
Related documents