blob: 71daf57ad799e425fc1f1b333d738b4a6c80b503 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
clc;clear;
//Example 25.11
//calculation of sum of two octal numbers
//given values
X='256';//divident
Y='437';//divisor
//calculation
x=oct2dec(X);//decimal equivalent
y=oct2dec(Y);//decimal equivalent
z=x+y;
Z=dec2oct(z);//binary equivalent
disp(Z,'sum of the given octal numbers is')
|