PDA

View Full Version : Help in HEX convert need


RanDomIze
20-12-2007, 06:42 PM
Hi.
i need a litle help in hex convert.

in Bepe threads i fond this.

- nb file: 0x000001F5: short value + 0x48 (e.g: 0xA7+0x48=0xEF)
- nb file: 0x000001FB: short value + 0x48

A7 00 + 0x48 = EF 00
DB 05 + 0x48 = 23 06

i dont know if that is correct or not but if yes wath the value for this?

A2 01 + 0x48 = ??????

Thx and regards

kc_hubbard
20-12-2007, 10:06 PM
I think you are not adding the columns correctly here. See your examples below along with a base 10 (the way we normally count) example (notice the numbers are lined up just as you would if you were adding base 10 numbers, from the least significant column to the most significant column, right to left)
A7 00 DB 05 100 (base 10 example)
+ 48 + 48 + 10
-------- ------ ----
A7 48 DB 4D 110

A7 + 48 does add to EF, but that is leaving out 2 entire orders of significance at the end of the A7 00 number.

So, the answer to your next question then would be:
A2 01
+ 48
------
A2 49

Also, just FYI here, the Calculator program that comes w/ Windows based computers will do Hex arithmetic for you. To get it to hex mode, start the Calculator, click on the View menu and choose Scientific. The calculator will then change it's view so that you can do Hex, Decimal (base 10), Octal or Binary arithmetic.

Hope that makes sense. If not, ask and I'll try to do a better job explaining.