| |||||||||
This article refers to the unit of binary information. Byte was also the name of a popular computer industry magazine, see Byte magazine.
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.
A byte has several meanings, all closely related:
char integral data type can hold at least 8 bits (clause 5.2.4.2.1), a byte in C is at least capable of holding 256 different values (signed or unsigned char doesn't matter). Java plays it simpler. Java's integral byte data type is always defined as consisting of 8 bits and being a signed data type, holding values from -128 to 127.
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 and telecommunication. 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 or telecommunication context and also by some standards organisations.
As a unit of measure, bytes is most often 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. A less frequent but more correct practice uses "bit" for bit and "b" for byte, because "B" stands for Bel in the International System of Units (SI). Computer memory and storage are usually denominated in bytes, while network speed is denominated in bits, and parallel bus speed in hertz.
The International Electrotechnical Commission (IEC) has 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 yet to catch on in common usage.
A comparative table of base-10 and base-2 bytes, as proposed by the IEC:
Classic:
New Proposal:
Note that as the size increases, the proportion between the binary and decimal version of the size increases.