Byte

From Wikipedia

HomePage | Recent changes | View source | Discuss this page | Page history | Log in |

Printable version | Disclaimers | Privacy policy

A byte is commonly used as a unit of storage measurement in computers. It is one of the basic integral data types in computing.

A byte has several meanings, all closely related:

  1. a contiguous sequence of a fixed number of bits; 8 bit bytes are by far and away the most common though 7 bit bytes and 9 bit bytes (especially on the 36 bit architecture of the PDP-10) and so on are also used. Unqualified or in a general context byte is very likely to mean "8 bits". An 8 bit byte can hold 256 possible values ( 2 ^ 8 = 256) hence typically represented as an integer number from 0 to 255.
  2. a contiguous sequence of bits that comprises a sub-field of a longer word. This usage is reflected, for example, in LDB and DPB (assembler instructions for field extraction on a PDP-10 and now functions in Common Lisp).
  3. A datatype in certain programming languages. C for example defines byte to be synonymous with char (where it is an integer datatype capable of holding at least 256 different values).

The 8 bit byte is often called an octet in a networking context and also by some standards organisations.

Byte is often abbreviated B and sometime b, though b is incorrect as that is a better abbreviation for bit.

The name is a word-play on bit.

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.

/Talk