LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting decimal numbers of an array to corresponding binary values?

I have a one dimension array and it have some "N" elements,I want to convert all the element of this formerly mentioned array to its corresponding binary representation and store it in an another array.

eg :[1 2 3 4 5 6....]'  : The present decimal array

 

after conversion 

[001 010 011 100 101 110..]'

 

Thanks..

0 Kudos
Message 1 of 6
(3,208 Views)

You need to be more clear. Are you talking about "conversion" or simply changing the display format ("formatting").:

 

What is the representation of the input array (e.g. string, U8, I32, DBL, CDB, etc.)

What is the representation of the converted array (e.g. Boolean, string with either characters "0" or "1", numeric with values 0 or 1? Numeric formatted in binary? Is the output array the same size?

 

Easiest is always if you could attach a simplified VI showing the input data and telling you what the output should be. Is this for further processing or only for display?

0 Kudos
Message 2 of 6
(3,198 Views)

Like this? (just right-click the indicator and change the display format).

 

ChangeFormat.png

0 Kudos
Message 3 of 6
(3,192 Views)

wrote:

You need to be more clear. Are you talking about "conversion" or simply changing the display format ("formatting").:

 

What is the representation of the input array (e.g. string, U8, I32, DBL, CDB, etc.)

What is the representation of the converted array (e.g. Boolean, string with either characters "0" or "1", numeric with values 0 or 1? Numeric formatted in binary? Is the output array the same size?

 

Easiest is always if you could attach a simplified VI showing the input data and telling you what the output should be. Is this for further processing or only for display?


Yes sir,

I meant by changing the value to the base of binary not only for output displaying but further process depends up on the binary value which is being discovered.yes, the input array is of base  U8,and my intended output should consist of numerical formatted binary values, the currently VI is attached . Actually i was trying to transfer a color image using digital modulation technique(BASK), As the VI suggest i was trying to covert RGB color image of 24bit to 3 monochrome image and then using the corresponding pixel value of each monochrome plane created a 1-d array with the elements of its corresponding to the pixels gray scale intensity value.The next step that was i trying to imply was converting the pixel value(U-8) to binary correspondent.Such that i can use this binary value of pixel  as input to digital modulation transmitter.

0 Kudos
Message 4 of 6
(3,168 Views)

This makes no sense. Everything is already binary under the hood. Formatting is just a cosmetic property.

0 Kudos
Message 5 of 6
(3,150 Views)

wrote:

This makes no sense. Everything is already binary under the hood. Formatting is just a cosmetic property.


Sorry sir,

Didn't Understand your point , are you saying formerly mentioned setup will not work?

0 Kudos
Message 6 of 6
(3,144 Views)