ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i read perticular bit from 16 bit data

how can i read perticular bit from 16 bit data
0 Kudos
Message 1 of 4
(3,297 Views)
Number to boolean array function on numeric >> Conversion palette
0 Kudos
Message 2 of 4
(3,294 Views)
Or AND it with the bit you want to compare.
0 Kudos
Message 3 of 4
(3,291 Views)
I like to work in Hex. A 16 bit word in Hex that has all high bits will read FFFF. And that Hex word with a hex value where the bit you want to check is high. For example, a word you read is 0xFFFF, or all high; you want to check for to see if bit 9 is high so  you and the word with 0x100, if the result is 0x100 the bit is high, if it returns a 0 it's low. Also works to check multiple bits. See the crude VI attatched to see how this works.
Why do geeks think Halloween and Christmas occur on the same day?
Because 31oct = 25dec!
0 Kudos
Message 4 of 4
(3,263 Views)