Professional Documents
Culture Documents
Chapter 2 Boolean Algebra & Logic Gates PDF
Chapter 2 Boolean Algebra & Logic Gates PDF
Logic Gates
i
Logic Design & Computing Systems
Chapter-2
(Boolean Algebra & Logic Gates )
1
Chapter Outline
Boolean Algebra and Logic Gates
2.1. Basic definitions of Boolean algebra
2.2. Boolean Functions
2.3. Canonical and standard forms
2.4. Integrated circuits
2
2.1 Basic Definitions of Boolean Algebra
Binary Operators
● AND
z=x•y=xy z=1 if x=1 AND y=1
● OR
z=x+y z=1 if x=1 OR y=1
● NOT
z = x = x’ z=1 if x=0
A set S = {1,0} is CLOSED with respect to the three operators,
since the result of each operation is either 1 or 0. (Closure
postulate)
3
Boolean Algebra Postulates
Closure : algebraic structure is closed w.r.t + and •
Commutative Law
x•y=y•x x+y=y+x
Identity Element
x•1=x x+0=x
Complement
x • x’ = 0 x + x’ = 1
Inverse: A set S having the identity element e with respect to a
binary operator * is said to have an inverse whenever, for every x Є
S, there exists an element y Є S such that x * y = e
4
Boolean Algebra Theorems
Duality
The dual of a Boolean algebraic expression is obtained by
interchanging the AND and the OR operators and replacing
the 1’s by 0’s and the 0’s by 1’s.
x•(y+z)=(x•y)+(x•z)
►x+(y•z)=(x+y)•(x+z)
Theorem 1
● x•x=x x+x=x
Theorem 2
● x•0=0 x+1=1 5
Boolean Algebra Theorems
Theorem 3: Involution
● ( x’ )’ = x (x)=x
Theorem 4: Associative & Distributive
● ( x • y ) • z = x • ( y • z ), ( x + y ) + z = x + ( y + z )
● x • ( y + z ) = ( x • y ) + ( x • z ),
=> x + ( y • z ) = ( x + y ) • ( x + z )
Theorem 5: DeMorgan
● ( x • y )’ = x’ + y’ ( x + y )’ = x’ • y’
● (x•y) =x +y (x+y) = x•y
Theorem 6: Absorption
● x•(x+y)=x x+(x•y)=x
6
Truth Table to Verify DeMorgan’s
X+Y=X·Y X·Y=X+Y
X Y X·Y X+Y X Y X+Y X·Y X·Y X+Y
0 0 0 0 1 1 1 1 1 1
0 1 0 1 1 0 0 0 1 1
1 0 0 1 0 1 0 0 1 1
1 1 1 1 0 0 0 0 0 0
Generalized DeMorgan’s Theorem:
X1 + X2 + … + Xn = X1 · X2 · … · Xn
X1 · X2 · … · Xn = X1 + X2 + … + Xn
7
Operator Precedence
Parentheses
x [ y z ( w x)]
( . . . ) • ( . . .)
NOT ( w x)
x’ + y ( w x)
AND z ( w x)
x+x•y
y z ( w x)
OR
x [ y z ( w x )]
8
DeMorgan’s Theorem
a [b c (d e )]
a [b c (d e )]
a b (c (d e ))
a b (c (d e ))
a b (c (d e))
a b (c d e) 9
2.2 Boolean Functions
Boolean Expression x y z F
Example: F = x + y’ z 0 0 0 0
Truth Table 0 0 1 1
0 1 0 0
• All possible combinations
of input variables 0 1 1 0
• 2n rows for n number of 1 0 0 1
variables in the function 1 0 1 1
Literal:
A single variable within a term that may be complemented
or not.
DeMorgan’s Theorm
F A B C
F A B C
F A B C
Duality & Literal Complement
F A B C
F A B C
F A B C
12
2.3 Canonical & Standard Forms
Canonical Forms
Minterm (standard product)
A B C Minterm
● Product (AND function)
0 0 0 0 m0 A B C
● Contains all variables
1 0 0 1 m1 A B C
● Evaluates to ‘1’ for a
specific combination 2 0 1 0 m2 A B C
3 0 1 1 m3 A B C
Example
4 1 0 0 m4 A B C
A=0 A B C
5 1 0 1 m5 A B C
B=0 (0) • (0) • (0)
6 1 1 0 m6 A B C
C=0
1 • 1 • 1=1 7 1 1 1 m7 A B C
13
Canonical Forms
14
Canonical Forms
15
Canonical Forms
Sum of Minterms A B C F F
F ABC ABC ABC ABC 0 0 0 0 0 1
1 0 0 1 1 0
F m1 m4 m5 m7
2 0 1 0 0 1
F (1,4,5,7)
3 0 1 1 0 1
Product of Maxterms 4 1 0 0 1 0
F ABC ABC ABC ABC 5 1 0 1 1 0
F ABC ABC ABC ABC 6 1 1 0 0 1
7 1 1 1 1 0
F ABC ABC ABC ABC
F ( A B C )( A B C )( A B C )( A B C )
F M0 M2 M3 M6
F (0,2,3,6) 16
Converting from one canonical form to another
To convert from one canonical form to another, interchange the
symbols Σ and 𝜋 and list those numbers missing from the original
form.
To find the missing terms, realize that the total number of minterms
or maxterms is 2n, where n is the number of binary variables in the
function.
By definition each minterm and maxterm in canonical form must
contain all the variables.
Canonical is good when the variable numbers are few.
17
Standard Forms
F BC AB AC
18
Standard Forms
BC ( A A)
AC ( B B)
F AC ( B B) AB(C C ) BC ( A A)
F AC AB BC
F ( A C )( A B)( B C )
19
Two-Level Implementations
F BC AB AC A
B’ F
A
C
Product of Sums (POS) A
C
A
F ( A C )( A B)( B C ) B’ F
B’
C
20
Logic Operators
AND x y AND
0 0 0
x x•y 0 1 0
y 1 0 0
1 1 1
21
Logic Operators
OR x y OR
0 0 0
x x+y 0 1 1
y 1 0 1
1 1 1
22
Logic Operators
23
Logic Operators
0 1
x x
1 0
Buffer x Buffer
0 0
x x
1 1
24
Multiple Input Gates
Extended gate
25
DeMorgan’s Theorem on Gates
AND Gate
●F=x•y F = (x • y) F=x+y
OR Gate
●F=x+y F = (x + y) F=x•y