Fixed point arithmetic scaling

Status
Not open for further replies.

mbenton

Newbie level 6
Joined
Jun 22, 2010
Messages
11
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,364
Hello,

I have found this values and dont understand how the scaling is done:

512 /* 1.0 scaled as 22,9 */
16 /* 1.0 scaled as 27,4 */
32 /* 0.0625 scaled as 22,9 */
 

I'm gonna give myself the answer.

512 /* 1.0 scaled as 22,9 */
I think it means that the most semnificative 22 bits are used to represent the integer part, and 9 bits to represent the fractional part. In the case above 512/(2^9)=1
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…