A byte has several meanings, all closely related:
- 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.
- 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).
- 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).
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.