- #1
PhantomPower
- 14
- 0
Hello,
I am currently trying to figure out if its possible to go from a number in (unsigned) Q3.5 format -> 8 bits given.
And print it on a display in decimal.
I only have a 8 bit microcontroller to work with.
For example 011.11010 should have 3.8125
Getting to 3 is easy but I can't see how I could get 8125 - I know I need to divide the 26 by 2^5 but this would give me 0 as an inside an 8 bit microcontroller.
Any tips - Or some C source code would be lovely.
Thanks in advance.
I am currently trying to figure out if its possible to go from a number in (unsigned) Q3.5 format -> 8 bits given.
And print it on a display in decimal.
I only have a 8 bit microcontroller to work with.
For example 011.11010 should have 3.8125
Getting to 3 is easy but I can't see how I could get 8125 - I know I need to divide the 26 by 2^5 but this would give me 0 as an inside an 8 bit microcontroller.
Any tips - Or some C source code would be lovely.
Thanks in advance.