PDA

View Full Version : Adding Hex numbers


mrdude
09-23-2005, 03:03 PM
Hmmm this is a bit or a weird question so here goes:

I have made a small app that adds two hex values together and gives the answer in hex.

When I add smallish hex numbers the answer works great however If I add two hex numbers together that the value comes to more than 8000000 the answer always comes out at 8000000 - Is this a fault with APMS or is it just that the pc can't seem to display large hex answers.

I am tring to add hex value of 1 to a MAC address which can go to ffffffffffff - obviously I can't do this as the MAC number to start with is larger than 8000000. How can I get around this to display the correct number 12 digits long? or can't It work with APMS? Cheers.

Jonas DK
09-23-2005, 04:22 PM
Sorry no direct answer here... BUT

I belive I have read about this problem in the fourm earlier.
Try searching the old 5.0 forums as I dont think much of the math have changed in the new version.

If I remember correctly there is a limit to the number that can be calculated and it may very well be 8000000.

But then again I could be absolutely wrong and then stands to learn from someone who does now the correct answer to this problem. :rolleyes