convert floating point to fixed and back in C#

0

I have an application that will stuff fixed point values into CPU registers. They're 32 bit (4 byte) and specified as:

Unsigned fixed-point number: 5 bits integer 27 bits fractional Min = 0x0 = 0.0000000 Max = 0xFFFFFFFF = 31.9999995

How would I convert a number like 1.003936 to 4 bytes? Would also know how to go the other way Using C#

CPU is an AMS PCap04 signal processor - AMS PCap04

c#
floating-point
fixed-point
asked on Stack Overflow Feb 18, 2021 by Maylar • edited Feb 19, 2021 by Maylar

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0