diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /911/CH1 | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '911/CH1')
46 files changed, 311 insertions, 0 deletions
diff --git a/911/CH1/EX1.1.a/ex_1_1_a.pdf b/911/CH1/EX1.1.a/ex_1_1_a.pdf Binary files differnew file mode 100644 index 000000000..f68317b02 --- /dev/null +++ b/911/CH1/EX1.1.a/ex_1_1_a.pdf diff --git a/911/CH1/EX1.1.a/ex_1_1_a.sce b/911/CH1/EX1.1.a/ex_1_1_a.sce new file mode 100644 index 000000000..cb6b1c771 --- /dev/null +++ b/911/CH1/EX1.1.a/ex_1_1_a.sce @@ -0,0 +1,6 @@ +//example 1.1//
+//radix of a proposed no//
+clc
+clear
+disp('the radix of the proposed number system is 3')
+//result//
\ No newline at end of file diff --git a/911/CH1/EX1.1.b/ex_1_1_b.pdf b/911/CH1/EX1.1.b/ex_1_1_b.pdf Binary files differnew file mode 100644 index 000000000..f9fcd6aff --- /dev/null +++ b/911/CH1/EX1.1.b/ex_1_1_b.pdf diff --git a/911/CH1/EX1.1.b/ex_1_1_b.sce b/911/CH1/EX1.1.b/ex_1_1_b.sce new file mode 100644 index 000000000..f444623b5 --- /dev/null +++ b/911/CH1/EX1.1.b/ex_1_1_b.sce @@ -0,0 +1,6 @@ +//example 1.1(b)//
+//first 10 numbers in this number system//
+clc
+clear
+disp('the first 10 numbers in this number system would be 0,1,X,10,11,1X,X0,X1,XX and 100')
+//result//
\ No newline at end of file diff --git a/911/CH1/EX1.10.a/ex_1_10_a.pdf b/911/CH1/EX1.10.a/ex_1_10_a.pdf Binary files differnew file mode 100644 index 000000000..78ea17032 --- /dev/null +++ b/911/CH1/EX1.10.a/ex_1_10_a.pdf diff --git a/911/CH1/EX1.10.a/ex_1_10_a.sce b/911/CH1/EX1.10.a/ex_1_10_a.sce new file mode 100644 index 000000000..c0071f7f3 --- /dev/null +++ b/911/CH1/EX1.10.a/ex_1_10_a.sce @@ -0,0 +1,14 @@ +//example 1.10(a)//
+clc
+//clears the screen//
+clear
+//clears already existing variables//
+a=5264;
+//given 7's compliment//
+b=7777-5264;
+//no in octal form//
+d=oct2dec('2513');
+//decimal conversion//
+disp('binary conversion of given 7''s compliment is :')
+e=dec2bin(d)
+disp(e)
\ No newline at end of file diff --git a/911/CH1/EX1.10.b/ex_1_10_b.pdf b/911/CH1/EX1.10.b/ex_1_10_b.pdf Binary files differnew file mode 100644 index 000000000..558e03e96 --- /dev/null +++ b/911/CH1/EX1.10.b/ex_1_10_b.pdf diff --git a/911/CH1/EX1.10.b/ex_1_10_b.sce b/911/CH1/EX1.10.b/ex_1_10_b.sce new file mode 100644 index 000000000..f60b44e75 --- /dev/null +++ b/911/CH1/EX1.10.b/ex_1_10_b.sce @@ -0,0 +1,14 @@ +//example 1.10(b)//
+clc
+//clears the screen//
+clear
+//clears already existing variables//
+a=5264;
+//given 7's compliment//
+b=7777-5264;
+//no in octal form//
+d=oct2dec('2513');
+//decimal conversion//
+disp('hexadecimal conversion of given 7''s compliment is:')
+e=dec2hex(d);
+disp(e);
\ No newline at end of file diff --git a/911/CH1/EX1.11/ex_1_11.pdf b/911/CH1/EX1.11/ex_1_11.pdf Binary files differnew file mode 100644 index 000000000..929df0aa3 --- /dev/null +++ b/911/CH1/EX1.11/ex_1_11.pdf diff --git a/911/CH1/EX1.11/ex_1_11.sce b/911/CH1/EX1.11/ex_1_11.sce new file mode 100644 index 000000000..ba7a5a7a1 --- /dev/null +++ b/911/CH1/EX1.11/ex_1_11.sce @@ -0,0 +1,27 @@ +//example 1.11//
+clc
+//clears the screen//
+clear
+//clears all existing variables//
+a=-142;
+//given number//
+b=a*-1;
+c=dec2bin(b);
+//converting it to binary number//
+c1=10001110;
+d=c1/(10000000);
+m=(d-1)*(10^23);
+//mantissa//
+e=dec2bin(7,8)
+//exponent//
+f=bin2dec('01111111')
+g=7+f;
+be=dec2bin(g)
+//biased exponent//
+be2=10000110
+be1=be2*(10^23);
+s=1*(10^31);
+n=s+be1+m;
+//result//
+disp('Thus -142 = ')
+disp(n);
\ No newline at end of file diff --git a/911/CH1/EX1.13.a/ex_1_13_a.pdf b/911/CH1/EX1.13.a/ex_1_13_a.pdf Binary files differnew file mode 100644 index 000000000..19a72e1b0 --- /dev/null +++ b/911/CH1/EX1.13.a/ex_1_13_a.pdf diff --git a/911/CH1/EX1.13.a/ex_1_13_a.sce b/911/CH1/EX1.13.a/ex_1_13_a.sce new file mode 100644 index 000000000..14241fe34 --- /dev/null +++ b/911/CH1/EX1.13.a/ex_1_13_a.sce @@ -0,0 +1,12 @@ +//example 1.13.a//
+clc
+//clears the screen//
+clear
+//clears all existing variables//
+t=9999+1;
+//total numbers//
+x=log2(t);
+//taking out power//
+y=round(x)+1;
+//no of bits required for straight binary encoding//
+disp(y,'no of bits required for straight binary encoding = ')
\ No newline at end of file diff --git a/911/CH1/EX1.13.b/ex_1_13_b.pdf b/911/CH1/EX1.13.b/ex_1_13_b.pdf Binary files differnew file mode 100644 index 000000000..c944d28f6 --- /dev/null +++ b/911/CH1/EX1.13.b/ex_1_13_b.pdf diff --git a/911/CH1/EX1.13.b/ex_1_13_b.sce b/911/CH1/EX1.13.b/ex_1_13_b.sce new file mode 100644 index 000000000..dae548319 --- /dev/null +++ b/911/CH1/EX1.13.b/ex_1_13_b.sce @@ -0,0 +1,12 @@ +//example 1.13.b//
+clc
+//clears the screen//
+clear
+//clears all existing variables//
+t=9999+1;
+//total numbers//
+x=log2(t);
+//taking out power//
+y=round(x)+3;
+//no of bits required for BCD encoding//
+disp(y,'no of bits required for BCD encoding = ')
\ No newline at end of file diff --git a/911/CH1/EX1.13.c/ex_1_13_c.pdf b/911/CH1/EX1.13.c/ex_1_13_c.pdf Binary files differnew file mode 100644 index 000000000..ecd1237c8 --- /dev/null +++ b/911/CH1/EX1.13.c/ex_1_13_c.pdf diff --git a/911/CH1/EX1.13.c/ex_1_13_c.sce b/911/CH1/EX1.13.c/ex_1_13_c.sce new file mode 100644 index 000000000..f11f53436 --- /dev/null +++ b/911/CH1/EX1.13.c/ex_1_13_c.sce @@ -0,0 +1,9 @@ +//example 1.13.c//
+clc
+//clears the screen//
+clear
+//clears all existing variables//
+a=dec2bin(2,12)
+b=dec2bin(7,4)
+d=100000+0111
+disp(d,'BCD equivalent of 27 =')
\ No newline at end of file diff --git a/911/CH1/EX1.14.a/ex_1_14_a.pdf b/911/CH1/EX1.14.a/ex_1_14_a.pdf Binary files differnew file mode 100644 index 000000000..ec726bd13 --- /dev/null +++ b/911/CH1/EX1.14.a/ex_1_14_a.pdf diff --git a/911/CH1/EX1.14.a/ex_1_14_a.sce b/911/CH1/EX1.14.a/ex_1_14_a.sce new file mode 100644 index 000000000..3ce00abcd --- /dev/null +++ b/911/CH1/EX1.14.a/ex_1_14_a.sce @@ -0,0 +1,13 @@ +//example 1.14.a//
+clc
+//clears the screen//
+clear
+//clears all existing variables//
+a=237.75
+//for integral part//
+//put binary equivalents of 5(2+3), 6(3+3) and 10(7+3)//
+i=010101101010
+//for fractional part//
+//put binary equivalents of 10(7+3) and 8(5+3)//
+f=10101000
+disp('010101101010.10101000','excess 3 equivalent of 237 =')
\ No newline at end of file diff --git a/911/CH1/EX1.14.b/ex_1_14_b.pdf b/911/CH1/EX1.14.b/ex_1_14_b.pdf Binary files differnew file mode 100644 index 000000000..5742c8fcc --- /dev/null +++ b/911/CH1/EX1.14.b/ex_1_14_b.pdf diff --git a/911/CH1/EX1.14.b/ex_1_14_b.sce b/911/CH1/EX1.14.b/ex_1_14_b.sce new file mode 100644 index 000000000..b2b472b47 --- /dev/null +++ b/911/CH1/EX1.14.b/ex_1_14_b.sce @@ -0,0 +1,15 @@ +//example 1.14.b//
+clc
+//clears the screen//
+clear
+//clears all existing variables//
+a=110010100011.01110101
+//for integral part//
+//put decimal equivalents of 1100(12), 1010(10) and 0011(3)//
+//subtract 3 for excess 3 so, 9(12-3), 7(10-3) and 0(3-3)//
+i=970
+//for fractional part//
+//put decimal equivalents of 0111(7) and 0101(5)//
+//subtract 3 for excess 3 so, 4(7-3), 2(5-3)//
+f=42
+disp('970.42','decimal equivalent of excess 3 number 110010100011.01110101 =')
\ No newline at end of file diff --git a/911/CH1/EX1.15.a/ex_1_15.sce b/911/CH1/EX1.15.a/ex_1_15.sce new file mode 100644 index 000000000..ecdc90383 --- /dev/null +++ b/911/CH1/EX1.15.a/ex_1_15.sce @@ -0,0 +1,9 @@ +//example 1.15.a//
+//decimal to gray numbers//
+clc
+//clears the screen//
+clear
+//clears all existing variables//
+a=dec2bin(13)
+//for binary to gray, first no (MSB) remains the same, second number is addition of first and second of binary ignoring the carry and so on.//
+disp('gray equivalent of decimal no 13 =1011')
\ No newline at end of file diff --git a/911/CH1/EX1.15.a/ex_1_15_a.pdf b/911/CH1/EX1.15.a/ex_1_15_a.pdf Binary files differnew file mode 100644 index 000000000..adc4541fb --- /dev/null +++ b/911/CH1/EX1.15.a/ex_1_15_a.pdf diff --git a/911/CH1/EX1.15.b/ex_1_15_b.pdf b/911/CH1/EX1.15.b/ex_1_15_b.pdf Binary files differnew file mode 100644 index 000000000..f57a33fa2 --- /dev/null +++ b/911/CH1/EX1.15.b/ex_1_15_b.pdf diff --git a/911/CH1/EX1.15.b/ex_1_15_b.sce b/911/CH1/EX1.15.b/ex_1_15_b.sce new file mode 100644 index 000000000..4f44db8df --- /dev/null +++ b/911/CH1/EX1.15.b/ex_1_15_b.sce @@ -0,0 +1,9 @@ +//example 1.15.b//
+//sequence of gray numbers//
+clc
+//clears the screen//
+clear
+//clears all existing variables//
+a=1111;
+//for gray to binary, first no (MSB) remains the same, second number is addition of first and second of binary ignoring the carry and so on.//
+disp('gray to binary of 1111 =1011')
\ No newline at end of file diff --git a/911/CH1/EX1.16/ex_1_16.pdf b/911/CH1/EX1.16/ex_1_16.pdf Binary files differnew file mode 100644 index 000000000..9b884ff74 --- /dev/null +++ b/911/CH1/EX1.16/ex_1_16.pdf diff --git a/911/CH1/EX1.16/ex_1_16.sce b/911/CH1/EX1.16/ex_1_16.sce new file mode 100644 index 000000000..9a8d556ef --- /dev/null +++ b/911/CH1/EX1.16/ex_1_16.sce @@ -0,0 +1,9 @@ +//example 1.16//
+//sequence of gray numbers//
+clc
+//clears the screen//
+clear
+//clears all existing variables//
+f=0101;
+disp(f,'The first no of the gray sequence is ')
+disp('Numbers following it are 0100, 1100 and 1101.')
\ No newline at end of file diff --git a/911/CH1/EX1.2/ex_1_2.pdf b/911/CH1/EX1.2/ex_1_2.pdf Binary files differnew file mode 100644 index 000000000..1c162bdda --- /dev/null +++ b/911/CH1/EX1.2/ex_1_2.pdf diff --git a/911/CH1/EX1.2/ex_1_2.sce b/911/CH1/EX1.2/ex_1_2.sce new file mode 100644 index 000000000..4fd4408e2 --- /dev/null +++ b/911/CH1/EX1.2/ex_1_2.sce @@ -0,0 +1,9 @@ +//example 1.2 //
+// decimal to binary conversion //
+clc
+clear
+disp('decimal equivalent of 00001110 is')
+ans = bin2dec ('00001110')
+// decimal equivalent of binary number //
+disp (ans)
+// answer in decimal form//
\ No newline at end of file diff --git a/911/CH1/EX1.3/ex_1_3.pdf b/911/CH1/EX1.3/ex_1_3.pdf Binary files differnew file mode 100644 index 000000000..eb41a497a --- /dev/null +++ b/911/CH1/EX1.3/ex_1_3.pdf diff --git a/911/CH1/EX1.3/ex_1_3.sce b/911/CH1/EX1.3/ex_1_3.sce new file mode 100644 index 000000000..7915f24b6 --- /dev/null +++ b/911/CH1/EX1.3/ex_1_3.sce @@ -0,0 +1,36 @@ +// example 1.3//
+clc
+//clears the command window//
+clear
+//clears all the variables//
+q =0;
+b =0;
+s =0;
+// a=input (Enter the decimal no to be converted to its binary equivalent :) ;
+//accepting the decimal input from user//
+a =13.375;
+d =modulo (a ,1) ;
+//separating the decimal part and the integer part//
+a = floor(a);
+//removing the decimal part //
+while (a>0)
+//taking integer part into a matrix and convert to equivalent binary//
+x=modulo (a ,2) ;
+b=b +(10^q)*x ;
+a = a/2;
+a = floor(a) ;
+q = q+1;
+end
+for i =1:10
+// For values after decimal point converting to binary //
+d = d *2;
+q = floor ( d ) ;
+s = s + q /(10^ i ) ;
+if d >=1 then
+d =d -1;
+end
+end
+k=b+s;
+disp('The binary equivalent of the give decimal number is');
+disp (k);
+//displaying the final result//
\ No newline at end of file diff --git a/911/CH1/EX1.4/ex_1_4.pdf b/911/CH1/EX1.4/ex_1_4.pdf Binary files differnew file mode 100644 index 000000000..98d94c4ad --- /dev/null +++ b/911/CH1/EX1.4/ex_1_4.pdf diff --git a/911/CH1/EX1.4/ex_1_4.sce b/911/CH1/EX1.4/ex_1_4.sce new file mode 100644 index 000000000..8bcec0e92 --- /dev/null +++ b/911/CH1/EX1.4/ex_1_4.sce @@ -0,0 +1,15 @@ +//Example 1.4//
+//decimal to octal//
+clc
+//clears the command window//
+clear
+// clears the variables//
+q =0;
+b =0;
+a= 73.75
+// Enter the decimal number//
+format ( 'v' ,18)
+//increasing the precision to 18
+a= floor (a);
+h= dec2oct (a);
+printf ("The hexadecimal equivalent is = %s" ,h)
\ No newline at end of file diff --git a/911/CH1/EX1.5/ex_1_5.pdf b/911/CH1/EX1.5/ex_1_5.pdf Binary files differnew file mode 100644 index 000000000..e5290b2a0 --- /dev/null +++ b/911/CH1/EX1.5/ex_1_5.pdf diff --git a/911/CH1/EX1.5/ex_1_5.sce b/911/CH1/EX1.5/ex_1_5.sce new file mode 100644 index 000000000..c86b4a42f --- /dev/null +++ b/911/CH1/EX1.5/ex_1_5.sce @@ -0,0 +1,17 @@ +// example 1.5/ /
+// decimal to hexadecimal conversion//
+clc
+// clears the screen //
+clear
+//clears already existing variables //
+q =0;
+b =0;
+a= 82.25
+// Enter the decimal number//
+format ( 'v' ,18)
+//increasing the precision to 18
+a= floor (a);
+h= dec2hex (a);
+// decimal to hexadecimal conversion //
+disp ('conversion of decimal given no to its hexadecimal form is :' )
+disp (h)
\ No newline at end of file diff --git a/911/CH1/EX1.6.a/ex_1_6_a.pdf b/911/CH1/EX1.6.a/ex_1_6_a.pdf Binary files differnew file mode 100644 index 000000000..c5ab7a7b1 --- /dev/null +++ b/911/CH1/EX1.6.a/ex_1_6_a.pdf diff --git a/911/CH1/EX1.6.a/ex_1_6_a.sce b/911/CH1/EX1.6.a/ex_1_6_a.sce new file mode 100644 index 000000000..8bf0d8234 --- /dev/null +++ b/911/CH1/EX1.6.a/ex_1_6_a.sce @@ -0,0 +1,14 @@ +// example 1.6 (a) / /
+//conversion of octal to binary//
+clc
+//clears the screen//
+clear
+//clears all existing variables//
+a=374.26;
+b=floor(a);
+t=oct2dec('374');
+z = dec2bin (t);
+disp ('binary conversion of given no is : ' )
+// conversion of octal number to binary //
+disp (z)
+// answer in binary form//
\ No newline at end of file diff --git a/911/CH1/EX1.6.b/ex_1_6_b.pdf b/911/CH1/EX1.6.b/ex_1_6_b.pdf Binary files differnew file mode 100644 index 000000000..55d8c47f0 --- /dev/null +++ b/911/CH1/EX1.6.b/ex_1_6_b.pdf diff --git a/911/CH1/EX1.6.b/ex_1_6_b.sce b/911/CH1/EX1.6.b/ex_1_6_b.sce new file mode 100644 index 000000000..d8ad68285 --- /dev/null +++ b/911/CH1/EX1.6.b/ex_1_6_b.sce @@ -0,0 +1,13 @@ +// example 1.6(b) / /
+clc
+//clears the screen //
+clear
+//clears already existing variables //
+// binary to octal conversion //
+y= bin2dec ('1110100')
+//binary to decimal conversion//
+a= dec2oct (y)
+//decimal to octal conversion //
+disp ('octal representation of given no is : ' )
+disp (a)
+// answer in octal form//
\ No newline at end of file diff --git a/911/CH1/EX1.7.a/ex_1_7_a.pdf b/911/CH1/EX1.7.a/ex_1_7_a.pdf Binary files differnew file mode 100644 index 000000000..124d4c71e --- /dev/null +++ b/911/CH1/EX1.7.a/ex_1_7_a.pdf diff --git a/911/CH1/EX1.7.a/ex_1_7_a.sce b/911/CH1/EX1.7.a/ex_1_7_a.sce new file mode 100644 index 000000000..2c105ea4f --- /dev/null +++ b/911/CH1/EX1.7.a/ex_1_7_a.sce @@ -0,0 +1,13 @@ +// example 1.7(a) / /
+// hexadecimal to binary conversion //
+clc
+// clears the screen //
+clear
+// clears already existing variables //
+x= hex2dec ('17E')
+//hexadecimal to decimal conversion //
+a= dec2bin (x)
+//decimal to binary conversion //
+disp ('conversion of hexadecimal given no to its binary form is : ')
+disp (a)
+// answer in binary form//
\ No newline at end of file diff --git a/911/CH1/EX1.7.b/ex_1_7_b.pdf b/911/CH1/EX1.7.b/ex_1_7_b.pdf Binary files differnew file mode 100644 index 000000000..b566f569f --- /dev/null +++ b/911/CH1/EX1.7.b/ex_1_7_b.pdf diff --git a/911/CH1/EX1.7.b/ex_1_7_b.sce b/911/CH1/EX1.7.b/ex_1_7_b.sce new file mode 100644 index 000000000..30eaf0661 --- /dev/null +++ b/911/CH1/EX1.7.b/ex_1_7_b.sce @@ -0,0 +1,13 @@ +// example 1.7(b) //
+//conversion of binary to hexadecimal //
+clc
+//clears the screen //
+clear
+//clears already existing variables //
+x= bin2dec ('1011001110' )
+// binary to decimal conversion //
+a= dec2hex (x)
+//decimal to hexadecimal conversion //
+disp ('conversion of given binary number to its hexadecimal form is : ')
+disp (a)
+// answer in hexadecimal form//
\ No newline at end of file diff --git a/911/CH1/EX1.8.a/ex_1_8_a.pdf b/911/CH1/EX1.8.a/ex_1_8_a.pdf Binary files differnew file mode 100644 index 000000000..42926b243 --- /dev/null +++ b/911/CH1/EX1.8.a/ex_1_8_a.pdf diff --git a/911/CH1/EX1.8.a/ex_1_8_a.sce b/911/CH1/EX1.8.a/ex_1_8_a.sce new file mode 100644 index 000000000..4418bc2b9 --- /dev/null +++ b/911/CH1/EX1.8.a/ex_1_8_a.sce @@ -0,0 +1,13 @@ +// example 1.8(a)//
+//conversion hexadecimal number to octal number //
+clc
+//clears the screen //
+clear
+// clears already existing variables //
+x= hex2dec ('2F')
+//hexadecimal to decimal conversion //
+a= dec2oct (x)
+//decimal to octal conversion //
+disp ('conversion of given hexadecimal no to its octal form results in :' )
+disp (a)
+//answer in octal form//
\ No newline at end of file diff --git a/911/CH1/EX1.8.b/ex_1_8_b.pdf b/911/CH1/EX1.8.b/ex_1_8_b.pdf Binary files differnew file mode 100644 index 000000000..636881008 --- /dev/null +++ b/911/CH1/EX1.8.b/ex_1_8_b.pdf diff --git a/911/CH1/EX1.8.b/ex_1_8_b.sce b/911/CH1/EX1.8.b/ex_1_8_b.sce new file mode 100644 index 000000000..562d090cf --- /dev/null +++ b/911/CH1/EX1.8.b/ex_1_8_b.sce @@ -0,0 +1,13 @@ +// example 1.8(b)//
+//conversion octal number to hexadecimal number //
+clc
+//clears the screen //
+clear
+// clears already existing variables //
+x= oct2dec ('762')
+//octal to decimal conversion //
+a= dec2hex (x)
+//decimal to hexadecimal conversion //
+disp ('conversion of given octal no to its hexadecimal form results in :' )
+disp (a)
+//answer in hexadecimal form//
\ No newline at end of file |