HOME

TheInfoList



OR:

The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable unit of
memory Memory is the faculty of the mind by which data or information is encoded, stored, and retrieved when needed. It is the retention of information over time for the purpose of influencing future action. If past events could not be remembe ...
in many computer architectures. To disambiguate arbitrarily sized bytes from the common 8-bit definition, network protocol documents such as the
Internet Protocol The Internet Protocol (IP) is the network layer communications protocol in the Internet protocol suite for relaying datagrams across network boundaries. Its routing function enables internetworking, and essentially establishes the Internet. IP ...
() refer to an 8-bit byte as an octet. Those bits in an octet are usually counted with numbering from 0 to 7 or 7 to 0 depending on the bit endianness. The size of the byte has historically been hardware-dependent and no definitive standards existed that mandated the size. Sizes from 1 to 48 bits have been used. The six-bit character code was an often-used implementation in early encoding systems, and computers using six-bit and nine-bit bytes were common in the 1960s. These systems often had memory words of 12, 18, 24, 30, 36, 48, or 60 bits, corresponding to 2, 3, 4, 5, 6, 8, or 10 six-bit bytes, and persisted, in legacy systems, into the twenty-first century. In this era, bit groupings in the instruction stream were often referred to as '' syllables'' or ''slab'', before the term ''byte'' became common. The modern ''de facto'' standard of eight bits, as documented in ISO/IEC 2382-1:1993, is a convenient power of two permitting the binary-encoded values 0 through 255 for one byte, as 2 to the power of 8 is 256. The international standard IEC 80000-13 codified this common meaning. Many types of applications use information representable in eight or fewer bits and processor designers commonly optimize for this usage. The popularity of major commercial computing architectures has aided in the ubiquitous acceptance of the 8-bit byte. Modern architectures typically use 32- or 64-bit words, built of four or eight bytes, respectively. The unit symbol for the byte was designated as the upper-case letter B by the
International Electrotechnical Commission The International Electrotechnical Commission (IEC; ) is an international standards organization that prepares and publishes international standards for all electrical, electronics, electronic and related technologies. IEC standards cover a va ...
(IEC) and
Institute of Electrical and Electronics Engineers The Institute of Electrical and Electronics Engineers (IEEE) is an American 501(c)(3) public charity professional organization for electrical engineering, electronics engineering, and other related disciplines. The IEEE has a corporate office ...
(IEEE). Internationally, the unit '' octet'' explicitly defines a sequence of eight bits, eliminating the potential ambiguity of the term "byte". The symbol for octet, 'o', also conveniently eliminates the ambiguity in the symbol 'B' between byte and bel.


Etymology and history

