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

REVISION OF Digital Design1

Dr Rajesh Rohilla

Dr Rajesh 1
Number Systems and
Conversion
 Positional notation
Base 10:

Base 2:

Unit 01
Dr Rajesh
Number Systems and
Conversion
 Base R:
Any positive integer R(R>1) can be chosen as
the radix or base of a number system.

where 0  ai  R  1 .
3

Unit 01
Dr Rajesh
Number Systems and
Conversion
Example:

For bases greater than 10, more than 10 symbols are needed
to represent the digits. In hexadecimal (base 16), A presents
1010, B presents 1110, C presents 1210, D presents 1310, E
presents 1410, F presents 1510.
4

Unit 01
Dr Rajesh
Number Systems and
Conversion
 Convert a decimal integer to base R

N
 an R n1  an1 R n2  L  a2 R1  a1  Q1 , remaidera 0
R
Q1
 an R n2  an1 R n3  L  a3 R1  a2  Q2 , remaidera 1
R
Q2
 anR n3  a n1 R n4  L  a4 R1  a3  Q3 , remaidera 2
R

This process is continued until we finally


obtain an.
5

Unit 01
Dr Rajesh
Number Systems and
Conversion
 Example : Convert 5310 to binary.

Unit 01
Dr Rajesh
Number Systems and
Conversion
 Convert a decimal fraction to base R

This process is continued until we have


obtained a sufficient number of digits.
7

Unit 01
Dr Rajesh
Number Systems and
Conversion
 Example: Convert 0.62510 to binary.

Unit 01
Dr Rajesh
Number Systems and
Conversion
 Example: Convert 0.710 to binary.

Unit 01
Dr Rajesh
Number Systems and
Conversion
 Example: Convert 231.34 to base 7.

10

Unit 01
Dr Rajesh
Number Systems and
Conversion
 Conversion from binary to hexadecimal
( and conversely)
 One hexadecimal digit corresponds to four
binary digits (bits)

(306.D)16  0000 0110 


(0011 1101)2
3 0 6 D
11

Unit 01
Dr Rajesh
Binary Arithmetic
 Addition

 Example: Add 1310 and 1110 in binary.

12

Unit 01
Dr Rajesh
Binary Arithmetic
 Subtraction

 Examples:

13

Unit 01
Dr Rajesh
Binary Arithmetic
 Multiplication

 Example:

14

Unit 01
Dr Rajesh
Binary Arithmetic
 Division
 Example: 145/11=13 --- 2

15

Unit 01
Dr Rajesh
Representation of Negative Numbers
 2’s Complement Number System
 Positive Number N
N is represented by a 0 followed by the
magnitude.

 Negative Number –N
–N is represented by its 2’s complement,
N*. If the word length is n,
N*=2n-N
16

Unit 01
Dr Rajesh
Representation of Negative Numbers
 1’s Complement Number System
 Positive Number N
N is represented by a 0 followed by the
magnitude

 Negative Number –N
–N is represented by its 1’s complement N .
If the word length is n,
N  (2n 1) N
N*=2n-N=(2n-1-N)+1= N +1
17

Unit 01
Dr Rajesh
Representation of Negative Numbers
 Sign and Magnitude Binary Numbers

18

Unit 01
Dr Rajesh
Addition of 2’s Complement Numbers
 Addition of n-bit signed binary numbers
 Any carry from the sign position is ignored.
 n=4

19

Unit 01
Dr Rajesh
Addition of 2’s Complement Numbers

 A  B  A*  B  (2 n  A)  B
 2 n  (B  A)  2 n ( B  A, carry)
Throwing away the last carry is equivalent to subtractin g 2 n ,
so the result is ( B  A).

20

Unit 01
Dr Rajesh
Addition of 2’s Complement Numbers

 A B  A*  B*  (2n  A)  (2n  B)
 2n  2n ( A  B)  2n ( A  B  2n1, carry)
Discardingthelast carry yields2n ( A B)  (A B)*,
whichis thecorrectrepresentation of ( A B).

21

Unit 01
Dr Rajesh
Addition of 2’s Complement Numbers
Example: Add -8 and +19 in 2’s complement
for a word length of n=8.

22

Unit 01
Dr Rajesh
Addition of 1’s Complement Numbers
 Addition of n-bit signed binary numbers
 Add the last carry ( end-around carry) to the n-
