Re: Hex to Decimal 2s Complement

2018-04-27 Thread Mark Wieder via use-livecode
On 04/27/2018 02:41 AM, Alex Tweedly via use-livecode wrote: I should know this - but don't any more :-) So there may be a corner case to fix up - but in general, something like *put*thetextoffld"F"intotemp* put*baseconvert(temp,16,10) intot1* if* t1 > 32767*then* *put*t1-65536intot1* end* *if*

Re: Hex to Decimal 2s Complement

2018-04-27 Thread Camm via use-livecode
Alex , You got it ! I forgot the > 32767 !! Great thanks Camm - Original Message - From: "Alex Tweedly via use-livecode" To: use-livecode@lists.runrev.com Cc: "Alex Tweedly" Sent: Friday, 27 April, 2018 10:41:27 AM Subject: Re: Hex to Decimal 2s Complement I

Re: Hex to Decimal 2s Complement

2018-04-27 Thread Alex Tweedly via use-livecode
uot;Richmond" Sent: Friday, 27 April, 2018 10:22:36 AM Subject: Re: Hex to Decimal 2s Complement I think you will have to perform several operations here: 1. convert Hex number to Binary number. 2. find Complement of Binary number. 3. convert Complement to Decimal number. Your "main pr

Re: Hex to Decimal 2s Complement

2018-04-27 Thread Camm via use-livecode
ay, 27 April, 2018 10:22:36 AM Subject: Re: Hex to Decimal 2s Complement I think you will have to perform several operations here: 1. convert Hex number to Binary number. 2. find Complement of Binary number. 3. convert Complement to Decimal number. Your "main problem" is that YOU hav

Re: Hex to Decimal 2s Complement

2018-04-27 Thread Richmond via use-livecode
e-livecode" To: "Camm via use-livecode" Cc: "Richmond" Sent: Friday, 27 April, 2018 10:11:19 AM Subject: Re: Hex to Decimal 2s Complement Well, unless you can explain to me what "2s Complement" means I cannot help you. Richmond. On 27.04.2018 12:06, Camm via use

Re: Hex to Decimal 2s Complement

2018-04-27 Thread Camm via use-livecode
result for 2s Complement. > > Regards > Camm > > - Original Message - > From: "Richmond via use-livecode" > To: "Camm via use-livecode" > Cc: "Richmond" > Sent: Friday, 27 April, 2018 10:01:17 AM > Subject: Re: Hex to Decimal 2s Co

Re: Hex to Decimal 2s Complement

2018-04-27 Thread Richmond via use-livecode
ot;Richmond via use-livecode" To: "Camm via use-livecode" Cc: "Richmond" Sent: Friday, 27 April, 2018 10:01:17 AM Subject: Re: Hex to Decimal 2s Complement Check out *baseConvert* in the dictionary. Richmond. On 27.04.2018 11:50, Camm via use-livecode wrote: Hi ,

Re: Hex to Decimal 2s Complement

2018-04-27 Thread Camm via use-livecode
Richmond , Tried baseconvert but could not get the correct result for 2s Complement. Regards Camm - Original Message - From: "Richmond via use-livecode" To: "Camm via use-livecode" Cc: "Richmond" Sent: Friday, 27 April, 2018 10:01:17 AM Subject: Re

Re: Hex to Decimal 2s Complement

2018-04-27 Thread Richmond via use-livecode
Check out *baseConvert* in the dictionary. Richmond. On 27.04.2018 11:50, Camm via use-livecode wrote: Hi , Help needed on the most efficient way to convert signed Hex to Decimal (2s Complement) range - Example :- FFCC = -52 014A = 330 Kind Regards Camm

Hex to Decimal 2s Complement

2018-04-27 Thread Camm via use-livecode
Hi , Help needed on the most efficient way to convert signed Hex to Decimal (2s Complement) range - Example :- FFCC = -52 014A = 330 Kind Regards Camm ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit