LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting a hex number to binary

How do you convert a hexadecimal number to the actual 1's and 0's of binary? I am using labview 6i. Also I will eventually need the binary to be a string. Thanks.
0 Kudos
Message 1 of 3
(3,188 Views)
Converting for numeric display is quite simple. All you do is on the control/indicator, show the radix, and set it to the desired setting.

Setting up to display the binary in text is a bit more tricky. You need to insert a "Format Value" function in and wire "%b" to the format string. This will cause the output to change to binary.

Good luck
0 Kudos
Message 2 of 3
(3,188 Views)
"Number to boolean array" is a usefull vi to use.
"Boolean to (0,1)" can then be used to convert the boolean array to an array of 0's and 1's.
To convert to a string:
Add the output of "Boolean to (0,1)" with 48d.
Send this array to "Byte array to String" and voila:
your string is there.

Patrick
0 Kudos
Message 3 of 3
(3,188 Views)