View
222
Download
0
Category
Tags:
Preview:
Citation preview
Nonlinear & Neural Networks LAB.
CHAPTER 2
Boolean Algebra
2.1 Introduction2.2 Basic Operation2.3 Boolean Expression and Truth Table2.4 Basic Theorem2.5 Commutative, Associative and Distributive Laws2.6 Simplification Theorem2.7 Multiplying Out and Factoring2.8 DeMorgan’s Laws
Nonlinear & Neural Networks LAB.
Objectives
Topics introduced in this chapter:
• Understand the basic operations and laws of Boolean algebra
• Relate these operations and laws to AND, OR, NOT gates and switches
• Prove these laws using a truth table
• Manipulation of algebraic expression using
- Multiplying out
- Factoring
- Simplifying
- Finding the complement of an expression
Nonlinear & Neural Networks LAB.
2.1 Introduction
• Basic mathematics for logic design: Boolean algebra
• Restrict to switching circuits( Two state values 0, 1) – Switching algebra
• Boolean Variable : X, Y, … can only have two state values (0, 1)
- representing True(1) False (0)
Nonlinear & Neural Networks LAB.
2.2 Basic Operations
1X if 0X' and 0X if 1X'
01' and 1'0
NOT(Inverter)
Gate Symbol
Nonlinear & Neural Networks LAB.
2.2 Basic Operations
A B C = A · B
0 0
0 1
1 0
1 1
0
0
0
1
111 001 010 000
AND
Truth Table
Gate Symbol
Nonlinear & Neural Networks LAB.
2.2 Basic Operations
A B C = A + B
0 0
0 1
1 0
1 1
0
1
1
1
111 101 110 000 OR
Truth Table
Gate Symbol
Nonlinear & Neural Networks LAB.
2.2 Basic Operations
BAT
Apply to Switch
AND
OR BAT
Nonlinear & Neural Networks LAB.
2.3 Boolean Expressions and Truth Tables
BEDCA )]'([Logic Expression :
Circuit of logic gates :
Nonlinear & Neural Networks LAB.
2.3 Boolean Expressions and Truth Tables
0000)]'1(1[01)]01(1[)]'([ BEDCA
'''''' cbbcabacab
BEDCA )]'([Logic Expression :
Circuit of logic gates :
Logic Evaluation : A=B=C=1, D=E=0
Literal : a variable or its complement in a logic expression
10 literals
Nonlinear & Neural Networks LAB.
2.3 Boolean Expressions and Truth Tables
2-Input Circuit and Truth Table
A B A’ F = A’ + B
0 0
0 1
1 0
1 1
1
1
0
0
1
1
0
1
Nonlinear & Neural Networks LAB.
n variable needs rows
2.3 Boolean Expressions and Truth Tables
n
CBCACAB
2222
)')(('
n times
A B C B’ AB’ AB’ + C A + C B’ + C (A + C) (B’ + C)
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
1
1
0
0
1
1
0
0
0
0
0
0
1
1
0
0
0
1
0
1
1
1
0
1
0
1
0
1
1
1
1
1
1
1
0
1
1
1
0
1
0
1
0
1
1
1
0
1
TABLE 2.1
Proof using Truth Table
Nonlinear & Neural Networks LAB.
2.4 Basic Theorems
0' 1'
)''(
00 11
1 0
XXXX
XX
XXXXXX
XX
XXXX
101'11 ,1 if and ,10'00 ,0 XX
11)'( EDAB
0)'')('( DABDAB
Idempotent Laws
Involution Laws
Complementary Laws
Operations with 0, 1
Proof
Example
Nonlinear & Neural Networks LAB.
AA
=
=
2.4 Basic Theorems with Switch Circuits
Nonlinear & Neural Networks LAB.
=
(A+1=1)
=A’
(A+A’=1)
2.4 Basic Theorems with Switch Circuits
=(A A’=0)
Nonlinear & Neural Networks LAB.
2.5 Commutative, Associative, and Distributive Laws
XYYXYXXY
ZYXZYXZYX
XYZYZXZXY
)()(
)()(
Commutative Laws:
Associative Laws:
X Y Z XY YZ (XY)Z X(YZ)
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
0 0
0 0
0 0
0 1
0 0
0 0
1 0
1 1
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 1
Proof of Associate Law for AND
Nonlinear & Neural Networks LAB.
C
(AB)C=ABC
=AB
C
Associative Laws for AND and OR
A
BC
=
A
C
B +
(A+B)+C=A+B+C
Nonlinear & Neural Networks LAB.
1 iff 1 ZYXXYZ
XZXYZYX )(
YZXYZXYZYZX
YZXYXZXYZXYXZX
YZYXXZXXZXYZXXZXYX
1)1(
1
)()())((
0 iff 0 ZYXZYX
))(( ZXYXYZX
2.5 Commutative, Associative, and Distributive Laws
AND
OR
Distributive Laws:
Valid only Boolean algebra not for ordinary algebra
Proof
Nonlinear & Neural Networks LAB.
2.6 Simplification Theorems
XYXYYYXYXYY 1)()')(('XXYXXYXXYXX )(
XXYXXYXXYX 1)1(1
YXYXYXYYYX
XYXXXXYX
XYXYXXXYXY
' )'(
)(
)')(( 'Useful Theorems for Simplification
Proof
Y
X
Y
XY’
Proof with Switch
Nonlinear & Neural Networks LAB.
Equivalent Gate Circuits
A
A
B F
ABBAAF )'(
===
2.6 Simplification Theorems
Nonlinear & Neural Networks LAB.
2.7 Multiplying Out and Factoring
EFCDBA )(
EDCBA '' HDEFGABC '
EACECDAB '''
To obtain a sum-of-product form Multiplying out using distributive laws
Sum of product form:
Still considered to be in sum of product form:
Not in Sum of product form:
BCEBCDA
BCEBCDBCEDA
BCEBCDABCAEADAEDABCA
)1(
))((
Multiplying out and eliminating redundant terms
Nonlinear & Neural Networks LAB.
)'('
))((
EDCAB
FEDCBA
)'')('('( ECAEDCBA
To obtain a product of sum form all sums are the sum of single variable
Product of sum form:
Still considered to be in product of sum form:
2.7 Multiplying Out and Factoring
Nonlinear & Neural Networks LAB.
CD’E
+
AC'
E’
‘
C
E
D' +
A
E’
C’ +
A
B’
D’
EAB’C
D’
E
AB’C
Circuits for SOP and POS form
Sum of product form:
Product of sum form:
Nonlinear & Neural Networks LAB.
2.8 DeMorgan’s Laws
'''')'()'( 321321321 XXXXXXXXX
'...''')'...(
''...'')'...(
321321
321321
nn
nn
XXXXXXXX
XXXXXXXX
'')'(
'')'(
YXXY
YXYX
X Y X’ Y’ X + Y ( X + Y )’ X’ Y’ XY ( XY )’ X’ + Y’
0 0
0 1
1 0
1 1
1 1
1 0
0 1
0 0
0
1
1
1
1
0
0
0
1
0
0
0
0
0
0
1
1
1
1
0
1
1
1
0
DeMorgan’s Laws
Proof
DeMorgan’s Laws for n variables
Example
Nonlinear & Neural Networks LAB.
A B A’ B A B’ F = A’B+AB’ A’ B’ A B F’ = A’B’ + AB
0 0
0 1
1 0
1 1
0
1
0
0
0
0
1
0
0
1
1
0
1
0
0
0
0
0
0
1
1
0
0
1
CBACABCBACABCAB D )'()'( so ,')'(')''()''(
......)( ......)( XYZZYXZYXXYZ DD
ABBABBABABAA
BABAABBAABBAF
''''''
)')('()''()''()'''(' Inverse of A’B=AB’
2.8 DeMorgan’s Laws
Dual: ‘dual’ is formed by replacing AND with OR, OR with AND, 0 with 1, 1 with 0
Recommended