summaryrefslogtreecommitdiff
path: root/1733/CH9/EX9.11/9_11.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1733/CH9/EX9.11/9_11.sce
downloadScilab-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-x1733/CH9/EX9.11/9_11.sce16
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