01-02-2009 12:08 AM
hello all LabView Pundits
i have a string of binary numbers. (but the LV has considered them as deciamal, i think).
I want to convert them to a 1-D array such that each element of the array has each digit of the string.
in the sense:
String : 1010
i want the array to be a 1-D array such that each of the element in the array has one each of the above digits.
thankx in advance
more kudos to give 🙂
PS: will using "spreadsheet string to array" help???
Solved! Go to Solution.
01-02-2009 12:52 AM - edited 01-02-2009 12:53 AM
Here's one possibility, assuming the string is clean and does not contain any unexpected characters.
Convert the String to a byte array and subtract 48.
04-01-2011 05:44 AM
Hi!
I don't understand what is the meaning of substract 48. Could you explain, please??
Thanks.
04-01-2011 05:56 AM
I hope this link is enough for you to answer your question.
Norbert
04-01-2011 06:11 AM
Ok, but it's easier to say that 48 is the ASCII code of the 0 symbol, right?
Anyway tnks.
04-01-2011 06:28 AM - edited 04-01-2011 06:28 AM
Hi kantabra,
one should think you already got the point as you asked (basically) the same in that thread one hour earlier...