summaryrefslogtreecommitdiff
path: root/2492/CH8/EX8.2/ex8_2.sce
diff options
context:
space:
mode:
Diffstat (limited to '2492/CH8/EX8.2/ex8_2.sce')
-rwxr-xr-x2492/CH8/EX8.2/ex8_2.sce11
1 files changed, 11 insertions, 0 deletions
diff --git a/2492/CH8/EX8.2/ex8_2.sce b/2492/CH8/EX8.2/ex8_2.sce
new file mode 100755
index 000000000..8eb87018b
--- /dev/null
+++ b/2492/CH8/EX8.2/ex8_2.sce
@@ -0,0 +1,11 @@
+// Exa 8.2
+format('v',9)
+clc;
+clear;
+close;
+// Given data
+str= '527';// given number in octal to convert into binary
+str_in_dec= oct2dec(str);// decimal equivalent
+str_in_bin= dec2bin(str_in_dec);// binary equivalent
+disp(str_in_bin,"The binary equivalent of 527 is : ")
+