summaryrefslogtreecommitdiff
path: root/911/CH2/EX2.7/ex_2_7.sce
diff options
context:
space:
mode:
Diffstat (limited to '911/CH2/EX2.7/ex_2_7.sce')
-rw-r--r--911/CH2/EX2.7/ex_2_7.sce12
1 files changed, 12 insertions, 0 deletions
diff --git a/911/CH2/EX2.7/ex_2_7.sce b/911/CH2/EX2.7/ex_2_7.sce
new file mode 100644
index 000000000..fbbbbc8f8
--- /dev/null
+++ b/911/CH2/EX2.7/ex_2_7.sce
@@ -0,0 +1,12 @@
+// example 2.7//
+clc
+//clears the screen//
+clear
+//clears all existing variables//
+a=8;
+//given numbers//
+b=185;
+c=b-a;
+d=dec2bin(c,12)
+disp(c,'subtraction of given numbers in decimal form = ')
+disp(d,'subtraction of given numbers in binary form = ') \ No newline at end of file