LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

uNSIGNED TO SIGNED DECIMAL

Solved!
Go to solution

 Hai

 

I want to convert an unsigned decimal no. to Signed Decimal no.How can this be done?For eg. 65516 (Unsigned) represents -20(signed)

0 Kudos
Message 1 of 6
(4,655 Views)
You find the functions in the Numeric > Conversion Palette.
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 2 of 6
(4,652 Views)
Solution
Accepted by topic author mln

Either typecast or convert to I16. See image.

 

(You could also coerce and simply change the indicator representation to I16 :))
Message Edited by altenbach on 11-11-2008 10:53 PM
Message 3 of 6
(4,649 Views)
Thanks alot.It was so simple.
0 Kudos
Message 4 of 6
(4,640 Views)

Hello you Knight of NI.

I thought that the question and the answer is so simple that I do not need a screen shot to explain it.

You have stolen my accepted solution and my Kudos Smiley Sad .

 

 

 

 

 

 

And to be honest I never mind about that Smiley Very Happy .

Message Edited by waldemar.hersacher on 11-12-2008 01:07 PM
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
Message 5 of 6
(4,608 Views)

waldemar.hersacher wrote:

I thought that the question and the answer is so simple that I do not need a screen shot to explain it.


I am very sorry about that. Of course one might argue that without the picture I would have been more than three minutes faster, beating you for the first answer 😮 🙂

 

In fact, the answer is quite a bit more complicated, because we were never told what the representation of the original "unsigned decimal" is. Common sense would assume that it's U16, but we cannot be sure.

 

For example if the input is an U32 number of 65516, the typecast would fail. (The "To I16" conversion bullet and simple coercion would still be OK).

0 Kudos
Message 6 of 6
(4,597 Views)