From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
I need to use 12 bit integers, and started implementing Fixed Point conversion of U16 numbers to U12. My question is regarding performance and memory allocation. Does a U16 and Fixed Point U12 take up the same amount of bits (16 bits), hence no difference in performance (computations, math functions, etc)?
Also, do I get a performance hit when converting from U16 to a fixed point U12?
Note To represent a rational number using the fixed-point data type, the denominator of the rational number must be reducible to a power of 2, because the binary number system is a base-2 number system.
Computer architecture is nowadays as such, that only data 2^n can be handled. Infact, many arithmetic logical units (ALU) are optimized for certain numeric representations. So it is possible (depending on the system you are working) that handling 32bit numbers outperform 16bit numbers!
hope this helps,
Norbert
Norbert ---------------------------------------------------------------------------------------------------- CEO: What exactly is stopping us from doing this? Expert: Geometry Marketing Manager: Just ignore it.