Bytes or octets?

Quick: what is the definition of a byte (as in two kilobytes)?

If you said it is a unit of 8 bits, you failed.

Correct answer (according to IEEE 1541):

  • A byte is a set of adjacent bits operated on as a group;
  • The octet is a set of 8 bits.

Hence, if I refer to 1024 times 8 bits, I should avoid “1 kB” as this can be interpreted as 1000 bytes where byte is a platform-specific term. I should write 1 Kio or one kibioctet.

Note: Yes, I am being pedantic.

Note 2: I initially wrote “1 KB” instead of “1 kB”.

Published by

Daniel Lemire

A computer science professor at the University of Quebec (TELUQ).

19 thoughts on “Bytes or octets?”

  1. I really don’t like the term ‘octet’ because it seems like it would be too easy to confuse with the base ‘octal’.

    What’s so wrong with a byte being 8 and a nibble being 4? Then we could add in a ‘lick’ being 2, and perhaps a ‘sniff’ as one 🙂 Thus 64 would probably be a ‘mouth-full’ 🙂

    Paul.

  2. @Homer

    “What’s so wrong with a byte being 8”

    Nothing much unless you want to be pedantic:

    The byte is a unit of digital information in computing and telecommunications that most commonly consists of eight bits. (…) The term octet is used to unambiguously specify a size of eight bits, and is used extensively in protocol definitions, for example.

  3. My hazy memory says that I think there were some early platforms where a byte wasn’t eight bits, but then again the rational part of my brain says that we should just forget that ever happened 🙂

    Paul.

  4. Language isn’t shaped by dictionaries or national committees — or in this case, industry standards: it’s shaped by people and how they actually use the words. So in this particular case, if you use the word “byte” to mean anything else than a set of 8 bits, good luck getting anyone else to understand what you mean, standards be damned.

  5. So if a hard-drive manufacturer advertises a 1TB hard drive, which actually holds only 1.25 * 10^10 octets, can they legally defend themselves by arguing that their drive operates on only one bit at a time?

    Nope.

  6. The Sperry 1100/2200 series had 36 bit words, and so had 9 bit bytes. Also earlier large DEC systems.

    However, my understanding (with no references!) is that we use the word octet because the word byte sounds rude in French.

  7. What about ISO/IEC 80000-13? That sets byte at 8, but uses KiB for 1024 bytes vs. kB for 1000 bytes.

  8. >IEC 80000-13:2008RSS
    >Quantities and units — Part 13: >Information science and technology

    >Media and price

    >Format Price Language
    >PDF CHF 154,00

    They obviously don’t want this standard to be enforced. Who would pay CHF 154 to know that byte has 8 bits?

  9. It was me above. A lot of code will blow up, if the number of bits in the byte changes. In this sense, the current definition of the byte is very fundamental.

  10. Accordind the ISO/IEC 80000-13, the bit or byte as signed by “b” (lower case), because B (upper) is the Bell ( measurement unit, and K (upper) refer a Kelvin (temperature). Kilo is k (lower). So, KB it’s Kelvin Bell unit (kkk), and Kb, kB are incorrects forms to describe informatic storage units.

    1. Bytes of sizes other than 8 bits are really an anachronism now and are unlikely to make a comeback.

      In practice, ‘octet’ is largely a European continental thing and is used by standards bodies with a significant European influence. In French it is a common everyday word.

Leave a Reply

Your email address will not be published.

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

You may subscribe to this blog by email.