Apr 30, 2007 at 1:34 AM
Join Date: Jun 25, 2005
Location:
Posts: 372
They're hex values, they work differently.
Since one is big and first, they seem to be in little endian format. What this means is that the least significant digit is stored first - think of it like the number 123 being stored as 321(assuming that we are using the normal numbering system and each separate number is a single byte) There are advantages to this, but don't try to ask me about them.
If your digits are 232 and 3, or, rather, the bytes E8 and 03. Turn this around and you get the hex value of 0x03E8(The prefix of 0x is used to indicate it is a hex value). Since hex is a base 16 number system, the tens place is the number times 16, and the hundreds is the number times 16^2. E0 = 14 * 16 = 224, and 300 = 3 * 16 * 16 = 768. Thus, 768 + 224 + 8 = 1000. Is that Ballos? :eek:
You've got to keep in mind both that most numerical values are going to be stored in little endian order AND are in hex.
Since one is big and first, they seem to be in little endian format. What this means is that the least significant digit is stored first - think of it like the number 123 being stored as 321(assuming that we are using the normal numbering system and each separate number is a single byte) There are advantages to this, but don't try to ask me about them.
If your digits are 232 and 3, or, rather, the bytes E8 and 03. Turn this around and you get the hex value of 0x03E8(The prefix of 0x is used to indicate it is a hex value). Since hex is a base 16 number system, the tens place is the number times 16, and the hundreds is the number times 16^2. E0 = 14 * 16 = 224, and 300 = 3 * 16 * 16 = 768. Thus, 768 + 224 + 8 = 1000. Is that Ballos? :eek:
You've got to keep in mind both that most numerical values are going to be stored in little endian order AND are in hex.