summaryrefslogtreecommitdiff
path: root/462/CH2/EX2.27.a
diff options
context:
space:
mode:
Diffstat (limited to '462/CH2/EX2.27.a')
-rwxr-xr-x462/CH2/EX2.27.a/ex_2_27_a.pdfbin0 -> 119155 bytes
-rwxr-xr-x462/CH2/EX2.27.a/ex_2_27_a.sce21
2 files changed, 21 insertions, 0 deletions
diff --git a/462/CH2/EX2.27.a/ex_2_27_a.pdf b/462/CH2/EX2.27.a/ex_2_27_a.pdf
new file mode 100755
index 000000000..83bc5e348
--- /dev/null
+++ b/462/CH2/EX2.27.a/ex_2_27_a.pdf
Binary files differ
diff --git a/462/CH2/EX2.27.a/ex_2_27_a.sce b/462/CH2/EX2.27.a/ex_2_27_a.sce
new file mode 100755
index 000000000..a4e481608
--- /dev/null
+++ b/462/CH2/EX2.27.a/ex_2_27_a.sce
@@ -0,0 +1,21 @@
+//example 2.27 (a)//
+//subtraction of octal numbers//
+clc
+//clears the screen//
+clear
+//clears already existing variables//
+x=oct2dec('53')
+//octal to decimal conversion//
+y=oct2dec('37')
+z=x-y
+//subtraction//
+a=dec2oct(z)
+//decimal to octal conversion//
+b=dec2bin(z)
+//decimal to binary conversion//
+disp('result of subtraction of given numbers in octal form is:')
+disp(a)
+//answer in octal form//
+disp('result of subtraction of given numbers in binary form is:')
+disp(b)
+//answer in binary form// \ No newline at end of file