Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Hexadecimal representation of decimal numbers. Please help.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
TrayShade
How do I cheat?
Reputation: 0

Joined: 26 Jul 2015
Posts: 4

PostPosted: Sun Jul 26, 2015 8:43 am    Post subject: Hexadecimal representation of decimal numbers. Please help. Reply with quote

I am currently changing a bunch of values in a game called Breath of Fire IV.
It is going well, but i encountered a small problem.
Basically i do not understand the 'conversion' (Wrong word?) of Hex to Dec with different amounts of bytes.
For example, in the memory viewer a byte shows the Hex value of 43, when double clicked it shows the decimal value of 67 in 1 byte, but with 2 bytes it shows the value 1347 instead.
When using the windows calculator in programmer mode to convert Hex to Dec, 43 equals 67 both in 'byte' and 'word' (which is 2 bytes right?).
I get the feeling i am missing something and i was hoping you could point out what it is exactly.
Thank you.
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sun Jul 26, 2015 9:02 am    Post subject: Reply with quote

Lets say an address contains the following four bytes.
43 05 00 01

Values are stored in a little-endian manner. This means the bytes are stored in a reverse order.

Byte (1-byte) = bytes: [43] = hex: 43 = decimal: 67
Word (2-bytes) = bytes: [43, 05] = hex: 0543 = decimal: 1347
DWord (4-bytes) = bytes: [43, 05, 00, 01] = hex: 01000543 = decimal: 16778563
Back to top
View user's profile Send private message
TrayShade
How do I cheat?
Reputation: 0

Joined: 26 Jul 2015
Posts: 4

PostPosted: Sun Jul 26, 2015 1:31 pm    Post subject: Reply with quote

Thanks a lot.
Turns out i was simply ignorant as to how the information was stored.
Perfect answer. Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites