ROM Hack Hexadecimal Numbers?!

DiscostewSM

Well-Known Member
Member
Joined
Feb 10, 2009
Messages
5,484
Trophies
2
Location
Sacramento, California
Website
lazerlight.x10.mx
XP
5,486
Country
United States
A hex number is simply a counting number using base 16. Much like how we use base 10 for regular counting (0 to 9, then 10 to 19, etc), Hex counts from 0 to F (where A to F represent 10 to 15), then the next count from 10 to 1F, then 20 to 2F, ... , E0 to EF, F0 to FF, 100 to 10F, etc etc.

A representation of a base 10 number separating the digits for say 1569 could be shown as

(1 * 10^3) + (5 * 10^2) + (6 * 10^1) + (9 * 10^0)

So, say we have a hex number like h4EA3. What would it equal as base 10?

(4 * 16^3) + (14 * 16^2) + (10*16^1) + (3 * 16^0) = 16384 + 3584 + 160 + 3 = 20131
 

mbcrazed

Well-Known Member
OP
Member
Joined
Nov 10, 2012
Messages
695
Trophies
1
Location
GBATemp
XP
2,082
Country
United States
A hex number is simply a counting number using base 16. Much like how we use base 10 for regular counting (0 to 9, then 10 to 19, etc), Hex counts from 0 to F (where A to F represent 10 to 15), then the next count from 10 to 1F, then 20 to 2F, ... , E0 to EF, F0 to FF, 100 to 10F, etc etc.

A representation of a base 10 number separating the digits for say 1569 could be shown as

(1 * 10^3) + (5 * 10^2) + (6 * 10^1) + (9 * 10^0)

So, say we have a hex number like h4EA3. What would it equal as base 10?

(4 * 16^3) + (14 * 16^2) + (10*16^1) + (3 * 16^0) = 16384 + 3584 + 160 + 3 = 20131
Hmm.... So How can you tell which Pokemon you have? ( Sorry if It's a stupid question, I'm kind of a noob when it comes to this stuff)
 

DiscostewSM

Well-Known Member
Member
Joined
Feb 10, 2009
Messages
5,484
Trophies
2
Location
Sacramento, California
Website
lazerlight.x10.mx
XP
5,486
Country
United States
Well, that would require having information about the game on hand, which I do not have. But I'm sure whatever it is will have addresses (location in the file) of what is what, like what pokemon you have, what their level is, etc, and that will likely be held in hex format.
 

mbcrazed

Well-Known Member
OP
Member
Joined
Nov 10, 2012
Messages
695
Trophies
1
Location
GBATemp
XP
2,082
Country
United States
Well, that would require having information about the game on hand, which I do not have. But I'm sure whatever it is will have addresses (location in the file) of what is what, like what pokemon you have, what their level is, etc, and that will likely be held in hex format.
Thanks for this information! The reason I was needing to know is because I'm working on a, " Project."
 

Snailface

My frothing demand for 3ds homebrew is increasing
Member
Joined
Sep 20, 2010
Messages
4,324
Trophies
2
Age
40
Location
Engine Room with Cyan, watching him learn.
XP
2,255

ouch123

Well-Known Member
Member
Joined
Aug 2, 2012
Messages
353
Trophies
0
XP
168
Country
United States
He already covered converting from hex to decimal so I'll go over converting from decimal to hex, which I'm assuming is what's confusing you.

Let's take your post count as an example.
15 < 231 < 255. So, we know that your post count can be represented using two hexadecimal digits (hexits).
231 / 16 = 14, Remainder 7.
14 = 0xE
7 = 0x7
Then, 231 = 0xE7.

Edit: Urgh, misinterpreted the source of your confusion. If you want to know what Pokémon is associated with a given hexadecimal value, you will have to either consult a table or make one, in all likelihood.
 

mbcrazed

Well-Known Member
OP
Member
Joined
Nov 10, 2012
Messages
695
Trophies
1
Location
GBATemp
XP
2,082
Country
United States

mbcrazed

Well-Known Member
OP
Member
Joined
Nov 10, 2012
Messages
695
Trophies
1
Location
GBATemp
XP
2,082
Country
United States
He already covered converting from hex to decimal so I'll go over converting from decimal to hex, which I'm assuming is what's confusing you.

Let's take your post count as an example.
15 < 231 < 255. So, we know that your post count can be represented using two hexadecimal digits (hexits).
231 / 16 = 14, Remainder 7.
14 = 0xE
7 = 0x7
Then, 231 = 0xE7.

Edit: Urgh, misinterpreted the source of your confusion. If you want to know what Pokémon is associated with a given hexadecimal value, you will have to either consult a table or make one, in all likelihood.
Thanks!! This made things a little not confusing about hexits! I'm pretty good at math, but the thing that's going to get me is the 0 through 9 A through F Thing!
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: Mj you are the father