Anonymous user
Hexadecimal: Difference between revisions
no edit summary
>Torchickens No edit summary |
>Torchickens No edit summary |
||
Line 19:
On rare occasions, a hexadecimal value may represent a value in 'human representation', meaning it is managed as a decimal value. This is the case for money values in [[bp:Generation I|Generation I]]. The player's current money is stored in memory addresses D347-D349 in Pokémon Red and Blue or D346-D348 in Pokémon Yellow. This is problematic for values that do not show something in decimal, such as 0D, which represents the number 0 and a 'glitch digit'.
==Converting from hexadecimal to decimal==
The actual conversion process is demonstrated by [http://pad3.whstatic.com/images/thumb/0/04/Convert-Hexadecimal-to-Binary-or-Decimal-Step-2-Version-2.jpg/629px-Convert-Hexadecimal-to-Binary-or-Decimal-Step-2-Version-2.jpg this image].
Take for example the hexadecimal number D9. D is 13 in decimal, because you can count up from 9 and think of the number 10 being 'A', and the number 11 being 'B', and so on. 9 needs no conversion.
We then do: (13*16^1)+(9*16^0). The result is 208+9=217. The number 16 is constant. The power (^x) is taken from the number of digits that followed one of the hexadecimal digits.
Let's take for another example the hexadecimal number 49BD.
We would do (4*16^3)+(9*16^2)+(11*16^1)+(13*16^0)= 16384+2304+176+13=18877
B and D were converted into 11 and 13, respectively.
Converting from decimal to hexadecimal by hand is more complex, but is described [http://www.wikihow.com/Convert-from-Decimal-to-Hexadecimal here].
An easier method (but requiring a computer) to convert from hexadecimal to decimal or decimal to hexadecimal is through Windows Calculator. One can go on Windows Calculator, click 'view', click 'programmer', click 'hex', enter a number, and then switch to 'decimal' to convert a hexadecimal number into decimal.
To convert from decimal to hexadecimal follow the same steps above but enter a number in decimal first then switch to hexadecimal.
Alternatively, [http://www.binaryhexconverter.com/hex-to-decimal-converter this online tool] can be used.
[[Category: Terminology]]
|