Digital Electronics Tutorial 1

Download Report

Transcript Digital Electronics Tutorial 1

Digital Electronics Tutorial - 1
24th January 2006
Tutors :
Daibashish Gangopadhyay, Subhadeep Banik, Saurabh
Singla, S. Narayanan and Shibin Ali
I . Boolean Expressions
1. Reduce the following expressions as
far as possible
a. AB+A’C+BC
b. ABC’ + AB’C + A’BC + ABC
c. (WX’)’ (W+Y) ( X’Y’Z’)’
d. X’ (Y+ WY’Z’) + X’Y’ ( W’Z’ + Z)
I . Boolean Expressions
2. Express the following switching
operations using Nand gates only
a. F=AB’+AC+B’C
b. F= XY’ + (Y+Z’) (X+ Z)
3. Prove that the OR operation in
Shannon’s expansion theorum can be
replaced by the EXOR operation
II. Karnaugh Maps
1. A function is specified by the following Minterm lists
F (w,x,y,z)= ∑(2,4,6,9,10,11,12,13,15)
a. Construct the logical map
b. List all the possible k-cubes
c. List all k-cubes that are not covered by higher
order cubes
d. List a minimal set of k-cubes that covers all 1cells at least once
e. Find the minimal expression in terms of w,x,y,z
II. Karnaugh Maps
2. Using a Logic map show that a minimal
p-of-s expression representing a selfdual function can be obtained from a
minimal s-of-p expression by
interchanging sum and product
operations
III. Multiplexers
1. Construct the function F= AB+CD using not
more than three 2-1 multiplexers
2. Realize each of the following using a 4X1
multiplexer and minimum connecting gates
a. f=∑(0,1,10,11,12,13,14,15)
b. f=∑(0,3,4,7,10)
3. What is the minimum number of 2-1
multiplexers required to realize a full-adder
ckt ?
IV. Demultiplexers
Design a BCD-to-decimal decoder using
two 2-to-4 line decoders and minimum
of interconnecting AND gates.
V. Quine McCluskey (HW)
1. Minimize the following functions using
QM Method:
 F (A, B, C, D) = Σ(4, 8, 9, 10, 11,
12, 14, 15)
F ( A, B, C, D)= Σ (3, 4, 5, 7, 9,
11, 12, 13)
4 X 16 decoder using 2 3X8
decoders


Due next class
Solutions :
F = AB+A’C+BC
= AB+A’C+BC.(A+A’)
= AB+A’C+ABC+A’BC
= AB+ABC+A’C+A’BC
= AB(1+C)+A’C(1+B)
= AB.1+A’C.1 =AB+A’C
Note: In general xf + x’g+ fg=xf + x’g
Where x is any boolean variable and f,g any
boolean expressions ( ABSORPTION LAW )

F = ABC’ + AB’C + A’BC + ABC
= ABC’ + AB’C + A’BC + (ABC+ABC+ABC)
= ABC+ABC’ +ABC+A’BC + ABC+A’BC
= AB(C+C’)+BC(A+A’)+AC(B+B’)
= AB.1+BC.1+AC.1
= AB+BC+CA

F = (WX’)’ (W+Y) ( X’ Y’ Z’ )’
= ( W’+X ) ( W+Y ) ( X+Y+Z )
= ( W’+X ) ( Y+W ) ( Y+X+Z )
= ( W’+X ) [ Y+W(X+Z) ]
= W’ Y +W’ W(X+Z) +XY + XW(X+Z)
= W’ Y + XY + XW + XWZ
= W’ Y + XY + XW(1+Z)
= W’ Y + XY + XW
= W’ Y + WX (ABSORPTION LAW)

F = X’ (Y+ WY’Z’) + X’Y’ ( W’Z’ + Z)
= X’ Y + X’ WY’ Z’ + X’ Y’ W’ Z’ + X’ Y’ Z
= X’ [ Y + Y’ WZ’ + Y’ W’Z’ + Y’ Z ]
= X’ [ Y + Y’ Z’ (W+W’) +Y’Z ]
= X’ [ Y + Y’Z’ +Y’Z ]
= X’ [ Y + Y’ (Z’ +Z) ]
= X’ [ Y+ Y’ ]
= X’

