07-31-2012 08:57 PM
127 decimal = 111111 binary.
Try setting the format string on the Format Into String connected to Messages to %b
Lynn
08-01-2012 07:25 AM - edited 08-01-2012 07:26 AM
This is an interesting way of getting the final character. What are you trying to do here?
If you are after individual bits, you need to convert to a boolean array.
08-01-2012 05:05 PM
@crossrulz wrote:
This is an interesting way of getting the final character. What are you trying to do here?
If you are after individual bits, you need to convert to a boolean array.
Thanks for the reply...
I can't find how to convert from a byte array to a boolean array.....suggestions?
The earlier poster that showed how a boolean array could be transformed to a byte array using the >0 was interesting....is there another comparison, or other component that I can use to convert from byte array to boolean array....?
TIA,
cayenne
08-01-2012 05:17 PM
cayenne,
One issue is just what you want the output array to look like. Do you want a 2D array where each row reperesents the bits in one byte or do you want a 1D array with the booleans concatenated?
Here is how you could do the first.
The other is a bit more involved.
Lynn
08-01-2012 05:45 PM
@johnsold wrote:
cayenne,
One issue is just what you want the output array to look like. Do you want a 2D array where each row reperesents the bits in one byte or do you want a 1D array with the booleans concatenated?
Here is how you could do the first.
The other is a bit more involved.
Lynn
I believe the 2D array is best way...I could more easily go through each byte at a time to parse them, and act on them.
I see in the functions pallete, the number to array component you used in the loop...but where is the boolean array object you're feeding into there? I can't find that.....
From your example I'd go something like?
Thank you,
C
08-01-2012 06:05 PM - edited 08-01-2012 06:06 PM
It's an indicator.
Wire from the Number to Boolean Array to the edge of the For Loop. You should wind up with an auto-indexing tunnel. Then right click on that and choose Create Indicator.
PS: You don't need to get the Array Size and wire that to the N node of the loop. That is taken care of automatically