summaryrefslogtreecommitdiff
path: root/45/CH3/EX3.8/example_3_8.sce
blob: 2dd2a34e2060666bca807c24a5ca241d4f0709cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//example 3.8
// this program needs kmap.sci and noof.sci
clc;
disp('      C''D''  C''D  CD  CD''');//displaying the given kmap
disp('A''B''    0    0    0   0');
disp('A''B     0    0    1   0');
disp('AB      x    x    x   x');
disp('AB''     0    0    x   x');
k=[0 0 0 0;0 0 1 0;0 0 1 0;0 0 0 0];
disp('In a Karnaugh map if don''t care condition exits, we may consider them as ones if that gives a larger group size.');
disp('The minimal expression from the given kmap is ');
kmap(k); //calling the kamp function