LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement logical equation as LabView?

Solved!
Go to solution

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

0 Kudos
Message 1 of 4
(2,615 Views)
Solution
Accepted by topic author horanyee

 

Rotate, And, Not equal to zero

Message Edited by Ravens Fan on 08-10-2009 09:36 PM
0 Kudos
Message 2 of 4
(2,602 Views)

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

 

-Matt Bradley

************ kudos always appreciated, but only when deserved **************************




0 Kudos
Message 3 of 4
(2,599 Views)
Just saw your post Ravens Fan.  Didn't think of a rotate, but that (of course) would work.
-Matt Bradley

************ kudos always appreciated, but only when deserved **************************




0 Kudos
Message 4 of 4
(2,598 Views)