Two's complement is a mathematical operation on binary numbers, best known for its role in computing as a method of signed number representation. For this reason, it is the most important example of a radix complement.
The two's complement of an N-bit number is defined as its complement with respect to 2N. For instance, for the three-bit number 010, the two's complement is 110, because 010 + 110 = 1000. Regards Camm ----- Original Message ----- From: "Richmond via use-livecode" <use-livecode@lists.runrev.com> To: "Camm via use-livecode" <use-livecode@lists.runrev.com> Cc: "Richmond" <richmondmathew...@gmail.com> 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-livecode wrote: > Richmond , > > Tried baseconvert but could not get the correct result for 2s Complement. > > Regards > Camm > > ----- Original Message ----- > From: "Richmond via use-livecode" <use-livecode@lists.runrev.com> > To: "Camm via use-livecode" <use-livecode@lists.runrev.com> > Cc: "Richmond" <richmondmathew...@gmail.com> > 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 , >> >> >> Help needed on the most efficient way to convert signed Hex to Decimal (2s >> Complement) range 0000 - FFFF >> >> >> >> >> Example :- >> >> >> FFCC = -52 >> >> >> 014A = 330 >> >> >> Kind Regards >> Camm >> _______________________________________________ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription >> preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode