Doing Maths in Hex

Bob Sneidar bobsneidar at iotecdigital.com
Tue May 3 11:27:29 EDT 2016


When I did my IP subnet calculator, there were some things that required binary, like determining what part of the IP address was the network address, and other operations required decimal. Of course, that was a unique problem as each octet is a discreet value, and not part of a *total* address. It's actually 2 addresses, the bit length of each defined by the mask. Still, when I needed to do calculations, I needed to do them in decimal.

Bob S


On May 1, 2016, at 02:04 , RM <richmondmathewson at gmail.com<mailto:richmondmathewson at gmail.com>> wrote:

Is it possible for Livecode to do Mathematics in Hexadecimal?

Or, am I going to have to shove Hex numbers through a Hex-to-Decimal meat grinder,
do the Math(s) and then shove the result through a Decimal-to-Hex meat grinder . . .

. . . all going to be a pain-in-the-b quite frankly (especially if one is a vegetarian and doesn't
have a meat grinder).

Richmond.




More information about the use-livecode mailing list