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 /462/CH2/EX2.11.a | |
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 '462/CH2/EX2.11.a')
-rwxr-xr-x | 462/CH2/EX2.11.a/ex_2_11_a.pdf | bin | 0 -> 34839 bytes | |||
-rwxr-xr-x | 462/CH2/EX2.11.a/ex_2_11_a.sce | 18 |
2 files changed, 18 insertions, 0 deletions
diff --git a/462/CH2/EX2.11.a/ex_2_11_a.pdf b/462/CH2/EX2.11.a/ex_2_11_a.pdf Binary files differnew file mode 100755 index 000000000..c5655a9a6 --- /dev/null +++ b/462/CH2/EX2.11.a/ex_2_11_a.pdf diff --git a/462/CH2/EX2.11.a/ex_2_11_a.sce b/462/CH2/EX2.11.a/ex_2_11_a.sce new file mode 100755 index 000000000..9fb07532f --- /dev/null +++ b/462/CH2/EX2.11.a/ex_2_11_a.sce @@ -0,0 +1,18 @@ +//example 2.11(a)//
+//find 2's complement of binary number//
+clc
+//clears the window//
+clear
+//clears all the existing variables//
+x=01100100
+//the number//
+xd=bin2dec('01100100')
+//binary to decimal conversion//
+xc=bitcmp(xd,8)
+//one's complement of the number//
+xp=xc+1
+xc1=dec2bin(xp)
+//2's complement of the number//
+disp('2s complement of 01100100 is : ')
+disp(xc1)
+//answer in 2's complement form//
\ No newline at end of file |