blob: b369967b165b71203d9df824cc8fab35ec070319 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
clc;clear;
//Example 25.9
//calculation of quotient of two binary numbers
//given values
X='1101001';//divident
Y='101';//divisor
//calculation
x=bin2dec(X);//decimal equivalent
y=bin2dec(Y);//decimal equivalent
z=x/y;
Z=dec2bin(z);
disp(Z,'quotient of the given binary numbers with last two digits in fractional part is ')
|