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 /2522/CH19/EX19.4 | |
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 '2522/CH19/EX19.4')
-rwxr-xr-x | 2522/CH19/EX19.4/exm19_4.sce | 12 | ||||
-rwxr-xr-x | 2522/CH19/EX19.4/exm19_4_output.jpg | bin | 0 -> 13569 bytes |
2 files changed, 12 insertions, 0 deletions
diff --git a/2522/CH19/EX19.4/exm19_4.sce b/2522/CH19/EX19.4/exm19_4.sce new file mode 100755 index 000000000..7091f2cd4 --- /dev/null +++ b/2522/CH19/EX19.4/exm19_4.sce @@ -0,0 +1,12 @@ +// page no 625
+// example no A.4
+// 2's COMPLIMENT OF BINARY NUMBER
+clc;
+printf('Given binary no= 00011100 \n \n');
+str='00011100'
+d=bin2dec(str);
+x=bitcmp(d,8);
+s=x+1;
+y=dec2bin(s);
+printf('2s complement=');
+disp(y);
diff --git a/2522/CH19/EX19.4/exm19_4_output.jpg b/2522/CH19/EX19.4/exm19_4_output.jpg Binary files differnew file mode 100755 index 000000000..60e90f7c5 --- /dev/null +++ b/2522/CH19/EX19.4/exm19_4_output.jpg |