summaryrefslogtreecommitdiff
path: root/45/CH13/EX13.3/example_13_3.sce
diff options
context:
space:
mode:
Diffstat (limited to '45/CH13/EX13.3/example_13_3.sce')
-rwxr-xr-x45/CH13/EX13.3/example_13_3.sce12
1 files changed, 12 insertions, 0 deletions
diff --git a/45/CH13/EX13.3/example_13_3.sce b/45/CH13/EX13.3/example_13_3.sce
new file mode 100755
index 000000000..2c73709c0
--- /dev/null
+++ b/45/CH13/EX13.3/example_13_3.sce
@@ -0,0 +1,12 @@
+//example 13.3
+clc
+clear
+//bin(1,1) = input('Enter the first half string of binary number :');
+//bin(1,2) = input('Enter the second half string of binary number :');
+bin=['10110' '01101']; // given binry address
+dec=bin2dec(bin); // finding decimal equivlent
+hex=dec2hex(dec); //findin hexdecimal equivalent
+disp('The decimal address is :');
+disp(dec);
+disp('The hexadecimal address is :');
+disp(hex);