diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /48/CH4 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '48/CH4')
-rwxr-xr-x | 48/CH4/EX4.1/eg_4_1.sce | 286 | ||||
-rwxr-xr-x | 48/CH4/EX4.10/eg_4_10.sce | 4 | ||||
-rwxr-xr-x | 48/CH4/EX4.2/eg_4_2.sce | 284 | ||||
-rwxr-xr-x | 48/CH4/EX4.3/eg_4_3.sce | 288 | ||||
-rwxr-xr-x | 48/CH4/EX4.4/eg_4_4.sce | 34 | ||||
-rwxr-xr-x | 48/CH4/EX4.5/eg_4_5.sce | 608 | ||||
-rwxr-xr-x | 48/CH4/EX4.6/eg_4_6.sce | 38 | ||||
-rwxr-xr-x | 48/CH4/EX4.7/eg_4_7.sce | 5 | ||||
-rwxr-xr-x | 48/CH4/EX4.8/eg_4_8.sce | 8 | ||||
-rwxr-xr-x | 48/CH4/EX4.9/eg_4_9.sce | 7 |
10 files changed, 1562 insertions, 0 deletions
diff --git a/48/CH4/EX4.1/eg_4_1.sce b/48/CH4/EX4.1/eg_4_1.sce new file mode 100755 index 000000000..7ede8c617 --- /dev/null +++ b/48/CH4/EX4.1/eg_4_1.sce @@ -0,0 +1,286 @@ +clc;
+n=4; //four variable kmap
+k=[1 1 0 1;
+ 0 1 1 1;
+ 0 1 1 0;
+ 0 0 0 0];
+k(:,:,2)=zeros(n,n); //temporary matrix to know whether a element is paired or not
+//declaring notations to display output
+var=['y' 'z' 'w' 'x'];
+p1=['y''z''' 'y''z' 'yz' 'yz'''];
+p2=['w''x''';'w''x';'wx';'wx'''];
+//minimum redundant elements accepted while pairing
+cmn4=4;
+cmn2=2;
+temp=1;
+disp("The minimal ecpression of the given Kmap ");
+disp(k(:,:,1));
+disp("is :");
+disp(" ")
+//16 cells
+for i=1:n
+ for j=1:n
+ if(k(i,j)~=1)
+ temp=0;
+ break;
+ end
+ end
+end
+printf('f=');
+if(temp==1)
+ printf("1");
+ abort;
+end
+//8 cells
+z1=ones(2,4);
+temp1=['00' '01' '11' '10'];
+temp2=temp1';
+for i=1:n
+ if(i==4)
+ t=1;
+ else
+ t=i+1;
+ end
+ z=[k(i,:,1);k(t,:,1)];
+ if(z==z1)
+ k(i,:,2)=[1 1 1 1];
+ k(t,:,2)=[1 1 1 1];
+ a=strsplit(temp2(i,1));
+ b=strsplit(temp2(t,1));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf('%s''',var(in));
+ printf('+');
+ break;
+ else
+ if(c(in)==0 & a(in)=='1')
+ printf(var(in));
+ printf('+');
+ break;
+ end
+ end
+ end
+ end
+end
+z2=ones(4,2);
+for j=1:n
+ if(j==4)
+ t=1;
+ else
+ t=j+1;
+ end
+ z=[k(:,j,1) k(:,t,1)];
+ if(z==z2)
+ k(:,j,2)=[1;1;1;1];
+ k(:,t,2)=[1;1;1;1];
+ a=strsplit(temp1(1,j));
+ b=strsplit(temp1(1,t));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf('%s''',var(2+in));
+ printf('+');
+ break;
+ else
+ if(c(in)==0 & a(in)=='1')
+ printf(var(2+in));
+ printf('+');
+ break;
+ end
+ end
+ end
+ end
+end
+//4 cells
+z1=ones(1,4);
+z2=ones(4,1);
+z3=ones(2,2);
+temp1=['00' '01' '11' '10'];
+temp2=temp1';
+for t=1:n
+ z=k(t,:,1);
+ no=number_of(k(t,:,2),1);
+ if(z==z1 & no<cmn4)
+ k(t,:,2)=z1;
+ a=strsplit(temp1(1,t));
+ for in=1:max(size(a))
+ if(a(in)=='0')
+ printf('%s''',var(in));
+ end
+ if(a(in)=='1')
+ printf(var(in));
+ end
+ end
+ printf("+");
+ end
+end
+for t=1:n
+ z=k(:,t,1);
+ no=number_of(k(:,t,2),1);
+ if(z==z2 & no<cmn4)
+ k(:,t,2)=z2;
+ a=strsplit(temp2(t,1));
+ for in=1:max(size(a))
+ if(a(in)=='0')
+ printf('%s''',var(2+in));
+ end
+ if(a(in)=='1')
+ printf(var(2+in));
+ end
+ end
+ printf("+");
+ end
+end
+for i=1:n
+ for j=1:n
+ if(i==n)
+ t1=1;
+ else
+ t1=i+1;
+ end
+ if(j==n)
+ t2=1;
+ else
+ t2=j+1;
+ end
+ z4=[k(i,j,1) k(i,t2,1);k(t1,j,1) k(t1,t2,1)];
+ z5=[k(i,j,2) k(i,t2,2);k(t1,j,2) k(t1,t2,2)];
+ no=number_of(z5,1);
+ if(z4==z3 & no<cmn4)
+ k(i,j,2)=1;
+ k(i,t2,2)=1;
+ k(t1,j,2)=1;
+ k(t1,t2,2)=1;
+ a=strsplit(temp2(i,1));
+ b=strsplit(temp2(t1,1));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf('%s''',var(in));
+ end
+ if(c(in)==0 & a(in)=='1')
+ printf(var(in));
+ end
+ end
+ a=strsplit(temp1(1,j));
+ b=strsplit(temp1(1,t2));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf('%s''',var(2+in));
+ end
+ if(c(in)==0 & a(in)=='1')
+ printf(var(2+in));
+ end
+ end
+ printf("+");
+ end
+ end
+end
+//2 cells
+z6=[1 1];
+z7=z6';
+for i=1:n
+ for j=1:n
+ if(i==n)
+ t1=1;
+ else
+ t1=i+1;
+ end
+ if(j==n)
+ t2=1;
+ else
+ t2=j+1;
+ end
+ z8=[k(i,j,1) k(i,t2,1)];
+ z9=[k(i,j,2) k(i,t2,2)];
+ no1=number_of(z9,1);
+ if(z8==z6 & no1<cmn2 & i+j~=2)
+ k(i,j,2)=1;
+ k(i,t2,2)=1;
+ a=strsplit(temp1(1,j));
+ b=strsplit(temp1(1,t2));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf(p1(1,i));
+ printf('%s''',var(2+in));
+ printf("+");
+ end
+ if(c(in)==0 & a(in)=='1')
+ printf(p1(1,i));
+ printf(var(2+in));
+ printf("+");
+ end
+ end
+ end
+ end
+end
+for i=1:n
+ for j=1:n
+ if(i==n)
+ t1=1;
+ else
+ t1=i+1;
+ end
+ if(j==n)
+ t2=1;
+ else
+ t2=j+1;
+ end
+ z10=[k(i,j,1);k(t1,j,1)];
+ z11=[k(i,j,2);k(t1,j,2)];
+ no2=number_of(z11,1);
+ if(z10==z7 & no2<cmn2)
+ k(i,j,2)=1;
+ k(t1,j,2)=1;
+ a=strsplit(temp2(i,1));
+ b=strsplit(temp2(t1,1));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf(p2(j,1));
+ printf('%s''',var(in));
+ printf("+");
+ end
+ if(c(in)==0 & a(in)=='1')
+ printf(p2(j,1));
+ printf(var(in));
+ printf("+");
+ end
+ end
+ end
+ end
+end
+//single cell
+for i=1:n
+ for j=1:n
+ if(k(i,j,2)==0 & k(i,j,1)==1)
+ a=strsplit(temp1(1,j));
+ b=strsplit(temp2(i,1));
+ for in=1:max(size(a(:,1)))
+ if(a(in,1)=='1')
+ printf(var(in+2));
+ else
+ if(a(in,1)=='0')
+ printf('%s''',var(2+in));
+ end
+ end
+ end
+ for in=1:max(size(b(:,1)))
+ if(b(in,1)=='1')
+ printf(var(in));
+ else
+ if(b(in,1)=='0')
+ printf('%s''',var(in));
+ end
+ end
+ end
+ if(i~=4 & j~=4)
+ printf("+");
+ end
+ end
+ end
+end
+printf("0");
\ No newline at end of file diff --git a/48/CH4/EX4.10/eg_4_10.sce b/48/CH4/EX4.10/eg_4_10.sce new file mode 100755 index 000000000..dd61d9c74 --- /dev/null +++ b/48/CH4/EX4.10/eg_4_10.sce @@ -0,0 +1,4 @@ +clc;
+k=[1 1 0 1;
+ 0 1 1 1];
+karmap3(k);
\ No newline at end of file diff --git a/48/CH4/EX4.2/eg_4_2.sce b/48/CH4/EX4.2/eg_4_2.sce new file mode 100755 index 000000000..85681de34 --- /dev/null +++ b/48/CH4/EX4.2/eg_4_2.sce @@ -0,0 +1,284 @@ +clc;
+n=4; //four variable kmap
+k=[1 1 0 1;
+ 0 1 1 1;
+ 0 1 1 0;
+ 0 0 0 0];
+k(:,:,2)=zeros(n,n); //temporary matrix to know whether a element is paired or not
+//declaring notations to display output
+var=['y' 'z' 'w' 'x'];
+p1=['y^z^' 'y''z' 'yz' 'yz'''];
+p2=['w^x^';'w''x';'wx';'wx'''];
+//minimum redundant elements accepted while pairing
+cmn4=1;
+cmn2=1;
+temp=1;
+disp("The minimal ecpression of the given Kmap ");
+disp(k(:,:,1));
+disp("is :");
+disp(" ")
+//16 cells
+for i=1:n
+ for j=1:n
+ if(k(i,j)~=1)
+ temp=0;
+ break;
+ end
+ end
+end
+printf('f=');
+if(temp==1)
+ printf("1");
+ abort;
+end
+//8 cells
+z1=ones(2,4);
+z2=ones(4,2);
+temp1=['00' '01' '11' '10'];
+temp2=temp1';
+for i=1:n
+ if(i==4)
+ t=1;
+ else
+ t=i+1;
+ end
+ z=[k(i,:,1);k(t,:,1)];
+ if(z==z1)
+ k(i,:,2)=[1 1 1 1];
+ k(t,:,2)=[1 1 1 1];
+ a=strsplit(temp2(i,1));
+ b=strsplit(temp2(t,1));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf('%s''',var(in));
+ printf('+');
+ break;
+ else
+ if(c(in)==0 & a(in)=='1')
+ printf(var(in));
+ printf('+');
+ break;
+ end
+ end
+ end
+ end
+end
+for j=1:n
+ if(j==4)
+ t=1;
+ else
+ t=j+1;
+ end
+ z=[k(:,j,1) k(:,t,1)];
+ if(z==z2)
+ k(:,j,2)=[1;1;1;1];
+ k(:,t,2)=[1;1;1;1];
+ a=strsplit(temp1(1,j));
+ b=strsplit(temp1(1,t));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf('%s''',var(2+in));
+ printf('+');
+ break;
+ else
+ if(c(in)==0 & a(in)=='1')
+ printf(var(2+in));
+ printf('+');
+ break;
+ end
+ end
+ end
+ end
+end
+//4 cells
+z1=ones(1,4);
+z2=ones(4,1);
+z3=ones(2,2);
+temp1=['00' '01' '11' '10'];
+temp2=temp1';
+for t=1:n
+ z=k(t,:,1);
+ no=number_of(k(t,:,2),1);
+ if(z==z1 & no<cmn4)
+ k(t,:,2)=z1;
+ a=strsplit(temp1(1,t));
+ for in=1:max(size(a))
+ if(a(in)=='0')
+ printf('%s''',var(in));
+ end
+ if(a(in)=='1')
+ printf(var(in));
+ end
+ end
+ printf("+");
+ end
+end
+for t=1:n
+ z=k(:,t,1);
+ no=number_of(k(:,t,2),1);
+ if(z==z2 & no<cmn4)
+ k(:,t,2)=z2;
+ a=strsplit(temp2(t,1));
+ for in=1:max(size(a))
+ if(a(in)=='0')
+ printf('%s''',var(2+in));
+ end
+ if(a(in)=='1')
+ printf(var(2+in));
+ end
+ end
+ printf("+");
+ end
+end
+for i=1:n
+ for j=1:n
+ if(i==n)
+ t1=1;
+ else
+ t1=i+1;
+ end
+ if(j==n)
+ t2=1;
+ else
+ t2=j+1;
+ end
+ z4=[k(i,j,1) k(i,t2,1);k(t1,j,1) k(t1,t2,1)];
+ z5=[k(i,j,2) k(i,t2,2);k(t1,j,2) k(t1,t2,2)];
+ no=number_of(z5,1);
+ if(z4==z3 & no<cmn4)
+ k(i,j,2)=1;
+ k(i,t2,2)=1;
+ k(t1,j,2)=1;
+ k(t1,t2,2)=1;
+ a=strsplit(temp2(i,1));
+ b=strsplit(temp2(t1,1));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf('%s''',var(in));
+ end
+ if(c(in)==0 & a(in)=='1')
+ printf(var(in));
+ end
+ end
+ a=strsplit(temp1(1,j));
+ b=strsplit(temp1(1,t2));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf('%s''',var(2+in));
+ end
+ if(c(in)==0 & a(in)=='1')
+ printf(var(2+in));
+ end
+ end
+ printf("+");
+ end
+ end
+end
+//2 cells
+z6=[1 1];
+z7=z6';
+for i=1:n
+ for j=1:n
+ if(i==n)
+ t1=1;
+ else
+ t1=i+1;
+ end
+ if(j==n)
+ t2=1;
+ else
+ t2=j+1;
+ end
+ z8=[k(i,j,1) k(i,t2,1)];
+ z9=[k(i,j,2) k(i,t2,2)];
+ no1=number_of(z9,1);
+ if(z8==z6 & no1<cmn2)
+ k(i,j,2)=1;
+ k(i,t2,2)=1;
+ a=strsplit(temp1(1,j));
+ b=strsplit(temp1(1,t2));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf(p1(1,i));
+ printf('%s''',var(2+in));
+ printf("+");
+ end
+ if(c(in)==0 & a(in)=='1')
+ printf(p1(1,i));
+ printf(var(2+in));
+ printf("+");
+ end
+ end
+ end
+ end
+end
+for i=1:n
+ for j=1:n
+ if(i==n)
+ t1=1;
+ else
+ t1=i+1;
+ end
+ if(j==n)
+ t2=1;
+ else
+ t2=j+1;
+ end
+ z10=[k(i,j,1);k(t1,j,1)];
+ z11=[k(i,j,2);k(t1,j,2)];
+ no2=number_of(z11,1);
+ if(z10==z7 & no2<cmn2)
+ k(i,j,2)=1;
+ k(t1,j,2)=1;
+ a=strsplit(temp2(i,1));
+ b=strsplit(temp2(t1,1));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf(p2(j,1));
+ printf('%s''',var(in));
+ printf("+");
+ end
+ if(c(in)==0 & a(in)=='1')
+ printf(p2(j,1));
+ printf(var(in));
+ printf("+");
+ end
+ end
+ end
+ end
+end
+//single cell
+for i=1:n
+ for j=1:n
+ if(k(i,j,2)==0 & k(i,j,1)==1)
+ a=strsplit(temp1(1,j));
+ b=strsplit(temp2(i,1));
+ for in=1:max(size(a(:,1)))
+ if(a(in,1)=='1')
+ printf(var(in+2));
+ else
+ if(a(in,1)=='0')
+ printf('%s''',var(2+in));
+ end
+ end
+ end
+ for in=1:max(size(b(:,1)))
+ if(b(in,1)=='1')
+ printf(var(in));
+ else
+ if(b(in,1)=='0')
+ printf('%s''',var(in));
+ end
+ end
+ end
+ printf("+");
+ end
+ end
+end
+printf("0");
\ No newline at end of file diff --git a/48/CH4/EX4.3/eg_4_3.sce b/48/CH4/EX4.3/eg_4_3.sce new file mode 100755 index 000000000..df5c48f06 --- /dev/null +++ b/48/CH4/EX4.3/eg_4_3.sce @@ -0,0 +1,288 @@ +clc;
+n=4; //four variable kmap
+k=[0 0 1 0;
+ 1 1 1 0;
+ 0 1 1 1;
+ 0 1 0 0];
+k(:,:,2)=zeros(n,n); //temporary matrix to know whether a element is paired or not
+//declaring notations to display output
+var=['y' 'z' 'w' 'x'];
+p1=['y^z^' 'y''z' 'yz' 'yz'''];
+p2=['w^x^';'w''x';'wx';'wx'''];
+//minimum redundant elements accepted while pairing
+cmn4=1;
+cmn2=1;
+temp=1;
+disp("The minimal ecpression of the given Kmap ");
+disp(k(:,:,1));
+disp("is :");
+disp(" ")
+//16 cells
+for i=1:n
+ for j=1:n
+ if(k(i,j)~=1)
+ temp=0;
+ break;
+ end
+ end
+end
+printf('f=');
+if(temp==1)
+ printf("1");
+ abort;
+end
+//8 cells
+z1=ones(2,4);
+z2=ones(4,2);
+temp1=['00' '01' '11' '10'];
+temp2=temp1';
+for i=1:n
+ if(i==4)
+ t=1;
+ else
+ t=i+1;
+ end
+ z=[k(i,:,1);k(t,:,1)];
+ if(z==z1)
+ k(i,:,2)=[1 1 1 1];
+ k(t,:,2)=[1 1 1 1];
+ a=strsplit(temp2(i,1));
+ b=strsplit(temp2(t,1));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf('%s''',var(in));
+ printf('+');
+ break;
+ else
+ if(c(in)==0 & a(in)=='1')
+ printf(var(in));
+ printf('+');
+ break;
+ end
+ end
+ end
+ end
+end
+for j=1:n
+ if(j==4)
+ t=1;
+ else
+ t=j+1;
+ end
+ z=[k(:,j,1) k(:,t,1)];
+ if(z==z2)
+ k(:,j,2)=[1;1;1;1];
+ k(:,t,2)=[1;1;1;1];
+ a=strsplit(temp1(1,j));
+ b=strsplit(temp1(1,t));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf('%s''',var(2+in));
+ printf('+');
+ break;
+ else
+ if(c(in)==0 & a(in)=='1')
+ printf(var(2+in));
+ printf('+');
+ break;
+ end
+ end
+ end
+ end
+end
+//2 cells
+z6=[1 1];
+z7=z6';
+for i=1:n
+ for j=1:n
+ if(i==n)
+ t1=1;
+ else
+ t1=i+1;
+ end
+ if(j==n)
+ t2=1;
+ else
+ t2=j+1;
+ end
+ z8=[k(i,j,1) k(i,t2,1)];
+ z9=[k(i,j,2) k(i,t2,2)];
+ no1=number_of(z9,1);
+ if(z8==z6 & no1<cmn2)
+ if(i==3 & i+j==5)
+ ;
+ else
+ k(i,j,2)=1;
+ k(i,t2,2)=1;
+ a=strsplit(temp1(1,j));
+ b=strsplit(temp1(1,t2));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf(p1(1,i));
+ printf('%s''',var(2+in));
+ printf("+");
+ end
+ if(c(in)==0 & a(in)=='1')
+ printf(p1(1,i));
+ printf(var(2+in));
+ printf("+");
+ end
+ end
+ end
+ end
+ end
+end
+for i=1:n
+ for j=1:n
+ if(i==n)
+ t1=1;
+ else
+ t1=i+1;
+ end
+ if(j==n)
+ t2=1;
+ else
+ t2=j+1;
+ end
+ z10=[k(i,j,1);k(t1,j,1)];
+ z11=[k(i,j,2);k(t1,j,2)];
+ no2=number_of(z11,1);
+ if(z10==z7 & no2<cmn2)
+ k(i,j,2)=1;
+ k(t1,j,2)=1;
+ a=strsplit(temp2(i,1));
+ b=strsplit(temp2(t1,1));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf(p2(j,1));
+ printf('%s''',var(in));
+ printf("+");
+ end
+ if(c(in)==0 & a(in)=='1')
+ printf(p2(j,1));
+ printf(var(in));
+ printf("+");
+ end
+ end
+ end
+ end
+end
+//4 cells
+z1=ones(1,4);
+z2=ones(4,1);
+z3=ones(2,2);
+temp1=['00' '01' '11' '10'];
+temp2=temp1';
+for t=1:n
+ z=k(t,:,1);
+ no=number_of(k(t,:,2),1);
+ if(z==z1 & no<cmn4)
+ k(t,:,2)=z1;
+ a=strsplit(temp1(1,t));
+ for in=1:max(size(a))
+ if(a(in)=='0')
+ printf('%s''',var(in));
+ end
+ if(a(in)=='1')
+ printf(var(in));
+ end
+ end
+ printf("+");
+ end
+end
+for t=1:n
+ z=k(:,t,1);
+ no=number_of(k(:,t,2),1);
+ if(z==z2 & no<cmn4)
+ k(:,t,2)=z2;
+ a=strsplit(temp2(t,1));
+ for in=1:max(size(a))
+ if(a(in)=='0')
+ printf('%s''',var(2+in));
+ end
+ if(a(in)=='1')
+ printf(var(2+in));
+ end
+ end
+ printf("+");
+ end
+end
+for i=1:n
+ for j=1:n
+ if(i==n)
+ t1=1;
+ else
+ t1=i+1;
+ end
+ if(j==n)
+ t2=1;
+ else
+ t2=j+1;
+ end
+ z4=[k(i,j,1) k(i,t2,1);k(t1,j,1) k(t1,t2,1)];
+ z5=[k(i,j,2) k(i,t2,2);k(t1,j,2) k(t1,t2,2)];
+ no=number_of(z5,1);
+ if(z4==z3 & no<cmn4)
+ k(i,j,2)=1;
+ k(i,t2,2)=1;
+ k(t1,j,2)=1;
+ k(t1,t2,2)=1;
+ a=strsplit(temp2(i,1));
+ b=strsplit(temp2(t1,1));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf('%s''',var(in));
+ end
+ if(c(in)==0 & a(in)=='1')
+ printf(var(in));
+ end
+ end
+ a=strsplit(temp1(1,j));
+ b=strsplit(temp1(1,t2));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf('%s''',var(2+in));
+ end
+ if(c(in)==0 & a(in)=='1')
+ printf(var(2+in));
+ end
+ end
+ printf("+");
+ end
+ end
+end
+//single cell
+for i=1:n
+ for j=1:n
+ if(k(i,j,2)==0 & k(i,j,1)==1)
+ a=strsplit(temp1(1,j));
+ b=strsplit(temp2(i,1));
+ for in=1:max(size(a(:,1)))
+ if(a(in,1)=='1')
+ printf(var(in+2));
+ else
+ if(a(in,1)=='0')
+ printf('%s''',var(2+in));
+ end
+ end
+ end
+ for in=1:max(size(b(:,1)))
+ if(b(in,1)=='1')
+ printf(var(in));
+ else
+ if(b(in,1)=='0')
+ printf('%s''',var(in));
+ end
+ end
+ end
+ printf("+");
+ end
+ end
+end
+printf("0");
\ No newline at end of file diff --git a/48/CH4/EX4.4/eg_4_4.sce b/48/CH4/EX4.4/eg_4_4.sce new file mode 100755 index 000000000..72151f2aa --- /dev/null +++ b/48/CH4/EX4.4/eg_4_4.sce @@ -0,0 +1,34 @@ +clc;
+n=10;
+//coverting decimal numbers into excess 3 values
+for i=0:n-1
+ c(i+1,1)=dec21bin(i+3);
+end
+a=c;
+b=zeros(10,4);
+//placing excess 3 outputs in matrix for convenience
+for i=1:n
+ j=4;
+ while(a(i,1)>=1)
+ b(i,j)=round(modulo(a(i,1),10));
+ a(i,1)=a(i,1)/10;
+ j=j-1;
+ end
+end
+//dont care is represented by a 2 since scilab doesnt allow a matrix to contain string and a number.
+for i=n+1:16
+ b(i,:)=[2 2 2 2];
+end
+//map of each output variable
+z=[b(1,1) b(5,1) b(13,1) b(9,1);b(2,1) b(6,1) b(14,1) b(10,1);
+ b(3,1) b(7,1) b(15,1) b(11,1);b(4,1) b(8,1) b(16,1) b(12,1)];
+y=[b(1,2) b(5,2) b(13,2) b(9,2);b(2,2) b(6,2) b(14,2) b(10,2);
+ b(3,2) b(7,2) b(15,2) b(11,2);b(4,2) b(8,2) b(16,2) b(12,2)];
+w=[b(1,3) b(5,3) b(13,3) b(9,3);b(2,3) b(6,3) b(14,3) b(10,3);
+ b(3,3) b(7,3) b(15,3) b(11,3);b(4,3) b(8,3) b(16,3) b(12,3)];
+x=[b(1,4) b(5,4) b(13,4) b(9,4);b(2,4) b(6,4) b(14,4) b(10,4);
+ b(3,4) b(7,4) b(15,4) b(11,4);b(4,4) b(8,4) b(16,4) b(12,4)];
+donkmap(w,1);
+donkmap(x,2);
+donkmap(y,3);
+donkmap(z,4);
\ No newline at end of file diff --git a/48/CH4/EX4.5/eg_4_5.sce b/48/CH4/EX4.5/eg_4_5.sce new file mode 100755 index 000000000..82073dc80 --- /dev/null +++ b/48/CH4/EX4.5/eg_4_5.sce @@ -0,0 +1,608 @@ +//f=x^y^z+wxz+xy+v^w^yz^
+clc;
+n=4;
+k=[0 0 0 0;
+ 1 0 1 1;
+ 0 1 1 0;
+ 1 1 1 0];
+k(:,:,2)=[0 0 0 0;
+ 1 0 1 1;
+ 0 1 1 0;
+ 0 1 1 0];
+//k=[1 0 0 0;
+// 0 0 0 0;
+// 0 0 0 0;
+// 0 0 1 0];
+//k(:,:,2)=[1 0 0 0;
+// 0 0 0 0;
+// 0 0 0 0;
+// 1 0 0 0];
+k(:,:,3)=zeros(n,n);
+k(:,:,4)=zeros(n,n);
+var=['y' 'z' 'v' 'w' 'x'];
+p1=['y''z''' 'y''z' 'yz' 'yz'''];
+p2=['v''w''x''';'v''w''x';'v''wx';'v''wx''';
+'vw''x''';'vw''x';'vwx';'vwx'''];
+cmn16=9;
+cmn8=5;
+cmn4=3;
+cmn2=2;
+temp=1;
+ printf('The minimal ecpression of the given Kmap ');
+ disp(k(:,:,1));
+ disp(k(:,:,2));
+ disp("is :");
+printf('f');
+printf("=");
+//32 cells
+for i=1:n
+ for j=1:n
+ for l=1:2
+ if(k(i,j,l)~=1 & k(i,j,l)~=2)
+ temp=0;
+ break;
+ end
+ end
+ end
+end
+if(temp==1)
+ printf("1");
+ abort;
+end
+//16 cells
+//8+8 row cells
+z1=ones(2,4,2);
+z2=ones(4,2,2);
+temp1=['00' '01' '11' '10'];
+temp2=['000' '001' '011' '010' '100' '101' '111' '110'];
+for i=1:n
+ if(i==4)
+ t=1;
+ else
+ t=i+1;
+ end
+ z=[k(i,:,1:2);k(t,:,1:2)];
+ z1=[k(i,:,3:4);k(t,:,3:4)];
+ if(noof3(z,0)==0 & noof3(z1,1)<cmn16)
+ k(i,:,3:4)=ones(4,2);
+ k(t,:,3:4)=ones(4,2);
+ a=strsplit(temp1(1,i));
+ b=strsplit(temp1(1,t));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf('%s''',var(in));
+ else
+ if(c(in)==0 & a(in)=='1')
+ printf(var(in));
+ end
+ end
+ end
+ k(i,:,3:4)=ones(1,4,2);
+ k(t,:,3:4)=ones(1,4,2);
+ end
+end
+//8+8 column cells
+for j=1:n
+ if(j==4)
+ t=1;
+ else
+ t=j+1;
+ end
+ z=[k(:,j,1:2) k(:,t,1:2)];
+ z1=[k(:,j,3:4) k(:,t,3:4)];
+ if(noof3(z,0)==0 & noof3(z1,1)<cmn16)
+ k(:,j,3:4)=ones(4,2);
+ k(:,t,3:4)=ones(4,2);
+ a=strsplit(temp2(1,j));
+ b=strsplit(temp2(1,t));
+ c=strsplit(temp2(1,j+4));
+ d=strsplit(temp2(1,t+4));
+ c1=check(a,b,c,d);
+ for in=1:max(size(c1))
+ if(c1(in)==0 & a(in)=='0')
+ printf('%s''',var(2+in));
+ else
+ if(c1(in)==0 & a(in)=='1')
+ printf(var(2+in));
+ end
+ end
+ end
+ printf("+");
+ k(:,j,3:4)=ones(1,4,2);
+ k(:,t,3:4)=ones(1,4,2);
+ end
+end
+//4x4 front matrix
+if(number_of(k(:,:,1),0)==0 & number_of(k(:,:,3),1)<cmn16)
+ printf(var(3));
+ printf('''');
+ k(:,:,3)=ones(4,4);
+end
+//4x4 rear matrix
+if(number_of(k(:,:,2),0)==0 & number_of(k(:,:,4),1)<cmn16)
+ printf(var(3));
+ k(:,:,4)=ones(4,4);
+end
+//8 cells
+//2x2 front and rear cells
+for i=1:n
+ for j=1:n
+ if(i==4)
+ t=1;
+ else
+ t=i+1;
+ end
+ if(j==4)
+ u=1;
+ else
+ u=j+1;
+ end
+ z=k(i,j,1:2);
+ z(1,2,:)=k(i,u,1:2);
+ z(2,1,:)=k(t,j,1:2);
+ z(2,2,:)=k(t,u,1:2);
+ z1=k(i,j,3:4);
+ z1(1,2,:)=k(i,u,3:4);
+ z1(2,1,:)=k(t,j,3:4);
+ z1(2,2,:)=k(t,u,3:4);
+ if(noof3(z,0)==0 & noof3(z1,1)<cmn8)
+ a=strsplit(temp1(1,i));
+ b=strsplit(temp1(1,t));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf('%s''',var(in));
+ else
+ if(c(in)==0 & a(in)=='1')
+ printf(var(in));
+ end
+ end
+ end
+ a=strsplit(temp2(1,j));
+ b=strsplit(temp2(1,u));
+ c=strsplit(temp2(1,4+j));
+ d=strsplit(temp2(1,4+u));
+ c1=check(a,b,c,d);
+ for in=1:max(size(c1))
+ if(c1(in)==0 & a(in)=='0')
+ printf('%s''',var(2+in));
+ else
+ if(c1(in)==0 & a(in)=='1')
+ printf(var(2+in));
+ end
+ end
+ end
+ k(i,j,3:4)=ones(1,1,2);
+ k(i,u,3:4)=ones(1,1,2);
+ k(t,j,3:4)=ones(1,1,2);
+ k(t,u,3:4)=ones(1,1,2);
+ printf("+");
+ end
+ end
+end
+//1x4 front and rear cells
+for i=1:n
+ z=k(i,:,1:2);
+ z1=k(i,:,3:4);
+ if(noof3(z,0)==0 & noof3(z1,1)<cmn8)
+ printf(p1(i));
+ printf("+");
+ k(i,:,3:4)=ones(1,4,2);
+ end
+end
+//4x1 front and rear cells
+for j=1:n
+ z=k(:,j,1:2);
+ z1=k(:,j,3:4);
+ if(noof3(z,0)==0 & noof3(z1,1)<cmn8)
+ a=strsplit(temp2(1,j));
+ b=strsplit(temp2(1,u));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf('%s''',var(2+in));
+ else
+ if(c(in)==0 & a(in)=='1')
+ printf(var(2+in));
+ end
+ end
+ end
+ printf("+");
+ k(:,j,3:4)=ones(1,2,4);
+ end
+end
+//2x4 front cells
+for i=1:n
+ if(i==4)
+ t=1;
+ else
+ t=i+1;
+ end
+ z=k(i,:,1);
+ z(2,:,1)=k(t,:,1);
+ z1=k(i,:,3);
+ z1(2,:,1)=k(t,:,3);
+ if(number_of(z,0)==0 & number_of(z1,1)<cmn8)
+ a=strsplit(temp1(1,i));
+ b=strsplit(temp1(1,t));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf('%s''',var(in));
+ else
+ if(c(in)==0 & a(in)=='1')
+ printf(var(in));
+ end
+ end
+ end
+ printf('%s''',var(3));
+ printf("+");
+ k(i,:,3)=ones(1,4);
+ k(t,:,3)=ones(1,4);
+ end
+end
+//2x4 rear cells
+for i=1:n
+ if(i==4)
+ t=1;
+ else
+ t=i+1;
+ end
+ z=k(i,:,2);
+ z(2,:,1)=k(t,:,2);
+ z1=k(i,:,4);
+ z1(2,:,1)=k(t,:,4);
+ if(number_of(z,0)==0 & number_of(z1,1)<cmn8)
+ a=strsplit(temp1(1,i));
+ b=strsplit(temp1(1,t));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf('%s''',var(in));
+ else
+ if(c(in)==0 & a(in)=='1')
+ printf(var(in));
+ end
+ end
+ end
+ printf(var(3));
+ printf("+");
+ k(i,:,4)=ones(1,4);
+ k(t,:,4)=ones(1,4);
+ end
+end
+//4x2 front cells
+for j=1:n
+ if(j==4)
+ u=1;
+ else
+ u=j+1;
+ end
+ z=k(:,j,1);
+ z(:,2,1)=k(:,u,1);
+ z1=k(:,j,3);
+ z1(:,2,1)=k(:,u,3);
+ if(number_of(z,0)==0 & number_of(z1,1)<cmn8)
+ a=strsplit(temp2(1,i));
+ b=strsplit(temp2(1,t));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf('%s''',var(in));
+ else
+ if(c(in)==0 & a(in)=='1')
+ printf(var(in));
+ end
+ end
+ end
+ printf('%s''',var(3));
+ printf("+");
+ k(:,j,3)=ones(4,1);
+ k(:,u,3)=ones(4,1);
+ end
+end
+//4x2 rear cells
+for j=1:n
+ if(j==4)
+ u=1;
+ else
+ u=j+1;
+ end
+ z=k(:,j,2);
+ z(:,2,1)=k(:,u,2);
+ z1=k(:,j,4);
+ z1(:,2,1)=k(:,u,4);
+ if(number_of(z,0)==0 & number_of(z1,1)<cmn8)
+ a=strsplit(temp2(1,i));
+ b=strsplit(temp2(1,t));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf('%s''',var(4+in));
+ else
+ if(c(in)==0 & a(in)=='1')
+ printf(var(4+in));
+ end
+ end
+ end
+ printf(var(3));
+ printf("+");
+ k(:,j,4)=ones(4,1);
+ k(:,u,4)=ones(4,1);
+ end
+end
+//4 cells
+//1x4 front cells
+for i=1:n
+ z=k(i,:,1);
+ z1=k(i,:,3);
+ if(number_of(z,0)==0 & number_of(z1,1)<cmn4)
+ printf(p1(1,i));
+ printf('%s''',var(3));
+ printf("+");
+ k(i,:,3)=ones(1,4);
+ end
+end
+//1x4 rear cells
+for i=1:n
+ z=k(i,:,2);
+ z1=k(i,:,4);
+ if(number_of(z,0)==0 & number_of(z1,1)<cmn4)
+ printf(p1(1,i));
+ printf(var(3));
+ printf("+");
+ k(i,:,4)=ones(1,4);
+ end
+end
+//4x1 front cells
+for j=1:n
+ z=k(:,j,1);
+ z1=k(:,j,3);
+ if(number_of(z,0)==0 & number_of(z1,1)<cmn4)
+ printf(p2(j,1));
+ printf("+");
+ k(:,j,3)=ones(4,1);
+ end
+end
+//4x1 rear cells
+for j=1:n
+ z=k(:,j,2);
+ z1=k(:,j,4);
+ if(number_of(z,0)==0 & number_of(z1,1)<cmn4)
+ printf(p2(4+j,1));
+ printf("+");
+ k(:,j,4)=ones(4,1);
+ end
+end
+//2x1 front and rear matrix
+for i=1:n
+ for j=1:n
+ if(i==4)
+ t=1;
+ else
+ t=i+1;
+ end
+ z=[k(i,j,1);k(t,j,1)];
+ z(:,:,2)=[k(i,j,2) k(t,j,2)];
+ z1=[k(i,j,3);k(t,j,3)];
+ z1(:,:,2)=[k(i,j,4) k(t,j,4)];
+ if(noof3(z,0)==0 & noof3(z1,1)<cmn4)
+ a=strsplit(temp1(1,i));
+ b=strsplit(temp1(1,t));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf('%s''',var(in));
+ else
+ if(c(in)==0 & a(in)=='1')
+ printf(var(in));
+ end
+ end
+ end
+ a=strsplit(temp2(1,j));
+ b=strsplit(temp2(1,4+j));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf('%s''',var(2+in));
+ else
+ if(c(in)==0 & a(in)=='1')
+ printf(var(2+in));
+ end
+ end
+ end
+ printf('+');
+ k(i,j,3)=1;k(t,j,3)=1;
+ k(i,j,4)=1; k(t,j,4)=1;
+ end
+ end
+end
+//1x2 front and rear matrix
+for i=1:n
+ for j=1:n
+ if(j==4)
+ u=1;
+ else
+ u=j+1;
+ end
+ z=[k(i,j,1) k(i,u,1)];
+ z(:,:,2)=[k(i,j,2) k(i,u,2)];
+ z1=[k(i,j,3) k(i,u,3)];
+ z1(:,:,2)=[k(i,j,4) k(i,u,4)];
+ if(noof3(z,0)==0 & noof3(z1,1)<1)
+ printf(p1(i));
+ a=strsplit(temp2(1,j));
+ b=strsplit(temp2(1,u));
+ c=strsplit(temp2(1,4+j));
+ d=strsplit(temp2(1,4+j));
+ c1=check(a,b,c,d);
+ for in=1:max(size(c1))
+ if(c1(in)==0 & a(in)=='0')
+ printf('%s''',var(2+in));
+ else
+ if(c1(in)==0 & a(in)=='1')
+ printf(var(2+in));
+ end
+ end
+ end
+ printf('+');
+ k(i,j,3)=1; k(i,u,3)=1;
+ k(i,j,4)=1; k(i,u,4)=1;
+ end
+ end
+end
+//2 cells
+//1x2 front cells
+for i=1:n
+ for j=1:n
+ if(j==4)
+ u=1;
+ else
+ u=j+1;
+ end
+ z=[k(i,j,1) k(i,u,1)];
+ z1=[k(i,j,3) k(i,u,3)];
+ if(number_of(z,0)==0 & number_of(z1,1)<cmn2)
+ printf(p1(1,i));
+ a=strsplit(temp2(1,j));
+ b=strsplit(temp2(1,u));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf('%s''',var(2+in));
+ else
+ if(c(in)==0 & a(in)=='1')
+ printf(var(2+in));
+ end
+ end
+ end
+ printf('+');
+ k(i,j,3)=1; k(i,u,3)=1;
+ end
+ end
+end
+//1x2 rear cells
+for i=1:n
+ for j=1:n
+ if(j==4)
+ u=1;
+ else
+ u=j+1;
+ end
+ z=[k(i,j,2) k(i,u,2)];
+ z1=[k(i,j,4) k(i,u,4)];
+ if(number_of(z,0)==0 & number_of(z1,1)<cmn2)
+ printf(p1(1,i));
+ a=strsplit(temp2(1,4+j));
+ b=strsplit(temp2(1,4+u));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf('%s''',var(2+in));
+ else
+ if(c(in)==0 & a(in)=='1')
+ printf(var(2+in));
+ end
+ end
+ end
+ printf('+');
+ k(i,j,4)=1; k(i,u,4)=1;
+ end
+ end
+end
+//2x1 front cells
+for i=1:n
+ for j=1:n
+ if(i==4)
+ t=1;
+ else
+ t=i+1;
+ end
+ z=[k(i,j,1);k(t,j,1)];
+ z1=[k(i,j,3) k(t,j,3)];
+ if(number_of(z,0)==0 & number_of(z1,1)<cmn2)
+ a=strsplit(temp1(1,i));
+ b=strsplit(temp1(1,t));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf('%s''',var(in));
+ else
+ if(c(in)==0 & a(in)=='1')
+ printf(var(in));
+ end
+ end
+ end
+ printf(p2(j,1))
+ printf('+');
+ k(i,j,3)=1; k(i,u,3)=1;
+ end
+ end
+end
+//2x1 rear cells
+for i=1:n
+ for j=1:n
+ if(i==4)
+ t=1;
+ else
+ t=i+1;
+ end
+ z=[k(i,j,2);k(t,j,2)];
+ z1=[k(i,j,4) k(t,j,4)];
+ if(number_of(z,0)==0 & number_of(z1,1)<cmn2)
+ a=strsplit(temp1(1,i));
+ b=strsplit(temp1(1,t));
+ c=strcmp(a,b);
+ for in=1:max(size(c))
+ if(c(in)==0 & a(in)=='0')
+ printf('%s''',var(in));
+ else
+ if(c(in)==0 & a(in)=='1')
+ printf(var(in));
+ end
+ end
+ end
+ printf(p2(4+j,1))
+ printf('+');
+ k(i,j,4)=1; k(i,u,4)=1;
+ end
+ end
+end
+//1 cell front and rear matrix
+for i=1:n
+ for j=1:n
+ z=k(i,j,1:2);
+ z1=k(i,j,3:4);
+ if(noof3(z,0)==0 & noof3(z1,1)<cmn2)
+ printf(p1(1,i));
+ a=strsplit(temp2(1,j));
+ b=strsplit(temp2(1,4+j));
+ c=strcmp(a,b);
+ for in=2:max(size(c))
+ if(a(in)=='0' & c(in)==0)
+ printf('%s''',var(2+in));
+ else
+ if(a(in)=='1' & c(in)==0)
+ printf(var(2+in));
+ end
+ end
+ end
+ printf('+');
+ k(i,j,3:4)=ones(1,1,2);
+ end
+ end
+end
+//single cell
+for i=1:n
+ for j=1:n
+ for z=1:2
+ if(k(i,j,z)==1 & k(i,j,z+2)==0)
+ printf(p2(j,1));
+ printf(p1(1,i));
+ printf('+');
+ end
+ end
+ end
+end
+printf('0');
\ No newline at end of file diff --git a/48/CH4/EX4.6/eg_4_6.sce b/48/CH4/EX4.6/eg_4_6.sce new file mode 100755 index 000000000..bc7dbd007 --- /dev/null +++ b/48/CH4/EX4.6/eg_4_6.sce @@ -0,0 +1,38 @@ +clc;
+clear;
+z=1;
+//evaluating first expression
+for i=0:1
+ for j=0:1
+ for k=0:1
+ for l=0:1
+ f1(z,1)=bitor(bitand(i,j),bitand(k,l));
+ z=z+1;
+ end
+ end
+ end
+end
+z=1;
+//evaluating 2nd expression
+for i=0:1
+ for j=0:1
+ for k=0:1
+ for l=0:1
+ f2(z,1)=bitand(bitand(i,j),bitcmp(k,1));
+ z=z+1;
+ end
+ end
+ end
+end
+//determining whether f covers h or not.
+for i=1:16
+ if(f2(i,1)==1)
+ if(f2(i,1)==f1(i,1))
+ ;
+ else
+ disp("f doesnt cover h");
+ abort;
+ end
+ end
+end
+disp("f covers h and h implies f");
\ No newline at end of file diff --git a/48/CH4/EX4.7/eg_4_7.sce b/48/CH4/EX4.7/eg_4_7.sce new file mode 100755 index 000000000..c650c5577 --- /dev/null +++ b/48/CH4/EX4.7/eg_4_7.sce @@ -0,0 +1,5 @@ +clc;
+clear;
+disp("f=x^y+xz+y^z^");
+disp("since x^y is a prime implicant neither x^ nor y alone implies f");
+disp("only x^y are covered by f");
\ No newline at end of file diff --git a/48/CH4/EX4.8/eg_4_8.sce b/48/CH4/EX4.8/eg_4_8.sce new file mode 100755 index 000000000..58ba03cff --- /dev/null +++ b/48/CH4/EX4.8/eg_4_8.sce @@ -0,0 +1,8 @@ +clc;
+k=[1 1 0 1;
+ 0 1 1 1;
+ 0 1 1 0;
+ 0 0 0 0];
+disp("The prime implicants of function f");
+karmap(k);
+karmap1(k);
\ No newline at end of file diff --git a/48/CH4/EX4.9/eg_4_9.sce b/48/CH4/EX4.9/eg_4_9.sce new file mode 100755 index 000000000..e0b020658 --- /dev/null +++ b/48/CH4/EX4.9/eg_4_9.sce @@ -0,0 +1,7 @@ +clc;
+k=[0 1 1 1;
+ 0 1 1 0;
+ 0 0 1 0;
+ 0 0 1 0];
+disp("The prime implicants of the function f");
+karmap(k);
\ No newline at end of file |