LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

binary digits

I have a 32 BIT Binary word in which I want to pull out BITS 26-21 and a few others from the word to decode it.  Do I have to convert it to string or is there a function like get substring for this 32 BIT number?
0 Kudos
Message 1 of 2
(2,442 Views)

You can use number to boolean array, then index the bits of interest out of the array.

 

You could also use boolean logic.  If you want bit 3, you could AND it with 8  (2^3) and you will have effectively masked off all the other bits and showed the one of interest.  Then you can see if that number is 0 (for false) or 8 (for true).

Message 2 of 2
(2,439 Views)