bit sum in the position furthest to the right.
 n4

23

Unit 01
Dr Rajesh
Addition of 1’s Complement Numbers

 A  B  A  B  (2n 1  A)  B
 2 n  (B  A) 1  2 n (B  A, carry)
The end - around carry is equivalent to subtracting 2 n and adding 1,
so the result is (B  A).

24

Unit 01
Dr Rajesh
Addition of 1’s Complement Numbers

 A  B  A  B  (2 n  1  A)  (2 n 1  B)
 2 n  [2 n  1  ( A  B)]  1  2 n ( A  B  2n1 , carry)
Discarding the last carry yields 2 n  1  ( A  B)  ( A  B),
which is the correct representation of  ( A  B).

25

Unit 01
Dr Rajesh
Addition of 1’s Complement Numbers
Example: Add -11 and -20 in 1’s complement for
a word length of n=8.

26

Unit 01
Dr Rajesh
Binary Codes
 Weighted code
w3-w2-w1-w0 weighted code a3a2a1a0
a3a2a1a0= w3a3+w2a2+w1a1+w0a0
 Binary-Coded-Decimal, BCD; 8-4-2-1BCD code
0101=0.8+1.4+0.2+1.1=5
 6-3-1-1 code
0101=0.6+1.3+0.1+1.1=4
 Excess-3 code
 8-4-2-1 code + 0011
 The code of i is the 1’s complement of code 9-i
 2-out-of-5 code
 Exactly 2 out of 5 bits are 1
 Error-checking properties
 Gray code
 The codes for successive decimal digits differ in exactly on bit.
 ASCII code
 American Standard Code for Information Interchange
27

Unit 01
Dr Rajesh
Binary Codes

28

Unit 01
Dr Rajesh
Binary Codes

29

Unit 01
Dr Rajesh
Unit 2
Boolean Algebra

Dr Rajesh 30
Unit 2
 Boolean Algebra
 2.1 Introduction
 2.2 Basic Operations
 2.3 Boolean Expressions and Truth Tables
 2.4 Basic Theorems
 2.5 Commutative, Associative, and
Distributive Laws
 2.6 Simplification Theorems
 2.7 Multiplying Out and Factoring
 2.8 Demorgan’s Laws
2

Unit 02
Dr Rajesh
Introduction
 George Boole developed Boolean algebra
in 1847 and used it to solve problems in
mathematical logic.
 Boolean Algebra
A Boolean algebra is an algebra
(B; . , + ,’ ;0, 1) consisting of a set B (which
contains at least two elements 0 and 1)
together with three operations,
the AND (Boolean product) operation . ,
the OR (Boolean sum) operation +, and
the NOT (complement) operation ’ , defined
on the set, such that
3

Unit 02
Dr Rajesh
Introduction
 A0. Closure: For any x,y, and z of B, x.y, x+y, x’ are in B
 A1. Idempotent: x.x=x x+x=x
 A2. Commutative: x.y=y.x xy=yx
 A3. Associative:
x. (y.z)=(x.y) .z=x . y . z
x+ (y+z)=(x+y) +z=x + y + z
 A4. Absorptive: x . (x + y)=x x +(x . y)=x
 A5. Distributive:
x . (y + z)=(x . y) +(x . z)
x +(y . z)=(x + y) . (x + z)
 A6. Zero( null, smallest), 0 , and One( universal, largest), 1 ,
elements are in B
x . 1=1 . x=x x + 0=0 + x=x
 A7. Complement
For every x in B, there exists a unique x’ in B such that
x . x’=0, x + x’=1 4

Unit 02
Dr Rajesh
Introduction
 Example: Two-element Boolean Algebra
(Switching Algebra)
B2=({0,1}; . ,+, ’ ; 0,1)

AND OR NOT
. 0 1 + 0 1 ’
0 0 0 0 0 1 0 1
1 0 1 1 1 1 1 0

Unit 02
Dr Rajesh
Introduction
 Example: Four-element Boolean Algebra
B4=({0,a,b,1} ; . ,+, ’ ; 0,1)
AND OR NOT
. 0 a b 1 + 0 a b 1 ’
0 0 0 0 0 0 0 a b 1 0 1
a 0 a 0 a a a a 1 1 a b
b 0 0 b b b b 1 b 1 b a
1 0 a b 1 1 1 1 1 1 1 0

