[Tutor] conversion to a fixed_no

james roy james_royus at eudoramail.com
Mon Oct 6 04:27:59 EDT 2003


Hello,

I am new to python and is having some problem while writing some module in python. Actually i am writing a code in which i am needed to convert a no. into a fixed_no where the fixed_no's specification is like this:


fixed_no is a 32-bit representation of a binary fraction. A fixed_no is a signed quantity, with the two's complement of the entire word used to represent negation. Of the 32 bits in a fixed_no, exactily 12 are to the left of the binary point; thus the largest fixed_no value is 2048-2^(-20), and the smallest is -2048.

Can someone suggest me sthing regarding writing a module to convert a no.into a fixed_no according to the way i have written above.

I'll be highly thankful for this.

Thanks a lot.

Regards,

Jimmy roy



Need a new email address that people can remember
Check out the new EudoraMail at
http://www.eudoramail.com



More information about the Tutor mailing list