LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hex to decimal conversion issue

Solved!
Go to solution

hello, 

iam converting hex to decimal then adding 15 to it then again converting decimal to hex.

so initially hex number is 00 then im adding 15 to it then im getting F which is also correct  but i should get 0F answer. is it possible to do it?

 

thanks in advance vi is attached 

0 Kudos
Message 1 of 3
(994 Views)
Solution
Accepted by newmemeber123

When you convert back to an ASCII Hex, you need to specify the length of the resulting string.  There is an input called "width" on the Number To Hexidecimal String that you need to set to 2.


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
Message 2 of 3
(989 Views)

How much do we know about the input string? For example, is the first string always exactly one character? Is it always "A"? Does the number always start out with 00? What should happen if the input is AFF and you add 15?

 

altenbach_0-1659549860689.png

 

Maybe all you really need is this:

 

altenbach_1-1659550130759.png

 

 

0 Kudos
Message 3 of 3
(914 Views)