Unit 02
Dr Rajesh
Introduction
 An element of a Boolean algebra B is
called a constant on B.
e.g. 0,a,b,1 in B4.
 A symbol that may represent any one of
element of B is called a (Boolean)
variable on B.
e.g. x,y,z,…

Unit 02
Dr Rajesh
Introduction
 A Boolean expression over an algebra
system (B; . ,+, ’ ; 0,1) is defined as
follows:
1. Any element of B ( constant) is a Boolean expression.
2. Any variable name is a Boolean expression.
3. If e1 and e2 are Boolean expression, then e1’, e2’, e1+e2,
e1.e2 are Boolean expressions.
4. Any expression that can be constructed by a finite
number of applications of the above rules, and only
such a expression is a Boolean expression.

Unit 02
Dr Rajesh
Introduction
 A function f(x1,x2,…,xn), f : B n  B
from Bn to B is called a Boolean function if it
can be specified by a Boolean expression of
n variables x1,x2,…,xn .
f(a,b,c)=ab’c+a’b+b’c’
 Each appearance of a variable or its
complement in an expression is referred to
as a literal.
f(a,b,c)=ab’c+a’b+b’c’
has 3 variables, a,b, and c, 7 literals(a, b’ , c,
a’, b, b’, c’ ).
9

Unit 02
Dr Rajesh
Basic Operations
 The basic operations of Boolean algebra are
AND, OR, and NOT (complement, or
inverse).
 NOT (Complement)
0 1 1 0
X  1 if X  0 and X  0 if X  1
 Inverter

10

Unit 02
Dr Rajesh
Basic Operations
 AND Operation
 Omit the symbol “.”, A . B=AB

AND Gate

11

Unit 02
Dr Rajesh
Basic Operations
 OR operation

OR Gate

12

Unit 02
Dr Rajesh
Boolean Expressions and Truth Tables
 Order in which the operations are perform
Parentheses Complentation AN
D OR
 Circuits for expressions

AB C

[ A(C  D)] BE
13

Unit 02
Dr Rajesh
Truth Table
 If an expression has n variables, the number of different
combinations of values of the variables is 2n. Therefore, a truth
table for n-variable
n expression will have 2n rows.
(2 )
 There are 2 functions of n variables.

14

Unit 02
Dr Rajesh
Truth Table
 AB C  ( A  C)(B  C)

15

Unit 02
Dr Rajesh
Basic Theorems

16

Unit 02
Dr Rajesh
Basic Theorems

17

Unit 02
Dr Rajesh
Basic Theorems
 Switching Circuits
 =

18

Unit 02
Dr Rajesh
Commutative, Associative, and Distributive Laws

 Commutative Laws

 Associative Laws

 Distributive Laws

19

Unit 02
Dr Rajesh
Multiple-Input Gates
 Associative Laws for AND and OR
operations.
(AB)C=A(BC)=ABC
(A+B)+C=A+(B+C)=A+B+C

20

Unit 02
Dr Rajesh
Proof of Boolean Theorems
 By Truth Table
 Example: X+YZ=(X+Y)(X+Z)

X Y Z YZ X+YZ X+Y X+Z (X+Y)(X+Z)


0 0 0 0 0 0 0 0
0 0 1 0 0 0 1 0
0 1 0 0 0 1 0 0
0 1 1 1 1 1 1 1
1 0 0 0 1 1 1 1
1 0 1 0 1 1 1 1
1 1 0 0 1 1 1 1
1 1 1 1 1 1 1 1
21

Unit 02
Dr Rajesh
Proof of Boolean Theorems
 By basic laws:
 Example: X+YZ=(X+Y)(X+Z)

22

Unit 02
Dr Rajesh
Simplification Theorems
 Useful Simplification Theorems

 Proof

23

Unit 02
Dr Rajesh
Simplification Examples
 Example: Simplify Z [ABCDEF][ABC(DEF)]
Sol:

Z  X  A  BC
 Example: Simplify
Z  ( AB  C)(BD CE) ( AB  C)
Sol: Let(AB C) Y, BD  CE X then
Z  (AB C)(BDCE)(AB C)
 YXY  X Y  BDCE( AB C)
24