The term ''byte'' was coined by Werner Buchholz in June 1956, during the early design phase for the IBM Stretch computer, which had addressing to the bit and variable field length (VFL) instructions with a byte size encoded in the instruction. It is a deliberate respelling of '' bite'' to avoid accidental mutation to '' bit''. Another origin of ''byte'' for bit groups smaller than a computer's word size, and in particular groups of four bits, is on record by Louis G. Dooley, who claimed he coined the term while working with Jules Schwartz and Dick Beeler on an air defense system called SAGE at MIT Lincoln Laboratory in 1956 or 1957, which was jointly developed by Rand, MIT, and IBM. Later on, Schwartz's language JOVIAL actually used the term, but the author recalled vaguely that it was derived from AN/FSQ-31. Early computers used a variety of four-bit binary-coded decimal (BCD) representations and the six-bit codes for printable graphic patterns common in the U.S. Army ( FIELDATA) and
Navy A navy, naval force, military maritime fleet, war navy, or maritime force is the military branch, branch of a nation's armed forces principally designated for naval warfare, naval and amphibious warfare; namely, lake-borne, riverine, littoral z ...
. These representations included alphanumeric characters and special graphical symbols. These sets were expanded in 1963 to seven bits of coding, called the American Standard Code for Information Interchange (ASCII) as the
Federal Information Processing Standard The Federal Information Processing Standards (FIPS) of the United States are a set of publicly announced standards that the National Institute of Standards and Technology (NIST) has developed for use in computer systems of non-military United Stat ...
, which replaced the incompatible teleprinter codes in use by different branches of the U.S. government and universities during the 1960s. ASCII included the distinction of upper- and lowercase alphabets and a set of control characters to facilitate the transmission of written language as well as printing device functions, such as page advance and line feed, and the physical or logical control of data flow over the transmission media. During the early 1960s, while also active in ASCII standardization, IBM simultaneously introduced in its product line of System/360 the eight-bit Extended Binary Coded Decimal Interchange Code (EBCDIC), an expansion of their six-bit binary-coded decimal (BCDIC) representations used in earlier card punches. The prominence of the System/360 led to the ubiquitous adoption of the eight-bit storage size, while in detail the EBCDIC and ASCII encoding schemes are different. In the early 1960s,
AT&T AT&T Inc., an abbreviation for its predecessor's former name, the American Telephone and Telegraph Company, is an American multinational telecommunications holding company headquartered at Whitacre Tower in Downtown Dallas, Texas. It is the w ...
introduced digital telephony on long-distance trunk lines. These used the eight-bit μ-law encoding. This large investment promised to reduce transmission costs for eight-bit data. In Volume 1 of '' The Art of Computer Programming'' (first published in 1968), Donald Knuth uses ''byte'' in his hypothetical MIX computer to denote a unit which "contains an ''unspecified'' amount of information ... capable of holding at least 64 distinct values ... ''at most'' 100 distinct values. On a binary computer a byte must therefore be composed of six bits". He notes that "Since 1975 or so, the word ''byte'' has come to mean a sequence of precisely eight binary digits...When we speak of bytes in connection with MIX we shall confine ourselves to the former sense of the word, harking back to the days when bytes were not yet standardized." The development of eight-bit
microprocessor A microprocessor is a computer processor (computing), processor for which the data processing logic and control is included on a single integrated circuit (IC), or a small number of ICs. The microprocessor contains the arithmetic, logic, a ...
s in the 1970s popularized this storage size. Microprocessors such as the Intel 8080, the direct predecessor of the 8086, could also perform a small number of operations on the four-bit pairs in a byte, such as the decimal-add-adjust (DAA) instruction. A four-bit quantity is often called a
nibble In computing, a nibble, or spelled nybble to match byte, is a unit of information that is an aggregation of four- bits; half of a byte/ octet. The unit is alternatively called nyble, nybl, half-byte or tetrade. In networking or telecommuni ...
, also ''nybble'', which is conveniently represented by a single
hexadecimal Hexadecimal (also known as base-16 or simply hex) is a Numeral system#Positional systems in detail, positional numeral system that represents numbers using a radix (base) of sixteen. Unlike the decimal system representing numbers using ten symbo ...
digit. The term '' octet'' unambiguously specifies a size of eight bits. It is used extensively in protocol definitions. Historically, the term ''octad'' or ''octade'' was used to denote eight bits as well at least in Western Europe; however, this usage is no longer common. The exact origin of the term is unclear, but it can be found in British, Dutch, and German sources of the 1960s and 1970s, and throughout the documentation of Philips mainframe computers.


Unit symbol

The unit symbol for the byte is specified in IEC 80000-13, IEEE 1541 and the Metric Interchange Format as the upper-case character B. In the
International System of Quantities The International System of Quantities (ISQ) is a standard system of Quantity, quantities used in physics and in modern science in general. It includes basic quantities such as length and mass and the relationships between those quantities. This ...
(ISQ), B is also the symbol of the '' bel'', a unit of logarithmic power ratio named after Alexander Graham Bell, creating a conflict with the IEC specification. However, little danger of confusion exists, because the bel is a rarely used unit. It is used primarily in its decadic fraction, the
decibel The decibel (symbol: dB) is a relative unit of measurement equal to one tenth of a bel (B). It expresses the ratio of two values of a Power, root-power, and field quantities, power or root-power quantity on a logarithmic scale. Two signals whos ...
(dB), for signal strength and sound pressure level measurements, while a unit for one-tenth of a byte, the decibyte, and other fractions, are only used in derived units, such as transmission rates. The lowercase letter o for octet is defined as the symbol for octet in IEC 80000-13 and is commonly used in languages such as French and Romanian, and is also combined with metric prefixes for multiples, for example ko and Mo.


Multiple-byte units

