Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: data convertion
Replies: 24   Last Post: Apr 8, 2011 12:23 PM

 Messages: [ Previous | Next ]
 anil.m.007@gmail.com Posts: 22 Registered: 2/16/11
Re: data convertion
Posted: Apr 7, 2011 5:31 PM

hi sir,

for calculating the exponent i have a formula like this
here x= 3.3 %user can enter the value like this
ymax = 1023
N =int(log2(x/ymax)) = -8
there is a another way to get the N value also
like this Ymax/X = 1023/3.3 =310
max(2^-N) <310 ==> 256 % 2^-N value is always less then the result
so N=-8 = 11000

and finding the 11-bit mantissa
i am calculating like this
==> X*2^-N = 3.3*256 =844.8 =845 == 01101001101 =Y

finally i am adding this two binary like ==> 11000 01101001101
if i convert this binary value into hex it will give like 'C34D'

i tried with formula to finding the N value its giving the error like
??? Undefined function or method 'int' for input arguments of type 'double'.

how can i solve this problem..

thank you,

Date Subject Author
4/2/11 anil.m.007@gmail.com
4/2/11 dpb
4/2/11 dpb
4/4/11 anil.m.007@gmail.com
4/4/11 dpb
4/4/11 dpb
4/4/11 dpb
4/5/11 anil.m.007@gmail.com
4/5/11 dpb
4/5/11 dpb
4/5/11 dpb
4/5/11 anil.m.007@gmail.com
4/5/11 dpb
4/5/11 anil.m.007@gmail.com
4/5/11 dpb
4/7/11 anil.m.007@gmail.com
4/7/11 dpb
4/7/11 anil.m.007@gmail.com
4/7/11 dpb
4/7/11 anil.m.007@gmail.com
4/7/11 dpb
4/8/11 anil.m.007@gmail.com
4/8/11 dpb
4/8/11 anil.m.007@gmail.com
4/5/11 dpb