Unit 02
Dr Rajesh
Simplification Examples
 Example: Find the output Y of the following
circuit and design a simpler circuit having the
same output.

Sol: Y  (AB (AB  B))B  A


 (AB B)B  A  ABB B  A  B  A
The resulting circuit contains only one OR gate.

25

Unit 02
Dr Rajesh
Multiplying Out and Factoring
 Sum-of-products (SOP)
An expression is said to be in sum-of-products form when all
products are the products of only single variables.
AB CDE ACE , A  B C  DEare in SOP form, (
A  B)CD  EF is not in SOP form.

 Product-of-sums (POS)
An expression is said to be in product-of-sums form when all
sums are the sums of only single variables.

(A  B)(C D E)( A  C E), ABC(D E) are in POS form,


(A  B)(C  D)  EF is not in POS form.

26

Unit 02
Dr Rajesh
Multiplying Out and Factoring
 Using the ordinary distributive law
X(Y+Z)=XY+XZ
to multiply out an expression to obtain a
sum-of-products form.
 Using the second distributive law
X+YZ=(X+Y)(X+Z)
to factor an expression to obtain a
product-of-sums form.
27

Unit 02
Dr Rajesh
Multiplying Out and Factoring
 Example: Multiply out (A+BC)(A+D+E).

Sol-1: Multiply out the original expression completely


and then eliminating redundant terms:
(A+BC)(A+D+E)=A+AD+AE+ABC+BCD+BCE
=A(1+D+E+BC)+BCD+BCE
=A+BCD+BCE

Sol-2: Use (X+Y)(X+Z)=X+YZ :


(A+BC)(A+D+E)=A+BC(D+E)=A+BCD+BCE

28

Unit 02
Dr Rajesh
Multiplying Out and Factoring
 Example: Factor A  BCD.
Sol: A  BCD ( A  B)(A  CD)
 ( A  B)(A  C)( A  D)

 Example: Factor AB CD .


Sol: AB CD ( AB C)(AB D)
 ( A  C)(B C)(A  D)(B D)

 Example: Factor C D  C E  GH .


Sol: CD CE GH  C(D E) GH
 (C GH)(D E GH)
 (C G)(C H)(D  E G)(D E H)
29

Unit 02
Dr Rajesh
DeMorgan’s Laws
 DeMorgan’s laws
( X  Y ) X Y

( XY ) X  Y 
 Proof using a truth table

30

Unit 02
Dr Rajesh
DeMorgan’s Laws
 n variables DeMorgan’s Laws
( X1  X 2  X 3  ...  X n ) X1X2X 3..Xn
( X1 X 2 X 3...X n )  X1  X 2  X 3 ...  X n

 One-step rule for applying DeMorgan’s


Laws
[ f (x1, x2 , L , xn ,0,1,,)]  f(x1 ,x2 , L , xn,1,0,,)
x  x x x
  
0 1 1 0
31

Unit 02
Dr Rajesh
DeMorgan’s Laws
 Example: Find the complement of

Sol-1:

Sol-2: [(AB C)D E] [(A B C)  D E]


 ((A B)  C) D)  E
32

Unit 02
Dr Rajesh
Shannon’s Theorem
 Shannon’s Theorem
[ f (x1, x2 , L , xn ,0,1,,)]  f (x1,x2, L , xn,1,0,,)
Proof:
f (x1 , x2 , L , xn ,0,1,,)  f1 (x1, x2 , L , xn ,0,1,,)  f 2 (x1, x2 , L , xn ,0,1,,)
or
f (x1, x2 , L , xn ,0,1,,)  f1 (x1, x2 , L , xn ,0,1,,)  f 2 (x1, x2 , L , xn ,0,1,,)
Then
[ f (x1, x2 , L , xn ,0,1,,)]  [ f1 (x1 , x2 , L , xn ,0,1,,)][ f 2 (x1, x2 , L , xn ,0,1,,)]
or
[ f (x1, x2 , L , xn ,0,1,,)]  [ f1 (x1, x2 , L , xn ,0,1,,)] [ f 2 (x1, x2 , L , xn ,0,1,,)]
Repeat the same argument for f1 and f 2 , and so forth, until DeMorgan's Laws are
applied to every variable of each term of f.

33

Unit 02
Dr Rajesh
Duality
 Given a Boolean expression, the dual is
