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 /1733/CH9/EX9.11/9_11.sce | |
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 '1733/CH9/EX9.11/9_11.sce')
-rwxr-xr-x | 1733/CH9/EX9.11/9_11.sce | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/1733/CH9/EX9.11/9_11.sce b/1733/CH9/EX9.11/9_11.sce new file mode 100755 index 000000000..57ee2fad2 --- /dev/null +++ b/1733/CH9/EX9.11/9_11.sce @@ -0,0 +1,16 @@ +//9.11
+clc;
+c=60;
+xc= bitcmp (c ,8);
+A=xc+1;
+d=28;
+xd= bitcmp (d ,8);
+B=xd+1;
+Ans=B+A;
+a=dec2bin(Ans)
+disp(a)
+disp('Since the MSB is 1 so the number is negative and equal to -88')
+Ans=B-A;
+a=dec2bin(Ans,8)
+disp(a)
+disp('Since the MSB is 0 so the number is positive and equal to +32')
\ No newline at end of file |