Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

binary string to number

Hi,
 
Is there an easy way to translate binary string to decimal number .
i.e
input "0000100"
output : 4
 
input : 10000000
output : 128
 
Thanks for your time
0 Kudos
Message 1 of 6
(12,659 Views)

Is the string always 8 characters (bits) long?

Are you using LabVIEW?

 

 

0 Kudos
Message 2 of 6
(12,656 Views)

Another question - Binary numbers can be interpreted in two ways:

- always positive

- positive or negative

which situation applies in your case?

0 Kudos
Message 3 of 6
(12,655 Views)
Hi,
The length is always 8 chracter and always with positive meaning.
I know i can use a simple case sequence with all the possibilities , but i was wonder if LabView can offer some built in functions .
 
Thanks,
Asaf
0 Kudos
Message 4 of 6
(12,652 Views)

Hi,

Thanks , it is just what i needed .

Asaf

0 Kudos
Message 6 of 6
(12,640 Views)