formed by replacing AND with OR, OR
with AND, 0 with 1, 1 with 0.
 Dual [ f (x1 , x2 , L , xn ,0,1,,)]  f (x 1, x 2, L , xn ,1,0,,)
D

 The dual of an expression may be found


by complementing the entire expression
and then complement each individual
variable.
 Positive and Negative Logic.
34

Unit 02
Dr Rajesh
Duality
 Example: Find the dual of
F  a  b  c  1 d   (0  e)
Sol:
F  a  b  c  1 d   (0  e)
F (a b) c[0 d  (1 e)]
 (a b)c[0 d  (1 e)]
FD  (a  b)c[0 d  (1 e)]

35

Unit 02
Dr Rajesh
Duality
 Theorem: Given that two Boolean
expressions which contains the same
variables are equal, the duals are equal.
F  G  F D  GD.

Proof: F  G  F  G.
If we replace each variable in F and G by its
complement, this will not destroy the equality since
this is equivalent to substituting one variable for
another on both sides of the equation.
 If a theorem is true, so is its dual.
36

Unit 02
Dr Rajesh
Duality
 Example: F  G  F D  G D .
F=X(Y+Z), G=XY+XZ, F=G
FD=X+YZ, GD=(X+Y)(X+Z), FD= GD
F  G  F  G .
F  X(Y  Z), G  XY  XZ
F D  X Y Z, G D  (X  Y)(X  Z)
F  X  Y Z, G (X  Y )(X Z )
F  G   X  Y Z (X  Y )(X Z )
Complement each variable ,
X  Y Z  (X  Y)(X  Z)
Hence , F D  G D .
37

Unit 02
Dr Rajesh
Unit 3
Boolean Algebra (Continued)

Dr Rajesh 67
Multiplying Out and Factoring
Expressions
 Multiplying out
X (Y  Z )  XY  XZ
( X  Y )( X  Z )  X  YZ
( X  Y )( X  Z )  XZ  X Y
 Factoring
XY  XZ  X (Y  Z )
X  YZ  ( X  Y )( X  Z )
  ( X  Y )( X  Z )
XZ  X Y

Unit 03
Dr Rajesh
Multiplying Out and Factoring
Expressions
 Example: Prove that ( X  Y )( X  Z )  X  YZ
Proof: (1) ( X  Y )(X  Z )  XX  XZ  YX  YZ
 X  XZ  XY  YZ
 X  XY  YZ  X  YZ

(2) (a) X  0, ( 0  Y)( 0  Z)  YZ 0  YZ  YZ


(b)X  1, (1 Y)(1 Z)  11  1 1 YZ  1

 Example: Prove that (X  Y )(X  Z )  XZ  X Y

Proof: (X  Y)(X  Z)  XX  XZ  YX  YZ
  YZ
 0  XZ  X Y
 XZ  X Y (X  X )YZ
 XZ  X Y  XYZ  X Y Z
 XZ(1 Y) X Y(1Z)
3

 XZ  X Y
Unit 03
Dr Rajesh
Multiplying Out and Factoring
Expressions
 Example: Multiplying out (POS => SOP)
(A BC)(AB D)(AB E)(AD E)(AC)
Sol:

Unit 03
Dr Rajesh
Multiplying Out and Factoring
Expressions
 Example: Factoring (SOP => POS)
AC ABD ABEACDE
Sol:

Unit 03
Dr Rajesh
Exclusive-OR and Equivalence
Operations
 Exclusive-OR: 0  0  0 0 1  1
1 0  1 11  0
 Truth table and gate for XY

X Y 1 if and only if X=1 or Y=1 and X and Y


are not both 1.
6

Unit 03
Dr Rajesh
Exclusive-OR and Equivalence
Operations
 X  Y  X Y XY 
 Theorems apply to exclusive OR:

Unit 03
Dr Rajesh
Exclusive-OR and Equivalence
Operations
 Proof of the distributive law
X (Y  Z)  XY  XZ
Proof:

Unit 03
Dr Rajesh
Exclusive-OR and Equivalence
Operations
 The equivalence operation() is defined by

 The truth table for X  Y is

 (X Y)1 if and only if X  Y .


9

Unit 03
Dr Rajesh
Exclusive-OR and Equivalence
Operations
 ( X  Y )  XY  X Y

 Equivalence is the complement of exclusive-OR:


