Forum Discussion
Altera_Forum
Honored Contributor
14 years agoFixed Point Rounding
Hey guys, I have one more question about fixed point rounding. If you multiply two numbers and have to perform rounding, how would you do that with fixed point? I'm currently round...
Altera_Forum
Honored Contributor
14 years agoPersonally I always use the following technique. If I want to round 16-bits into 6 - bits I do the following.
XXXX_XXXX_XXXX_XXXX + 0000_0010_0000_0000 Then truncate the 6 msb's this will be the rounded value. I would not make it more difficult than that. In essence you are adding 0.5 and then truncating in decimal. It does not matter how many bits you have on the right hand side of the decimal point. Hope that helped /Boris