Main Page | See live article | Alphabetical index

Byte

A byte is commonly used as a unit of storage measurement in computers. It is one of the basic integral data types in computing. The byte is often used to specify the size or amount of computer memory or storage, regardless of the type of data stored in it. Such numbers can get very large, which lead to the use of prefixes.

A byte has several meanings, all closely related:

  1. A contiguous sequence of a fixed number of bits. On modern computers, an eight-bit byte is by far the most common. Certain older models have used six-, seven-, or nine-bit bytes -- for instance on the 36-bit architecture of the PDP-10. A byte is always atomic on the system, meaning that it is the smallest addressable unit. An eight-bit byte can hold 256 possible values (28 = 256) -- enough to store an unsigned integer ranging from 0 to 255, a signed integer from -128 to 127, or an extended ASCII character.
  2. A contiguous sequence of bits that comprises a sub-field of a longer sequence known as a word. On some computers it is possible to address bytes of arbitrary length. This usage is reflected, for example, in LDB and DPB assembly instructions for field extraction on a PDP-10, which survive as bytewise operations in Common Lisp; and in the six-bit bytes of the IBM 1401.
  3. A datatype in certain programming languages. C for example defines byte to be synonymous with unsigned char -- an integer datatype capable of holding at least 256 different values.

The term byte was coined by Werner Buchholz in 1956 during the early design phase for the IBM Stretch computer. Originally it was described as one to six bits; typical I/O equipment of the period used six-bit units. The move to an eight-bit byte happened in late 1956, and this size was later adopted and promulgated as a standard by the System/360. The word was coined by mutating the word bite so it would not be accidentally misspelled as bit.

The eight-bit byte is often called an octet in formal contexts such as industry standards, as well as in networking. This is also the word used for the eight-bit quantity in many non-English languages, where the pun on bite does not translate.

Half of an eight-bit byte (four bits) is sometimes called (playfully) a nibble (sometimes spelled nybble) or more formally a hex digit. The nibble is often called a semioctet in a networking context and also by some standards organisations.

As a unit of measure, bytes is abbreviated as B; hence MB for megabytes. Likewise, the lowercase b is used for bits: hence, a 5 Mb/s network segment carries five megabits per second, while a 90 GB hard drive carries 90 gigabytes. Computer memory and storage are usually denominated in bytes, while network speed is denominated in bits, and parallel bus speed in hertz.

Standards organizations have proposed binary prefixes for the powers of two often used as multiples of bytes, e.g., mebibyte rather than megabyte for 220 bytes -- but these have not caught on in common usage.

A comparative table of base-10 and base-2 bytes

Note that as the size increases, the proportion between the binary and decimal version of the size increases. The thirtieth binary size would be just over twice the matching decimal size.


Byte was also the name of a popular computer industry magazine, see Byte magazine.