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.)


In reply to Re^4: word size by ambrus
in thread word size by collin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.