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