Home Gadgetman Forum Book Reviews Links Contact me X-UFO
Gadgets Processors Programming School Old news
As we all remember, a dWord consists of 4Bytes... Here comes the fun part: What is stored where?

Sounds like a daft question, doesn't it? Actually, it's quite important.

the S5(and all the rest of the series) are what is known as Little Endian. What that means is that they store the least significant part of a Word or dWord on the lowest address. (so does every PC)

Sounds plausible, maybe even logical?

Not so. The PalmPilot, the Mac(I think), and many other computers, are Big Endian, meaning that they store the most significant part of the Word/dWord on the lowest address. Anyone planning to do ANY file converters should stop and think about this, and then check it carefully before starting any work...

Anyone doing any direct access to any file should consider that. (Maybe that garbage you tried to read in a HEX editor will look different the other way around?)

This is of course because a S5 will put the least significantpart of a Word/dWord in the file, followed by the more significant parts after it, while the palmPilot will put the most significant part first.

Now, how many would like to know about Floating point variables?

If you're smart, you will NOT want to know about them! And I have NO intention of trying to explain them. I have trouble enough understanding them myself...

Binary Coded Decimal (BCD). Isn't all dcimal numbers encoded in the binary system? Yes, but that's no what this means. Once upon a time a bastard said: 'Why don't we split the Bytes into Nibbles, and let every nibble represent a Decimal number, utilizing only 100 of the 256 possible cominations of every Byte?' And then were created the BCD monster. The only reason for using it is for easier screen representation... The result? just about every Microprocessor created have inbuilt commands to convert to and from this format. some even have functions for doing math in this format... Hopefully, you'll never have to work with it.(Unless you do any assembly programming :-)

<<1. Simple numbers.>>
<< >>