summaryrefslogtreecommitdiff
path: root/1964/CH15/EX15.5
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1964/CH15/EX15.5
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 '1964/CH15/EX15.5')
-rwxr-xr-x1964/CH15/EX15.5/ex15_5.sce18
1 files changed, 18 insertions, 0 deletions
diff --git a/1964/CH15/EX15.5/ex15_5.sce b/1964/CH15/EX15.5/ex15_5.sce
new file mode 100755
index 000000000..0d16eaec2
--- /dev/null
+++ b/1964/CH15/EX15.5/ex15_5.sce
@@ -0,0 +1,18 @@
+//Chapter-15, Example 15.5, Page 496
+//=============================================================================
+clc
+clear
+//CALCULATIONS
+x1=base2dec(['1101','1100'],2)//converting binary to decimal
+x2=base2dec(['1000','101'],2)//converting binary to decimal
+x3=base2dec(['1111','1001'],2)//converting binary to decimal
+y1=(x1(1))*(x1(2));//multiplying
+y2=(x2(1))*(x2(2));//multiplying
+y3=(x3(1))*(x3(2));//multiplying
+z1=dec2base(y1,2)//converting decimal to hexadecimal
+z2=dec2base(y2,2)//converting decimal to hexadecimal
+z3=dec2base(y3,2)//converting decimal to hexadecimal
+disp(z1)
+disp(z2)
+disp(z3)
+//=================================END OF PROGRAM=======================================================================================================