![]() ![]() If you store it in the simplest way, it's usually wasting 29 bits as nearly all serialization will assume 32-bit numbers or longer. If a byte was 16 bits long, then the storage of the number 4 (1-0-0), which takes 3 bits, would waste 13 bits to store it on the hard drive Incidentally, this also explains why your text messages can hold 160 characters or 140 bytes. That's for 7-bit channel compatibility (RFC-2822 holds the gist on the details, but it boils down to "must fit in ASCII"). The existence of that is still the reason why, when you send an email with a photo attachment, it grows by 30% in size before being sent. In communication (ASCII) 7-bit bytes are often used. PDP's have had 18-bit words and 36-bit double-words. Not to mention the newly invented DWORD64, for the next longest type. This has endured to the point where computers are now probably 64-bit word based, but they still have a (Windows-defined) 16-bit WORD type and 32-bit DWORD type. The 80386 and up should've had a 32-bit word and 64-bit double word, but they kept to the same "word" size for familiarity reasons for older programmers. Intel made a hash of it by not changing it after the 8086. A word is its typical processing size that's most efficient, and a double-word is two of those conjoined for longer mathematics (as typical words weren't enough to hold the price of a single house, for example). Word and double-word are defined with respect to the machine they're used on. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |