LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
David_L

Number to Boolean String

Status: New

The LabVIEW String/Number Conversion Palette contains many functions to convert a number to a Decimal, Hex, Octal, Fractional, Exponential and Engineering Strings.  However there is one missing: The Number to Boolean/Binary String.  This can be replicated very easily with the following code, but should be a native function of LabVIEW.

 

Number to Boolean String86.png

9 Comments
Knight of NI

Well, you certainly could do all of that.

 

Or, you can just do this:

 

Example_VI.png

 

 

I agree, though, that the function would be useful. Smiley Wink

 

Side-note: This must be the first Rube Goldberg that we've seen in the LabVIEW Idea Exchange. 

 

Message Edited by smercurio_fc on 07-22-2009 11:20 PM
David_L
Active Participant
Well I feel dumb.  I did not know that function existed.  Seems like I learned something new today!
JackDunaway
Trusted Enthusiast

And the winner is....

BinaryStringResults.png 

smercurio_fc, and close to 25x faster in certain cases! Might be good if someone verified the attached quick and dirty code... It's not exhaustively conclusive, but it's telling nonetheless.

Message Edited by mechelecengr on 07-23-2009 11:09 AM
JackDunaway
Trusted Enthusiast
Is the attachment showing up?
Message Edited by mechelecengr on 07-23-2009 11:12 AM
altenbach
Knight of NI

Still, the code is not exactly the same, and a binary format version would actually be welcome in the "String/Number conversion" palette.

 

Remember that the built-in versions also work for arrays directly without extra code.

 

I think I actually support the idea. 😄

Hornless.Rhino
Active Participant

Sounds like a good idea.

Where it would get interesting would be what binary format it would output it in. (1s compliment, 2s compliment etc).

muks
Proven Zealot
I am for a built in function. Kudos....
RanaSadeghi
Member

Can anyone tell me what's the name of the component in second solution?  

crossrulz
Knight of NI

Format Into String


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5