summaryrefslogtreecommitdiff
path: root/462/CH2/EX2.11.b
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /462/CH2/EX2.11.b
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 '462/CH2/EX2.11.b')
-rwxr-xr-x462/CH2/EX2.11.b/ex_2_11_b.pdfbin0 -> 34833 bytes
-rwxr-xr-x462/CH2/EX2.11.b/ex_2_11_b.sce18
2 files changed, 18 insertions, 0 deletions
diff --git a/462/CH2/EX2.11.b/ex_2_11_b.pdf b/462/CH2/EX2.11.b/ex_2_11_b.pdf
new file mode 100755
index 000000000..74345dfb8
--- /dev/null
+++ b/462/CH2/EX2.11.b/ex_2_11_b.pdf
Binary files differ
diff --git a/462/CH2/EX2.11.b/ex_2_11_b.sce b/462/CH2/EX2.11.b/ex_2_11_b.sce
new file mode 100755
index 000000000..6f126683d
--- /dev/null
+++ b/462/CH2/EX2.11.b/ex_2_11_b.sce
@@ -0,0 +1,18 @@
+//example 2.11(b)//
+//find 2's complement of binary number//
+clc
+//clears the window//
+clear
+//clears all the existing variables//
+x=10010010
+//the number//
+xd=bin2dec('10010010')
+//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 10010010 is : ')
+disp(xc1)
+//answer in 2's complement form// \ No newline at end of file