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.

Disclaimer: Yes, I am being pedantic.

17 Comments »

  1. Actually, you should use kB (lowercase) (see http://en.wikipedia.org/wiki/Kilo-).

    Disclaimer: Yes, I am even more pedantic.

    Comment by Vincenzo M — 3/7/2012 @ 10:52

  2. @Vincenzo

    Quite true. One should write “1 kB” and not “1 KB” as I did. But you should write “1 KiB” and not “1 kiB”.

    Comment by Daniel Lemire — 3/7/2012 @ 10:56

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

    Comment by Paul W. Homer — 3/7/2012 @ 10:58

  4. @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.

    Comment by Daniel Lemire — 3/7/2012 @ 11:35

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

    Comment by Paul W. Homer — 3/7/2012 @ 12:09

  6. @Paul

    Sure, there is nothing fundamental about 8-bit systems and it could change.

    Comment by Daniel Lemire — 3/7/2012 @ 12:29

  7. That is why I prefer to use bits as a measure unit over bytes.

    Comment by Rafael Lopes — 3/7/2012 @ 13:04

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

    Comment by Vasilis Vasaitis — 3/7/2012 @ 16:14

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

    Comment by JeffE — 3/7/2012 @ 16:59

  10. Sorry, I meant 1.25 * 10^11. Math fail.

    Comment by JeffE — 3/7/2012 @ 17:00

  11. I’d suggest you to buy (and read) the excellent:

    Glossaire des unités et grandeurs de l’informatique

    by Michel Dubesset

    http://www.eyrolles.com/Informatique/Livre/glossaire-des-unites-et-grandeurs-de-l-informatique-9782841770533

    Comment by Laurent Duval — 4/7/2012 @ 14:12

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

    Comment by Jan M — 4/7/2012 @ 17:16

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

    Comment by matt mck — 5/7/2012 @ 9:32

  14. >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?

    Comment by Anonymous — 10/7/2012 @ 19:34

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

    Comment by Itman — 10/7/2012 @ 19:36

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

    Comment by EduardoC — 11/9/2012 @ 15:52

  17. @EduardoC

    So it is 1kb then?

    Comment by Daniel Lemire — 11/9/2012 @ 16:01

Leave a comment

Warning: When entering a long comment, please ensure that you make copy of your text prior to submitting it. If the server should fail or if you hit a bug, you might lose your work. I am not responsible for your lost effort.

To spammers: I carefully review every single post and make sure that spam gets deleted. You are wasting your time if you are manually entering spam using this form. Read my terms of use to see what I consider to be abusive.

Example: duo plus septem is '9'. The numbers are expressed in latin numerals but you should give your answers using ordinary digits.

 

« Blog's main page

Powered by WordPress