09-02-2008 07:43 AM
09-02-2008 07:47 AM
You can convert a number to a binary array in the numeric toolbox -> Conversion -> number to binary array function
Is this what you mean?
09-02-2008 07:50 AM - edited 09-02-2008 07:51 AM
Are you converting a number greater than 1? If so, yes, it is called Number to Boolean Array.
You can find it in the Boolean or Numeric palettes.
R
09-02-2008 07:55 AM
I know this object this convert number to array ,, don't want to convert to array because I have one number only
09-02-2008 08:01 AM
One number can have, regarding of it's "resolution" many different states where the boolean can only have two. So the easiest way to do a conversion like you want one is to compare the number with a certain value (better use > or <, not = )....
hope this helps,
Norbert
09-02-2008 08:05 AM
As you may be able to tell, we have not understood your request.
Please illustrate what you would like so we can help further.
Wild guess:
Have you tried using the bit-wise operations available by using the boolean functions like "And" with a bit mask?
Ben
09-02-2008 08:07 AM
09-02-2008 08:08 AM
JoeLabView wrote:
Are you converting a number greater than 1? If so, yes, it is called Number to Boolean Array
JLV, You can use number less than 1 as well. Twos complement is used 🙂
09-02-2008 09:52 AM - edited 09-02-2008 09:53 AM
I guess Elyan wants to convert a number into a binary string 😉
So, as explained at least one thousand times in this forum :
- if this is just for display : just change the display format
09-02-2008 10:16 AM
yenknip wrote:JLV, You can use number less than 1 as well. Twos complement is used 🙂
I realize that, but I didn't understand (still don't) why the question was being asked. I figured, if the person want to convert numbers 0 or 1 to a boolean, then I would have suggested something different. Converting a "number" to boolean has to give you an array to represent each bit that defines that number..
As CC mentionned, similar questions were asked 1000 times... with just about as many variations on what is actually needed 😉
"Converting a number to boolean" is too vague a question.. SO our answers are just as vague.. LOL! 😄