summaryrefslogtreecommitdiff
path: root/911/CH2/EX2.13/ex_2_13.sce
blob: 494084fa59d3ea6cc677b27d04a0b0c66c254387 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// example 2.13//
//octal subtracttion//
clc
//clears the screen//
clear
//clears all existing variables//
a=oct2dec('17');
//given numbers//
b=oct2dec('21');
c=b-a;
d=dec2bin(c,8)
e=dec2oct(c)
disp(c,'subtraction of given numbers in decimal form = ')
disp(d,'subtraction of given numbers in binary form = ')
disp(e,'subtraction of given numbers in octal form = ')