summaryrefslogtreecommitdiff
path: root/1241/CH2/EX2.24/exa2_24.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1241/CH2/EX2.24/exa2_24.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 '1241/CH2/EX2.24/exa2_24.sce')
-rwxr-xr-x1241/CH2/EX2.24/exa2_24.sce16
1 files changed, 16 insertions, 0 deletions
diff --git a/1241/CH2/EX2.24/exa2_24.sce b/1241/CH2/EX2.24/exa2_24.sce
new file mode 100755
index 000000000..123130a73
--- /dev/null
+++ b/1241/CH2/EX2.24/exa2_24.sce
@@ -0,0 +1,16 @@
+//Example 2-24//
+//Hexadecimal Subtraction//
+clc
+//clears the console//
+clear
+//clears all existing variables//
+x=hex2dec('1273')
+y=hex2dec('3A8')
+//Decimal conversion of the hexadecimal numbers//
+z=x-y
+//addition//
+a=dec2hex(z)
+//decimal to hexadecimal conversion//
+disp(' addition of the 2 hexadecimal numbers is ')
+disp(a)
+//answer in hexadecimal form//