LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CONVERT BASE 36 TO DECIMAL

Any Vi to CONVERT BASE 36 TO DECIMAL?
0 Kudos
Message 1 of 10
(5,636 Views)
continue here
0 Kudos
Message 2 of 10
(5,630 Views)
The other thread refers to here. To break the cycle, lets keep things here in this thread. 😄
 
Message 3 of 10
(5,615 Views)


briancam wrote:
Any Vi to CONVERT BASE 36 TO DECIMAL?

How many base 36 digits (0..Z) do you have in each number?
0 Kudos
Message 4 of 10
(5,612 Views)
Attached is a very basic conversion from Base 36 to Base 10 that I wrote.  It only takes uppercase letters for Base 36 digits (you can fix this if you need to).  There is no error checking that the Base 36 string makes any sense (you can add this if you want to).  It does not add conversion for decimal, only whole numbers (you can add this if you want to).  This vi is just meant to get you started.  I hope it helps.

Cheers


Message Edited by jmcbee on 06-19-2008 02:07 PM
Message 5 of 10
(5,599 Views)
Here's a quick example:
 
(Of course you would need to add error checking for unusual characters, for example.)
0 Kudos
Message 6 of 10
(5,592 Views)
Here's a slight improvement that adds support for lowercase letters and check the input for validity (For example if there is an illegal character suchs as @ in the input).
 
It also eliminates all orange wires and operates fully on integers.
0 Kudos
Message 7 of 10
(5,572 Views)
I know you want to roll your own, but if you want to check your work,
http://bitizer.com converts Base36 to binary, hex, decimal, and ASCII to
very high bit depth.

--
Message posted using http://www.talkaboutprogramming.com/group/comp.lang.labview/
More information at http://www.talkaboutprogramming.com/faq.html

0 Kudos
Message 8 of 10
(5,521 Views)

jmcbee wrote:
Attached is a very basic conversion from Base 36 to Base 10 that I wrote.  It only takes uppercase letters for Base 36 digits (you can fix this if you need to).  There is no error checking that the Base 36 string makes any sense (you can add this if you want to).  It does not add conversion for decimal, only whole numbers (you can add this if you want to).  This vi is just meant to get you started.  I hope it helps.

Cheers


Message Edited by jmcbee on 06-19-2008 02:07 PM

 

hi  dear ,

 

you post this code  Attachment Base 36.vi (20 KB)

 

can you explane how this code work  please

 

thank you  

0 Kudos
Message 9 of 10
(5,184 Views)

Here's the explanation:

 

 

The math behind the value is quite simpe: base^position, where the first position left of the decimal sign is 1.

 

Ton

Message Edited by TonP on 11-13-2008 08:21 AM
Message Edited by TonP on 11-13-2008 08:21 AM
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 10 of 10
(5,181 Views)