08-10-2009 07:54 PM
Hi,
I have this bit test logic I need to implement as a Labview code.
Should I use formula node or either something similar to this already in Labview?
"((var & (1<<bit)) != 0)" where 'var' may be 8, 16, or 32bit, 'bit' is a number 0 - 31 representing
a bit number. 0 is the least significant bit.
Thank you,
Do
Solved! Go to Solution.
08-10-2009 08:35 PM - edited 08-10-2009 08:36 PM
08-10-2009 08:37 PM
You could use a formula node or just a bunch of math nodes. Either will work.
The only really "tricky" part (and it's not that tricky) is the bit shifting. Just use 2^bit instead of 1<<bit
08-10-2009 08:39 PM