|
For the computer industry magazine, see Byte (magazine).
For the album by Black Dog Productions, see Bytes (album).
For the dinghy, see Byte (dinghy).
| Quantities of bytes | ||||||
|---|---|---|---|---|---|---|
| Common prefix | Binary prefix | |||||
| Name | Symbol | Decimal SI | Binary JEDEC | Name | Symbol | Binary IEC |
| kilobyte | KB/kB | 103 | 210 | kibibyte | KiB | 210 |
| megabyte | MB | 106 | 220 | mebibyte | MiB | 220 |
| gigabyte | GB | 109 | 230 | gibibyte | GiB | 230 |
| terabyte | TB | 1012 | 240 | tebibyte | TiB | 240 |
| petabyte | PB | 1015 | 250 | pebibyte | PiB | 250 |
| exabyte | EB | 1018 | 260 | exbibyte | EiB | 260 |
| zettabyte | ZB | 1021 | 270 | zebibyte | ZiB | 270 |
| yottabyte | YB | 1024 | 280 | yobibyte | YiB | 280 |
In computer science a byte (pronounced "bite", IPA: /baɪt/) is a unit of measurement of information storage, most often consisting of eight bits. In many computer architectures it is a unit of memory addressing.
Originally, a byte was a small group of bits of a size convenient for data such as a single character from a Western character set. Its size was generally determined by the number of possible characters in the supported character set and was chosen to be a submultiple of the computer\'s word size; historically, bytes have ranged from five to twelve bits. The popularity of IBM\'s System/360 architecture starting in the 1960s and the explosion of microcomputers based on 8-bit microprocessors in the 1980s has made eight bits by far the most common size for a byte. The term octet is widely used as a more precise synonym where ambiguity is undesirable (for example, in protocol definitions).
There has been considerable confusion about the meanings of SI prefixes used with the word "byte", such as kilo- (k or K) and mega- (M), as shown in the chart Quantities of bytes. Since computer memory comes in powers of 2 rather than 10, the industry used binary estimates of the SI-prefixed quantities. Because of the confusion, a contract specifying a quantity of bytes must define what the prefixes mean in terms of the contract (i.e., the alternative binary equivalents or the actual decimal values, or a binary estimate based on the actual values).
A byte is one of the basic integral data types in some programming languages, especially system programming languages.
To make the meaning of the table absolutely clear: A kibibyte is made up of 1,024 bytes. A mebibyte is made up of 1,024 x 1,024 bytes. The figures in the column using 1,024 raised to powers of 1, 2, 3, 4 and so on are in units of bytes.
Contents |
The word "byte" has two closely related meanings:
The term byte was coined by Dr. Werner Buchholz in July 1956, during the early design phase for the IBM Stretch computer.Origins of the Term "BYTE" Bob Bemer, accessed 2007-08-12TIMELINE OF THE IBM STRETCH/HARVEST ERA (1956-1961) computerhistory.org, \'1956 July ... Werner Buchholz ... Werner\'s term "Byte" first popularized\'byte catb.org, \'coined by Werner Buchholz in 1956\' Originally it was defined in instructions by a 4-bit byte-size field, allowing from one to sixteen characters (the production design reduced this to a 3-bit byte-size field, allowing from one to eight characters to be represented by a byte); typical I/O equipment of the period used six-bit bytes. A fixed eight-bit byte size was later adopted and promulgated as a standard by the System/360. The term "byte" comes from "bite," as in the smallest amount of data a computer could "bite" at once. The spelling change not only reduced the chance of a "bite" being mistaken for a "bit," but also was consistent with the penchant of early computer scientists to make up words and change spellings. A byte was also often referred to as "an 8-bit byte", reinforcing the notion that it was a tuple of n bits, and that other sizes were possible.
char integral data type must contain 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 does not matter). Various implementations of C and C++ define a "byte" as 8, 9, 16, 32, or 36 bits[1][2]. The actual number of bits in a particular implementation is documented as CHAR_BIT as implemented in the limits.h file. Java\'s primitive byte data type is always defined as consisting of 8 bits and being a signed data type, holding values from −128 to 127.
Early microprocessors, such as Intel 8008 (the direct predecessor of the 8080, and then 8086) could perform a small number of operations on four bits, such as the DAA (decimal adjust) instruction, and the "half carry" flag, that were used to implement decimal arithmetic routines. These four-bit quantities were called "nybbles," in homage to the then-common 8-bit "bytes."
Following "bit," "byte," and "nybble," there have been some analogical attempts to construct unambiguous terms for bit blocks of other sizes.nybble reference.com sourced from Jargon File 4.2.0, accessed 2007-08-12 All of these are strictly jargon, and not very common.
IEEE 1541 and Metric-Interchange-Format specify "B" as the symbol for byte (e.g. MB means megabyte), whilst IEC 60027 seems silent on the subject. Furthermore, B means bel (see decibel), another (logarithmic) unit used in the same field. The use of B to stand for bel is consistent with the metric system convention that capitalized symbols are for units named after a person (in this case Alexander Graham Bell); usage of a capital B to stand for byte is not consistent with this convention. There is little danger of confusing a byte with a bel because the bel\'s sub-multiple the decibel (dB) is usually preferred, while use of the decibyte (dB) is extremely rare.
The unit symbol "kb" with a lowercase "b" is a commonly used abbreviation for "kilobyte". Use of this abbreviation leads to confusion with the alternative use of "kb" to mean "kilobit". IEEE 1541 specifies "b" as the symbol for bit; however the IEC 60027 and Metric-Interchange-Format specify "bit" (e.g. Mbit for megabit) for the symbol, achieving maximum disambiguation from byte.
French-speaking countries sometimes use an uppercase "o" for "octet". This is not consistent with SI because of the risk of confusion with the zero, and the convention that capitals are reserved for unit names derived from proper names, such as the ampere (whose symbol is A) and joule (symbol J), versus the second (symbol s) and metre (symbol m).
Lowercase "o" for "octet" is a commonly used symbol in several non-English-speaking countries, and is also used with metric prefixes (for example, "ko" and "Mo").
The prefixes used for byte measurements are usually the same as the SI prefixes used for other measurements, but have slightly different values. The former are based on powers of 1,024 (210), a convenient binary number, while the SI prefixes are based on powers of 1,000 (103), a convenient decimal number. The table below illustrates these differences. See binary prefix for further discussion.
| Prefix | Name | SI Meaning | Binary meaning | Size difference |
|---|---|---|---|---|
| K or k | kilo | 103 = 10001 | 210 = 10241 | 2.40% |
| M | mega | 106 = 10002 | 220 = 10242 | 4.86% |
| G | giga | 109 = 10003 | 230 = 10243 | 7.37% |
| T | tera | 1012 = 10004 | 240 = 10244 | 9.95% |
| P | peta | 1015 = 10005 | 250 = 10245 | 12.59% |
| E | exa | 1018 = 10006 | 260 = 10246 | 15.29% |
In 1998, the IEC, then the IEEE, published a new standard describing binary prefixes:
| Prefix | Name | |||
|---|---|---|---|---|
| Kibi | binary kilo | 1 kibibyte (KiB) | 210 bytes | 1024 B |
| Mebi | binary mega | 1 Mebibyte (MiB) | 220 bytes | 1024 KiB |
| Gibi | binary giga | 1 Gibibyte (GiB) | 230 bytes | 1024 MiB |
| Tebi | binary tera | 1 Tebibyte (TiB) | 240 bytes | 1024 GiB |
| Pebi | binary peta | 1 Pebibyte (PiB) | 250 bytes | 1024 TiB |
| Exbi | binary exa | 1 Exbibyte (EiB) | 260 bytes | 1024 PiB |
Fractional information is usually measured in bits, nibbles, nats, or bans, where the later two are used especially in the context of information theory and not generally with computing in general.
This article is licensed under the GNU Free Documentation License. It uses material from Wikipedia