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.36.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.36.a')
-rwxr-xr-x | 462/CH2/EX2.36.a/ex_2_36_a.pdf | bin | 0 -> 117014 bytes | |||
-rwxr-xr-x | 462/CH2/EX2.36.a/ex_2_36_a.sce | 22 |
2 files changed, 22 insertions, 0 deletions
diff --git a/462/CH2/EX2.36.a/ex_2_36_a.pdf b/462/CH2/EX2.36.a/ex_2_36_a.pdf Binary files differnew file mode 100755 index 000000000..23e6f2d4e --- /dev/null +++ b/462/CH2/EX2.36.a/ex_2_36_a.pdf diff --git a/462/CH2/EX2.36.a/ex_2_36_a.sce b/462/CH2/EX2.36.a/ex_2_36_a.sce new file mode 100755 index 000000000..6a6bb7cfc --- /dev/null +++ b/462/CH2/EX2.36.a/ex_2_36_a.sce @@ -0,0 +1,22 @@ +//example 2.36(a)//
+//subtraction of hexadecimal number//
+clc
+//clears the screen//
+clear
+//clears already existing variables//
+x=hex2dec('3F')
+//hexadecimal to deciimal conversion//
+y=hex2dec('5C')
+z=x-y
+//subtraction//
+t=z*-1
+t1=dec2hex(t)
+//answer in hexadecimal form(modulus)//
+t2=bitcmp(t,8)
+//complement//
+t3=t2+1
+//2's complement//
+a=dec2bin(t3)
+//answer in 2's complement form
+disp('result of subtraction in 2''s compliment form is:')
+disp(a)
\ No newline at end of file |