More than one system exists to define unit multiples based on the byte. Some systems are based on powers of 10, following the
International System of Units The International System of Units, internationally known by the abbreviation SI (from French ), is the modern form of the metric system and the world's most widely used system of measurement. It is the only system of measurement with official s ...
(SI), which defines for example the prefix '' kilo'' as 1000 (103); other systems are based on powers of two. Nomenclature for these systems has led to confusion. Systems based on powers of 10 use standard
SI prefix The International System of Units, internationally known by the abbreviation SI (from French ), is the modern form of the metric system and the world's most widely used system of measurement. It is the only system of measurement with official st ...
es ('' kilo'', '' mega'', ''
giga Giga- ( or ) is a metric prefix, unit prefix in the metric system denoting a factor of a Long and short scales, short-scale billion or long-scale milliard (109 or 1,000,000,000). It has the symbol G. ''Giga-'' is derived from the Ancient Greek, ...
'', ...) and their corresponding symbols (k, M, G, ...). Systems based on powers of 2, however, might use binary prefixes (''kibi'', ''mebi'', ''gibi'', ...) and their corresponding symbols (Ki, Mi, Gi, ...) or they might use the prefixes K, M, and G, creating ambiguity when the prefixes M or G are used. While the difference between the decimal and binary interpretations is relatively small for the kilobyte (about 2% smaller than the kibibyte), the systems deviate increasingly as units grow larger (the relative deviation grows by 2.4% for each three orders of magnitude). For example, a power-of-10-based terabyte is about 9% smaller than power-of-2-based tebibyte.


Units based on powers of 10

Definition of prefixes using powers of 10—in which 1 ''kilobyte'' (symbol kB) is defined to equal 1,000 bytes—is recommended by the International Electrotechnical Commission (IEC).Prefixes for Binary Multiples
— The NIST Reference on Constants, Units, and Uncertainty
The IEC standard defines eight such multiples, up to 1 yottabyte (YB), equal to 10008 bytes. The additional prefixes ''ronna-'' for 10009 and ''quetta-'' for 100010 were adopted by the
International Bureau of Weights and Measures The International Bureau of Weights and Measures (, BIPM) is an List of intergovernmental organizations, intergovernmental organisation, through which its 64 member-states act on measurement standards in areas including chemistry, ionising radi ...
(BIPM) in 2022. This definition is most commonly used for data-rate units in
computer network A computer network is a collection of communicating computers and other devices, such as printers and smart phones. In order to communicate, the computers and devices must be connected by wired media like copper cables, optical fibers, or b ...
s, internal bus, hard drive and flash media transfer speeds, and for the capacities of most storage media, particularly
hard drive A hard disk drive (HDD), hard disk, hard drive, or fixed disk is an electro-mechanical data storage device that stores and retrieves digital data using magnetic storage with one or more rigid rapidly rotating hard disk drive platter, pla ...
s, flash-based storage, and DVDs.
Operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
s that use this definition include
macOS macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
, iOS, Ubuntu, and
Debian Debian () is a free and open-source software, free and open source Linux distribution, developed by the Debian Project, which was established by Ian Murdock in August 1993. Debian is one of the oldest operating systems based on the Linux kerne ...
. It is also consistent with the other uses of the
SI prefix The International System of Units, internationally known by the abbreviation SI (from French ), is the modern form of the metric system and the world's most widely used system of measurement. It is the only system of measurement with official st ...
es in computing, such as CPU clock speeds or measures of performance. The IBM System 360 and the related disk and tape systems set the byte at 8 bits and documented capacities in decimal units. The early 8-, 5.25- and 3.5-inch floppies gave capacities in multiples of 1024, using "KB" rather than the more accurate "KiB". The later, larger, 8-, 5.25- and 3.5-inch floppies gave capacities in a hybrid notation, i.e., multiples of 1024,000, using and Early 5.25-inch disks used decimal even though they used 128-byte and 256-byte sectors. Hard disks used mostly 256-byte and then 512-byte before 4096-byte blocks became standard. RAM was always sold in powers of 2.


Units based on powers of 2