( X  Y ) ( X Y XY ) ( X  Y )(X  Y )
 XY  X Y ( X  Y)
 Alternate symbol for the equivalence gate

 The equivalence gate is also called an exclusive-NOR


gate.
10

Unit 03
Dr Rajesh
Exclusive-OR and Equivalence
Operations
 Example:

11

Unit 03
Dr Rajesh
The Consensus Theorem
 The consensus theorem:
XY  X Z YZ  XY  X Z
Proof:

 The dual form


( X  Y )( X  Z )(Y  Z )  ( X  Y )( X  Z )
12

Unit 03
Dr Rajesh
The Consensus Theorem
 Example: Simplify
ACD ABD BCD  ABC  ACD
Sol-1: ACD ABD BCD  ABC  ACD
  
(BD)(BC)  BCD
 ACD ABD ABC  ACD  4 terms.

Sol-2: ACD ABD BCD  ABC ACD


O  NO  N
(AD)(BD) ABD (BC)(AC)  ABC
 D BCD  ACD
 AC
 3 terms.

13

Unit 03
Dr Rajesh
The Consensus Theorem
 Example: Simplify F  ABCD  BCDE AB BCE

Sol: Find consensus terms,


ABCD  BCDE ABCD  BCDEACDE
 ABCD  AB
ABCD  AB  (BCD)B  (ACD)A
BCDE BCE BCDE BCE 0  0
AB BCE AB BCE ACE

Add the consensus term ACDE to F.

F  AB BCE ACDE 14

Unit 03
Dr Rajesh
Algebraic Simplification of Switching
Expressions
 1.Combining terms:
Use the theorem XY  XY  X to
combine two terms.

 2.Eliminating terms:
Use X  XY  X to eliminate redundant
terms; then try to apply the consensus
theorem XY  X Z YZ  XY  X Z to
eliminate any consensus terms.
15

Unit 03
Dr Rajesh
Algebraic Simplification of Switching
Expressions
 3.Eliminating literals:
Use the theorem X  X Y X  Y to
eliminate redundant literals.
 4.Adding redundant terms:
Adding xx, multiply by (x  x),adding to yz
xy  xz,or adding xy to x .
y  y  xx
y  y(x  x) yx  yxxy 
xz  xy  xz  yz x  x 
xy
16

Unit 03
Dr Rajesh
Algebraic Simplification of Switching
Expressions
 Example: Simplify
WX  XY  X Z WY Z
Sol:

17

Unit 03
Dr Rajesh
Algebraic Simplification of Switching
Expressions
 Example : Simplify
C
ABD
  ABCD ABDABCD ABCD ACD BCD
Sol:

18

Unit 03
Dr Rajesh
Proving Validity of an Equation
 Determine if an equation is valid:
 1. Construct a truth table and evaluate both side s of the
equation for all combinations of the values of the variables.
 2. Manipulate one side of the equation by applying various
theorems until it is identical with the other side.
 3. Reduce both sides of the equation independently to the
same expression.
 4. It is permission to perform the same operation on both
sides of the equation provided the operation is reversible.
( complement is reversible, multiplication and addition are
not reversible)
x+y=x+z does not imply y=z ( e.g. x=1,y=0, z=1)
xy=xz does not imply y=z ( e.g. x=0, y=0, z=1)
19

Unit 03
Dr Rajesh
Proving Validity of an Equation
 Example: Show that
 D BCD  ABC ABD BCD AD  ABC
AB
Sol-1:

20

Unit 03
Dr Rajesh
Proving Validity of an Equation
 Example: Show that
 D BCD  ABC ABD BCD AD  ABC
AB
Sol-2: Let F ( A, B,C, D)  ABD BCD  ABC ABDF ( A,
1 2

B,C, D)  BCD AD  ABC


(1)A  0, F1(0, B, C, D)  BD BCD  B(D CD)  B(D C)  BD BC
F2 (0, B, C, D)  BCD BC  B(CD C)  B(D C)  BD BC
 F1(0, B,C, D)  F2 (0, B, C, D)
(2)A  1, F1(1, B,C, D)  BCD  BC BD B(CD  C) BD
 B(D  C) BD BD  BC BD D  BCF2 (1, B,C,
D)  BCD  D  D  BC
 F1(1, B,C, D)  F2 (1, B,C, D)
 F1( A, B, C, D)  F2 ( A, B, C, D)

