LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hex to binary

Hey all,
 
I am trying to convert a 16 bit hex word to binary (I need a string of 1's and 0's in such a format that I can do a value check on each bit individually). I am getting the hex value in as a string (if I want to display the hex value to a string indicator, I have to set the indicator to "hex" display mode, otherwise it just comes out as a bunch of weird characters.....ASCII?).
 
I am sure this is probably pretty simple, but I can't seem to get it right. Thanks in advance for your help.
 
Paul
0 Kudos
Message 1 of 5
(3,578 Views)
This thread may be of use to you:

http://forums.ni.com/ni/board/message?board.id=170&message.id=159169&query.id=56353#M159169
0 Kudos
Message 2 of 5
(3,573 Views)
Just typecast your string to U16, display it in a numeric indicator, and change the display to binary format with 16 digits padded with zeroes on the left.
 
(Optionally, you can convert it to a boolean array (using "number to boolean array") and display the bits as such).
0 Kudos
Message 3 of 5
(3,572 Views)
Here's a quick example (LabVIEW 8.0) showing some possibilities. Maybe one is suitable for your situation. 😉
 
 
 
Message 4 of 5
(3,564 Views)

I think that is exactly what I need. Thanks for the help!

Paul

0 Kudos
Message 5 of 5
(3,528 Views)