A system of units based on powers of 2 in which 1 kibibyte (KiB) is equal to 1,024 (i.e., 210) bytes is defined by international standard IEC 80000-13 and is supported by national and international standards bodies ( BIPM, IEC, NIST). The IEC standard defines eight such multiples, up to 1 yobibyte (YiB), equal to 10248 bytes. The natural binary counterparts to ''ronna-'' and ''quetta-'' were given in a consultation paper of the International Committee for Weights and Measures' Consultative Committee for Units (CCU) as ''robi-'' (Ri, 10249) and ''quebi-'' (Qi, 102410), but have not yet been adopted by the IEC or ISO. An alternative system of nomenclature for the same units (referred to here as the ''customary convention''), in which 1 ''kilobyte'' (KB) is equal to 1,024 bytes, 1 ''megabyte'' (MB) is equal to 10242 bytes and 1 ''gigabyte'' (GB) is equal to 10243 bytes is mentioned by a 1990s JEDEC standard. Only the first three multiples (up to GB) are mentioned by the JEDEC standard, which makes no mention of TB and larger. While confusing and incorrect, the customary convention is used by the
Microsoft Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
operating system and random-access memory capacity, such as main memory and
CPU cache A CPU cache is a hardware cache used by the central processing unit (CPU) of a computer to reduce the average cost (time or energy) to access data from the main memory. A cache is a smaller, faster memory, located closer to a processor core, whi ...
size, and in marketing and billing by telecommunication companies, such as
Vodafone Vodafone Group Public Limited Company () is a British Multinational company, multinational telecommunications company. Its registered office and global headquarters are in Newbury, Berkshire, England. It predominantly operates Service (economic ...
,
AT&T AT&T Inc., an abbreviation for its predecessor's former name, the American Telephone and Telegraph Company, is an American multinational telecommunications holding company headquartered at Whitacre Tower in Downtown Dallas, Texas. It is the w ...
, Orange and
Telstra Telstra Group Limited is an Australian telecommunications company that builds and operates telecommunications networks and markets related products and services. It is a member of the S&P/ASX 20 stock index, and is Australia's largest telecomm ...
. For storage capacity, the customary convention was used by macOS and iOS through Mac OS X 10.5 Leopard and iOS 10, after which they switched to units based on powers of 10.


Parochial units

Various computer vendors have coined terms for data of various sizes, sometimes with different sizes for the same term even within a single vendor. These terms include ''double word'', ''half word'', ''long word'', ''quad word'', ''slab'', ''superword'' and ''syllable''. There are also informal terms. e.g., ''half byte'' and ''nybble'' for 4 bits, ''octal K'' for .


History of the conflicting definitions

Contemporary computer memory has a binary architecture making a definition of memory units based on powers of 2 most practical. The use of the metric prefix ''kilo'' for binary multiples arose as a convenience, because is approximately . This definition was popular in early decades of
personal computing A personal computer, commonly referred to as PC or computer, is a computer designed for individual use. It is typically used for tasks such as word processing, internet browsing, email, multimedia playback, and gaming. Personal computers ar ...
, with products like the Tandon 5-inch DD floppy format (holding bytes) being advertised as "360 KB", following the -byte convention. It was not universal, however. The Shugart SA-400 5-inch floppy disk held 109,375 bytes unformatted, and was advertised as "110 Kbyte", using the 1000 convention. Likewise, the 8-inch DEC RX01 floppy (1975) held bytes formatted, and was advertised as "256k". Some devices were advertised using a ''mixture'' of the two definitions: most notably, floppy disks advertised as "1.44 MB" have an actual capacity of , the equivalent of 1.47 MB or 1.41 MiB. In 1995, the
International Union of Pure and Applied Chemistry The International Union of Pure and Applied Chemistry (IUPAC ) is an international federation of National Adhering Organizations working for the advancement of the chemical sciences, especially by developing nomenclature and terminology. It is ...
's (IUPAC) Interdivisional Committee on Nomenclature and Symbols attempted to resolve this ambiguity by proposing a set of binary prefixes for the powers of 1024, including kibi (kilobinary), mebi (megabinary), and gibi (gigabinary). In December 1998, the IEC addressed such multiple usages and definitions by adopting the IUPAC's proposed prefixes (kibi, mebi, gibi, etc.) to unambiguously denote powers of 1024. Thus one kibibyte (1 KiB) is 10241 bytes = 1024 bytes, one mebibyte (1 MiB) is 10242 bytes = bytes, and so on. In 1999, Donald Knuth suggested calling the kibibyte a "large kilobyte" (''KKB'').


Modern standard definitions

The IEC adopted the IUPAC proposal and published the standard in January 1999. The IEC prefixes are part of the
International System of Quantities The International System of Quantities (ISQ) is a standard system of Quantity, quantities used in physics and in modern science in general. It includes basic quantities such as length and mass and the relationships between those quantities. This ...
. The IEC further specified that the kilobyte should only be used to refer to bytes.


Lawsuits over definition

Lawsuits arising from alleged consumer confusion over the binary and decimal definitions of multiples of the byte have generally ended in favor of the manufacturers, with courts holding that the legal definition of gigabyte or GB is 1 GB = (109) bytes (the decimal definition), rather than the binary definition (230, i.e., ). Specifically, the United States District Court for the Northern District of California held that "the U.S. Congress has deemed the decimal definition of gigabyte to be the 'preferred' one for the purposes of 'U.S. trade and commerce' ..The California Legislature has likewise adopted the decimal system for all 'transactions in this state. Earlier lawsuits had ended in settlement with no court ruling on the question, such as a lawsuit against drive manufacturer Western Digital. Western Digital settled the challenge and added explicit disclaimers to products that the usable capacity may differ from the advertised capacity. Seagate was sued on similar grounds and also settled.


Practical examples


Common uses

Many
programming language A programming language is a system of notation for writing computer programs. Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
s define the
data type In computer science and computer programming, a data type (or simply type) is a collection or grouping of data values, usually specified by a set of possible values, a set of allowed operations on these values, and/or a representation of these ...
''byte''. The C and C++ programming languages define ''byte'' as an "addressable unit of data storage large enough to hold any member of the basic character set of the execution environment" (clause 3.6 of the C standard). The C standard requires that the integral data type '' unsigned char'' must hold at least 256 different values, and is represented by at least eight bits (clause 5.2.4.2.1). Various implementations of C and C++ reserve 8, 9, 16, 32, or 36 bits for the storage of a byte. In addition, the C and C++ standards require that there be no gaps between two bytes. This means every bit in memory is part of a byte. Java's primitive data type ''byte'' is defined as eight bits. It is a signed data type, holding values from −128 to 127.
.NET The .NET platform (pronounced as "''dot net"'') is a free and open-source, managed code, managed computer software framework for Microsoft Windows, Windows, Linux, and macOS operating systems. The project is mainly developed by Microsoft emplo ...
programming languages, such as C#, define ''byte'' as an unsigned type, and the ''sbyte'' as a signed data type, holding values from 0 to 255, and −128 to 127, respectively. In data transmission systems, the byte is used as a contiguous sequence of bits in a serial data stream, representing the smallest distinguished unit of data. For
asynchronous communication In telecommunications, asynchronous communication is transmission of data, generally without the use of an external clock signal, where data can be transmitted intermittently rather than in a steady stream. Any timing required to recover data fro ...
a full transmission unit usually additionally includes a start bit, 1 or 2 stop bits, and possibly a parity bit, and thus its size may vary from seven to twelve bits for five to eight bits of actual data. For synchronous communication the error checking usually uses bytes at the end of a frame.


See also

*
Data Data ( , ) are a collection of discrete or continuous values that convey information, describing the quantity, quality, fact, statistics, other basic units of meaning, or simply sequences of symbols that may be further interpreted for ...
*
Data hierarchy Data hierarchy refers to the systematic organization of data, often in hierarchical form. Data organization involves characters, fields, records, files and so on. This concept is a starting point when trying to see what makes up data and whether da ...
*
Nibble In computing, a nibble, or spelled nybble to match byte, is a unit of information that is an aggregation of four- bits; half of a byte/ octet. The unit is alternatively called nyble, nybl, half-byte or tetrade. In networking or telecommuni ...
*
Octet (computing) The octet is a unit of digital information in computing and telecommunications that consists of eight bits. The term is often used when the term '' byte'' might be ambiguous, as the byte has historically been used for storage units of a varie ...
* Primitive data type * Tryte * Word (computer architecture)


Notes


References


Further reading

* * Ashley Taylor. "Bits and Bytes". Stanford. https://web.stanford.edu/class/cs101/bits-bytes.html {{Authority control Data types Units of information Binary arithmetic Computer memory Data unit Primitive types 1950s neologisms 8 (number)