21

Unit 03
Dr Rajesh
Proving Validity of an Equation
 Example: Show that
ABCD ( A BC)( A  CD) BCD ABC
 ABCD  AC D
  ABD  ABCD  BCD
Sol: First, we will reduce the left side:

22

Uni 03
Dr Rajesh
Proving Validity of an Equation
Sol (cont.): Now we will reduce the right side:

Because both sides of the original equation


were independently reduced to the same
expression, the original equation is valid.

23

Dr Rajesh
Example 1

Determine if the following equation is valid

Dr Rajesh 90
?

Dr Rajesh 91
?

LHS RHS

Dr Rajesh 92
Left-Hand Side (LHS)

Dr Rajesh 93
Left-Hand Side (LHS)

Dr Rajesh 94
Left-Hand Side (LHS)

Dr Rajesh 95
Right-Hand Side (RHS)

Dr Rajesh 96
Right-Hand Side (RHS)

Dr Rajesh 97
Right-Hand Side (RHS)

Dr Rajesh 98
?

LHS RHS

Dr Rajesh 99
Example 2

Design the minimum-cost product-of-sums


expression for the function

f(x1, x2, x3) = Σ m(0, 2, 4, 5, 6, 7)

Dr Rajesh 100
Minterms and Maxterms
(with three variables)

Dr Rajesh 101
Minterms and Maxterms
(with three variables)

The function is
1 for these rows Dr Rajesh 102
Minterms and Maxterms
(with three variables)

The function is The function is


1 for these rows Dr Rajesh
0 for these rows 103
Two different ways to specify the same
function f of three variables

f(x1, x2, x3) = Σ m(0, 2, 4, 5, 6, 7)

f(x1, x2, x3) = Π M(1, 3)

Dr Rajesh 104
The POS Expression

f(x1, x2, x3) = Π M(1, 3)

= M1  M3
= ( x1 + x2 + x3)( x1 + x2 + x3)

Dr Rajesh 105
The Minimum POS Expression

f(x1, x2, x3) = ( x1 + x2 + x3)( x1 + x2 + x3)

= ( x1 + x3 + x2)( x1 + x3 + x2)

= ( x1 + x3 )

Hint: Use the following Boolean Algebra theorem

Dr Rajesh 106
Alternative Solution Using K-Maps
x1 x2 x3
x1 x2
0 0 0 m0 x3
00 01 11 10
0 0 1 m1
0 m0 m2 m6 m4
0 1 0 m2
0 1 1 m3 1 m1 m3 m7 m5
1 0 0 m4
1 0 1 m5 (b) Karnaugh map
1 1 0 m6
1 1 1 m7

(a) Truth table

Dr Rajesh 107
Alternative Solution Using K-Maps
x1 x2 x3
x1 x2
0 0 0 m0 x3
00 01 11 10
0 0 1 m1
0 m0 m2 m6 m4
0 1 0 m2
0 1 1 m3 1 m1 m3 m7 m5
1 0 0 m4
1 0 1 m5 (b) Karnaugh map
1 1 0 m6
1 1 1 m7

(a) Truth table

Dr Rajesh 108
Alternative Solution Using K-Maps
x1 x2 x3
x1 x2
0 0 0 m0 x3
00 01 11 10
0 0 1 m1
0 m0 m2 m6 m4
0 1 0 m2
0 1 1 m3 1 m1 m3 m7 m5
1 0 0 m4
1 0 1 m5 (b) Karnaugh map
1 1 0 m6
1 1 1 m7

(a) Truth table

Dr Rajesh 109
Alternative Solution Using K-Maps

Dr Rajesh 110
Alternative Solution Using K-Maps

1 1 1 1

0 0 1 1

Dr Rajesh 111
Alternative Solution Using K-Maps

1 1 1 1

0 0 1 1

( x1 + x3 )
Dr Rajesh 112
Example 3

Dr Rajesh 113
Condition A

Dr Rajesh 114
Condition A

Dr Rajesh 115
Condition B

Dr Rajesh 116
Condition B

Dr Rajesh 117
Condition C

Dr Rajesh 118
Condition C

Dr Rajesh 119
The output of the circuit can be expressed as
f = AB + AC + BC

