ni.com is currently experiencing unexpected issues.
Some services may be unavailable at this time.
01-24-2022 04:33 AM
Hello.
How can I convert 12-bit offset binary word to 12-bit 2's complement word? Thanks.
01-24-2022 04:39 AM
Hi Valentin,
@Valentin87 wrote:
How can I convert 12-bit offset binary word to 12-bit 2's complement word? Thanks.
What is a "12-bit offset binary word"?
What is a "12-bit 2's complement word"?
When it comes to LabVIEW datatypes a "word" typically is a 16-bit entity, like U16/I16. So you need to explain your input datatype and the expected result more clearly before we can help you…
01-24-2022 05:12 AM - edited 01-24-2022 05:13 AM
For example, I have dec value = 3754 (U16). I must get value in I16 in 2's complement code.
01-24-2022 05:57 AM - edited 01-24-2022 06:00 AM
Lots of options, but this does the trick:
If the intention is to convert to double (the 'resolution' of 0.0625 is just an example):