LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting a Double into a two-complement integer

I have a Double number with range 0 to 65536 (16Bit) now I have to convert that into two-complement. The range of the new number must have -32768....32767. If a make that with the converter to I16, the numbers obove 32767 will cut away instead of negative. If the most significant Bit is one the number have to be negative. How can I manage this, could anybody help me?
0 Kudos
Message 1 of 2
(2,938 Views)
Hi Stevi,

Try converting the double to a U16 first then to an I16, this should work,

Hope this helps,

Nick
Message 2 of 2
(2,938 Views)