Dr Rajesh 120
The output of the circuit can be expressed as
f = AB + AC + BC

Dr Rajesh 121
The output of the circuit can be expressed as
f = AB + AC + BC

Dr Rajesh 122
Finally, we get

Dr Rajesh 123
Example 5

Design the minimum-cost SOP and POS


expression for the function

f(x1, x2, x3, x4) = Σ m(4, 6, 8, 10, 11, 12, 15) + D(3, 5, 7, 9)

Dr Rajesh 124
Let’s Use a K-Map
f(x1, x2, x3, x4) = Σ m(4, 6, 8, 10, 11, 12, 15) + D(3, 5, 7, 9)

x1
x1 x2
x3 x4
00 01 11 10

00 m0 m4 m 12 m8

01 m1 m5 m 13 m9
x4
11 m3 m7 m 15 m 11
x3
10 m2 m6 m 14 m 10

x2
Dr Rajesh 125
Let’s Use a K-Map
f(x1, x2, x3, x4) = Σ m(4, 6, 8, 10, 11, 12, 15) + D(3, 5, 7, 9)

x1
x1 x2
x3 x4
00 01 11 10

00 m00 m14 m112 m18

01 m01 md5 m013 md9


x4

x3
11 d
m3 m7
d 1
m 15 m 11
1
10 0
m2 m6
1 0
m 14 m 10
1
x2
Dr Rajesh 126
The SOP Expression

Dr Rajesh 127
[ Figure 2.67a from the textbook ]
What about the POS Expression?
f(x1, x2, x3, x4) = Σ m(4, 6, 8, 10, 11, 12, 15) + D(3, 5, 7, 9)

x1
x1 x2
x3 x4
00 01 11 10

00 m00 m14 m112 m18

01 m01 md5 m013 md9


x4

x3
11 d
m3 m7
d 1
m 15 m 11
1
10 0
m2 m6
1 0
m 14 m 10
1
x2
Dr Rajesh 128
The POS Expression

Dr Rajesh 129
[ Figure 2.67b from the textbook ]
Example 6

Use K-maps to find the minimum-cost SOP and POS


expression for the function

Dr Rajesh 130
Let’s map the expression to the K-Map

x1
x1 x2
x3 x4
00 01 11 10

00 m0 m4 m 12 m8

01 m1 m5 m 13 m9
x4
11 m3 m7 m 15 m 11
x3
10 m2 m6 m 14 m 10

x2
Dr Rajesh 131
Let’s map the expression to the K-Map

x1
x1 x2
x3 x4
00 01 11 10

00 m0 m4 md12 m8

01 m1 m5 m 13 md9
x4
11 m3 m7 m 15 m 11
x3
10 m2 m6
d
m 14 m 10

x2
Dr Rajesh 132
Let’s map the expression to the K-Map

x1
x1 x2
x3 x4
00 01 11 10

00 m0 m4 md12 m8

01 m1 m5 m 13 md9
x4
11 m3 m7 m 15 m 11
x3
10 m2 m6
d
m 14 m 10

x2
Dr Rajesh 133
The SOP Expression

Dr Rajesh 134
[ Figure 2.68a from the textbook ]
What about the POS Expression?

x1
x1 x2
x3 x4
00 01 11 10

00 m10 m14 md12 m08

01 m11 m05 m113 md9


x4

x3
11 1
m3 m7
1 1
m 15 m 11
1
10 0
m2 m6
0 d
m 14 m 10
0
x2
Dr Rajesh 135
The POS Expression

Dr Rajesh 136
[ Figure 2.68b from the textbook ]
Example 7

Derive the minimum-cost SOP expression for

Dr Rajesh 137
First, expand the expression
using property 12a

Dr Rajesh 138
Construct the K-Map for this expression

xs11 xs22 xs3


xs11xs22
0 0 0 m0 x3
s3 00 01 11 10
0 0 1 m1
0 m0 m2 m6 m4
0 1 0 m2
0 1 1 m3 1 m1 m3 m7 m5
1 0 0 m4
1 0 1 m5 (b) Karnaugh map
1 1 0 m6
1 1 1 m7

(a) Truth table Dr Rajesh 139


Construct the K-Map for this expression

Dr Rajesh 140
[ Figure 2.69 from the textbook ]

You might also like