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 /55/CH15 | |
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 '55/CH15')
-rwxr-xr-x | 55/CH15/EX15.1/15ex1.sci | 27 | ||||
-rwxr-xr-x | 55/CH15/EX15.2/15ex2.sci | 15 |
2 files changed, 42 insertions, 0 deletions
diff --git a/55/CH15/EX15.1/15ex1.sci b/55/CH15/EX15.1/15ex1.sci new file mode 100755 index 000000000..1f413dba1 --- /dev/null +++ b/55/CH15/EX15.1/15ex1.sci @@ -0,0 +1,27 @@ +//0 denotes False and 1 denotes true
+b=[0,1];
+//binary operation + on the set of bits
+for i=1:2
+for j=1:2
+k = b(i)& b(j);
+disp(k)
+end
+end
+//binary operation * on the set of bits
+for i=1:2
+for j=1:2
+k = b(i)| b(j);
+disp(k)
+end
+end
+//unary operation ' on the set of bits
+k=~b
+clear;
+D=[1,2,5,7,10,14,35,70];
+a=35;
+b=70;
+V=int32([a,b]);
+thelcm=lcm(V) //a+b=lcm(a,b)
+V=int32([a,b])
+thegcd=gcd(V) //a*b=gcd(a,b)
+abar=70/a //a'=70/a
\ No newline at end of file diff --git a/55/CH15/EX15.2/15ex2.sci b/55/CH15/EX15.2/15ex2.sci new file mode 100755 index 000000000..d2fc690ff --- /dev/null +++ b/55/CH15/EX15.2/15ex2.sci @@ -0,0 +1,15 @@ +D=[1,2,5,7,10,14,35,70];
+a = 2; //a and b belong to D
+b = 14;
+V=int32([a,b]);
+thelcm=lcm(V)
+V=int32([a,b]);
+thegcd=gcd(V)
+abar=70/a
+bbar=70/b
+j=[abar,b];
+h=[a,bbar];
+V=int32([j])
+lcm1=lcm(V)
+K=int32([h])
+lcm2=lcm(K)
\ No newline at end of file |