F= AB’+AC+B’C
Approach the problem this way
(X.Y)’= AB’+AC+B’C
X’ + Y’ = AB’+AC+B’C
X’=A(B’+C)
Y’=B’C
or, X =[A.(B.C’)’]’
or, Y=(B’.C)’

F= XY’ + (Y+Z’) (X+ Z)
The Expression reduces to F = X + YZ on
expansion
F= (X’.(YZ)’)’ by De-Morgan’s Theorem
The statement of Shannon’s theorem is
f(x1,…,xn)=x1. f(1,…,xn) + x1’. f(0,…,xn)
We claim that
f(x1,…,xn)=x1. f(1,…,xn)  x1’. f(0,…,xn)
Put x1=1
LHS= f(1,…,xn) RHS= f(1,…,xn)  0
= f(1,…,xn)
Put x1=0
LHS= f(0,…,xn) RHS= f(0,…,xn)  0
= f(0,…,xn) QED

II. Karnaugh Maps

b,c> At first, construct all possible 1 cubes.
In the event that all 1-cubes are exhausted try
constructing 2-cubes and take all 1-cubes
completely covered by the latter in a separate
group.
Result : 1-cubes [2,6] , [2,10] , [4,6] , [4,12]
[10,11] , [12,13]
2-cubes [9,11,13,15] 1-cubes covered by 2cubes [9,11] ,[9,13],[11,15],[13,15]


d>The 2 cube comers all odd min-terms. We
have 5 remaining even min-terms for which
we need at least three 1-cubes.
One possible solution is : [9,11,13,15]
[2,10] , [4,12] , [4,6] Note: There may be
other minimal sets , but each of them will
give the same minimal expression
e> F=wz + xy’z’ + x’yz’ + w’xz’
A Boolean function F is said to be self-dual if
[F( a’, b’, c’ …..)]’ = F (a ,b ,c,…..)
 How will the Logic map of an n-variable self
dual function look like ?
 If the location marked n is filled with X then
the location marked 2n-1-n will have X’
 Suppose we have an n-variable self dual
function whose minimal s-of-p expression ‘ f ’
we get by a K-map



To evaluate the minimal p-of-s expression ‘g’
of the same function we now take into
account those squares which have zero in
them.
Now if the cell marked n (corresponding to
min-term x1’. x2 …. Xn (say) ) has 1 then the
cell marked 2n-1-n has 0. This corresponds to
the max-term x1’+x2+x3+….xn which is just
obtained by switching the primitive opns

Now if in the min-term map of a self dual
function min-terms n1,n2,n3…nk formed a
minimal set then, in the max-term map the
max-terms 2n-1-n1, 2n-1-n2,…. 2n-1-nk will
form a similar minimal set. The minimal OR
expression corresponding to this set is simply
obtained by switching and with or in the
corresponding S-of-P expression.
QED
Example of a 4 var-sdf
Example ( contd.)




In SOP map min-sets are [4,5,6,7] [0,4]
[5,13] [3,7] [6,14]
In POS map min-sets are [8,9,10,11] [15,11]
[10,2] [12,8] [9,1]
The minimal SOP expression is w’x + w’y’z’ +
xy’z+ w’yz + xyz’
The min POS expression is
(w’+x)(w’+y’+z’).(x+y’+z).(w’+y+z).(x+y+z’)
IV. Multiplexers

We need to realize the And and Or functions
using 2 to 1 multiplexers
A>And Gate
B> Or Gate
Truth Table
Truth Table
A
B
A.B
A
B
A+B
0
X
A
0
X
B
1
X
B
1
X
A

The best way of doing this is by writing the
min-terms down.

A Full-Adder is given by the folln. Equations
Sum = A  B  C Carry=AB+BC+CA
Let us first look at Sum
The Truth Table of XOR gate is
A
B
AB
0
X
B
1
X
B’
Now let us use Shannon’s Expansion theorem
Sum = B ( A  C) + B’ ( A  C)’
So we need 4 muxes to realize the XOR and
XNOR gates and 1 to sum the outputs
Carry = B(AC) + B’ ( A+C+AC)
= B (AC) + B’ (A+C)
2 muxes for the And & Or gates and 1 to sum
the outputs. That makes a total of 8.

V. Demultiplexers