Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

Last Class

 Binary numeration system


 Number base conversion
 Complements
 Addition and subtraction
 Binary codes

 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

 Logic Circuit Diagram 1 1 0 1


x 1 1 1 1
F
y
z
10
Algebraic Manipulation

 Literal:
A single variable within a term that may be complemented
or not.

 Use Boolean Algebra to simplify Boolean functions


to produce simpler circuits
Example: Simplify to a minimum number of literals
F = x + x’ y ( 3 Literals)
= x + ( x’ y )
Distributive law (+ over •)
= ( x + x’ ) ( x + y )
=(1)(x+y)=x+y ( 2 Literals)
11
Complement of a Function

 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

 Maxterm (standard sum)


A B C Maxterm
● Sum (OR function)
0 0 0 0 M0 A  B  C
● Contains all variables
1 0 0 1 M1 A  B  C
● Evaluates to ‘0’ 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=1 A B C
5 1 0 1 M5 A  B  C
B=1 (1) + (1) + (1)
6 1 1 0 M6 A  B  C
C=1
0 + 0 + 0=0 7 1 1 1 M7 A  B  C

14
Canonical Forms

 Truth Table to Boolean Function


A B C F F  ABC  ABC  ABC  ABC
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 1

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

 Sum of Products (SOP)


A B (C  C )
 A B (1)
F  ABC  ABC  ABC  ABC
 AB
AC ( B  B)
 AC
BC ( A  A)
 BC
F  BC ( A  A)  AB(C  C )  AC ( B  B)

F  BC  AB  AC
18
Standard Forms

 Product of Sums (POS)


AB(C  C )

F  ABC  ABC  ABC  ABC

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

 Sum of Products (SOP) B’


C

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

 NAND (Not AND) x y NAND


0 0 1
x 0 1 1
x•y 1 0 1
y
1 1 0

21
Logic Operators

 OR x y OR
0 0 0
x x+y 0 1 1
y 1 0 1
1 1 1

 NOR (Not OR) x y NOR


0 0 1
x 0 1 0
x+y 1 0 0
y
1 1 0

22
Logic Operators

 XOR (Exclusive-OR) x y XOR


0 0 0
x xÅ y 0 1 1
y xy+xy 1 0 1
1 1 0

 XNOR (Exclusive-NOR) x y XNOR


(Equivalence) 0 0 1
0 1 0
1 0 0
x xÅ y xy+xy
y 1 1 1
x y

23
Logic Operators

 NOT (Inverter) x NOT

0 1
x x
1 0

 Buffer x Buffer

0 0
x x
1 1

24
Multiple Input Gates

Extended gate

Gate can be extended to have multiple inputs if


the binary operation it represents is commutative
and associative.

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

 Change the “Shape” and “bubble” all lines 26

You might also like