in reply to Re^3: word size
in thread word size
For a current machine (one on which Perl runs) 6 bit bytes are surely impossible, and I belive that 9 bit bytes don't exist any more: everyone works in multiples of 8 bytes. I think that this dominance of 8 bits is a consequence of the internet. It would be even more difficult to transfer binary data (like the IP and TCP header for example) from one machine to the other than now if they differed not only in word size and byte order, but this way. Also, even without the internet, all current hardware, such hard disks, video cards, work with multiples of 8 bits.
However, there can be (rare) machines where the char can be 32 or 16 bits. This can be either because the CPU doesn't handle 8-bit numbers efficently; or it could be because it's impossible to implement C on that CPU with char being 8 bits for some other obscure reason. (In this case, sizeof(char) will still be 1, because sizeof, malloc, and other C functions would count in units of chars.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: word size
by BrowserUk (Patriarch) on Sep 09, 2005 at 00:22 UTC | |
by ambrus (Abbot) on Sep 09, 2005 at 08:11 UTC |