diff options
Diffstat (limited to '911/CH2/EX2.4/ex_2_4.sce')
-rw-r--r-- | 911/CH2/EX2.4/ex_2_4.sce | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/911/CH2/EX2.4/ex_2_4.sce b/911/CH2/EX2.4/ex_2_4.sce new file mode 100644 index 000000000..f43f3eef7 --- /dev/null +++ b/911/CH2/EX2.4/ex_2_4.sce @@ -0,0 +1,12 @@ +// example 2.4//
+clc
+//clears the screen//
+clear
+//clears all existing variables//
+a=bin2dec('1110');
+//given numbers//
+b=bin2dec('11011');
+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 |