itmr
Member level 3
HI ALL
I NEED YOUR ADVICE FOR SOME ALGORITHM ABOUT FLOATING POINT
i received from fpga based uart 7 bytes of ascii codes that represent numbers.
the format is XXX.XXX ,it means 6 byte represent numbers and one represent the point.
that format represent A decimal value.
i need to create the value and make some comparison between 2 follows values.
my idea is to convert each byte to integer ( bY decrease 30 hex),
then convert each integer to real ( i coded some function that do that)
then multiple each real by its coefficient( the first by 100 , the second by 10 and so on...)
then add all the created values.
DO SOMEONE HAVE A BETTER IDEA???
I NEED YOUR ADVICE FOR SOME ALGORITHM ABOUT FLOATING POINT
i received from fpga based uart 7 bytes of ascii codes that represent numbers.
the format is XXX.XXX ,it means 6 byte represent numbers and one represent the point.
that format represent A decimal value.
i need to create the value and make some comparison between 2 follows values.
my idea is to convert each byte to integer ( bY decrease 30 hex),
then convert each integer to real ( i coded some function that do that)
then multiple each real by its coefficient( the first by 100 , the second by 10 and so on...)
then add all the created values.
DO SOMEONE HAVE A BETTER IDEA???