07-13-2013 07:44 PM
hi member
i have number which is a floating ponit and i converted it to fixed ponit representation by use lab view to fixed block vi
i am asking what is the algorithem that have been used by the to fixed block vi??
best rgeads
07-14-2013 08:43 PM
Hi Mangood,
May I know what the fixed block vi you are referring to?
Are you referring to this function: To fixed point?
http://zone.ni.com/reference/en-XX/help/371361J-01/glang/to_fixed_point/
Regards,
KwokHow
07-18-2013 02:14 PM
yes
i asking what is the algorithem that can be used to convert floating point to fixed point with out use this VI!!!!
07-18-2013 04:34 PM
@mangood wrote:
i asking what is the algorithem that can be used to convert floating point to fixed point with out use this VI!!!!
The details of the algorithm depend on the configuration of the "To Fixed Point" function (in Properties). With default values, this algorithm produces identical results. A fixed-point value is a lot like an integer, except that the first bit has a value of 2^(-n) instead of a value of 1. To convert a floating point to a nearly-equivalent fixed-point, you multiply the floating point by 2^n, then convert that to an integer.
07-22-2013 01:49 AM
There's a good paper here which explains the structure of a fixed-point value - http://zone.ni.com/devzone/cda/pub/p/id/303
To clarify Nathan's response, basically, a FXP has N bits which are a regular binary integer and M bits for the fraction, which work just like the integer (you multiply and add), but the Mth bit from the point is worth 2^(-M), so .001 is (0*1/2)+(0*1/4)+(1*1/8) or 0.125.
09-10-2013 12:56 AM
@tst wrote:
There's a good paper here which explains the structure of a fixed-point value - http://zone.ni.com/devzone/cda/pub/p/id/303
To clarify Nathan's response, basically, a FXP has N bits which are a regular binary integer and M bits for the fraction, which work just like the integer (you multiply and add), but the Mth bit from the point is worth 2^(-M), so .001 is (0*1/2)+(0*1/4)+(1*1/8) or 0.125.
thank you