In digital computing and telecommunications, a unit of information is the capacity of some standard data storage system or communication channel, used to measure the capacities of other systems and channels. In information theory, units of information are also used to measure information contained in messages and the entropy of random variables.
The most commonly used units of data storage capacity are the bit, the capacity of a system that has only two states, and the byte (or octet), which is equivalent to eight bits. Multiples of these units can be formed from these with the SI prefixes (power-of-ten prefixes) or the newer IEC binary prefixes (power-of-two prefixes).
In 1928, Ralph Hartley observed a fundamental storage principle, which was further formalized by Claude Shannon in 1945: the information that can be stored in a system is proportional to the logarithm of N possible states of that system, denoted . Changing the base of the logarithm from b to a different number c has the effect of multiplying the value of the logarithm by a fixed constant, namely .Therefore, the choice of the base b determines the unit used to measure information. In particular, if b is a positive integer, then the unit is the amount of information that can be stored in a system with b possible states.
When b is 2, the unit is the shannon, equal to the information content of one "bit" (a portmanteau of binary digit). A system with 8 possible states, for example, can store up to bits of information. Other units that have been named include:
Several conventional names are used for collections or groups of bits.
Historically, a byte was the number of bits used to encode a character of text in the computer, which depended on computer hardware architecture, but today it almost always means eight bits – that is, an octet. An 8-bit byte can represent 256 (28) distinct values, such as non-negative integers from 0 to 255, or signed integers from −128 to 127. The IEEE 1541-2002 standard specifies "B" (upper case) as the symbol for byte (IEC 80000-13 uses "o" for octet in French, but also allows "B" in English). Bytes, or multiples thereof, are almost always used to specify the sizes of computer files and the capacity of storage units. Most modern computers and peripheral devices are designed to manipulate data in whole bytes or groups of bytes, rather than individual bits.
A group of four bits, or half a byte, is sometimes called a nibble, nybble or nyble. This unit is most often used in the context of hexadecimal number representations, since a nibble has the same number of possible values as one hexadecimal digit has.
Computers usually manipulate bits in groups of a fixed size, conventionally called words. The number of bits in a word is usually defined by the size of the registers in the computer's CPU, or by the number of data bits that are fetched from its main memory in a single operation. In the IA-32 architecture more commonly known as x86-32, a word is 32 bits, but other past and current architectures use words with 4, 8, 9, 12, 13, 16, 18, 20, 21, 22, 24, 25, 29, 30, 31, 32, 33, 35, 36, 38, 39, 40, 42, 44, 48, 50, 52, 54, 56, 60, 64, 72 bits or others.
Some machine instructions and computer number formats use two words (a "double word" or "dword"), or four words (a "quad word" or "quad").
Computer memory caches usually operate on blocks of memory that consist of several consecutive words. These units are customarily called cache blocks, or, in CPU caches, cache lines.
Virtual memory systems partition the computer's main storage into even larger units, traditionally called pages.
See main article: article and Binary prefix. Terms for large quantities of bits can be formed using the standard range of SI prefixes for powers of 10, e.g., kilo = 103 = 1000 (as in kilobit or kbit), mega = 106 = (as in megabit or Mbit) and giga = 109 = (as in gigabit or Gbit). These prefixes are more often used for multiples of bytes, as in kilobyte (1 kB = 8000 bit), megabyte (1 MB =), and gigabyte (1 GB =).
However, for technical reasons, the capacities of computer memories and some storage units are often multiples of some large power of two, such as 228 = bytes. To avoid such unwieldy numbers, people have often repurposed the SI prefixes to mean the nearest power of two, e.g., using the prefix kilo for 210 = 1024, mega for 220 =, and giga for 230 =, and so on. For example, a random access memory chip with a capacity of 228 bytes would be referred to as a 256-megabyte chip. The table below illustrates these differences.
Symbol | Prefix | SI Meaning | Binary meaning | Size difference | |
---|---|---|---|---|---|
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% | |
Z | zetta | 1021 = 10007 | 270 = 10247 | 18.06% | |
Y | yotta | 1024 = 10008 | 280 = 10248 | 20.89% | |
R | ronna | 1027 = 10009 | 290 = 10249 | 23.79% | |
Q | quetta | 1030 = 100010 | 2100 = 102410 | 26.77% |
In the past, uppercase K has been used instead of lowercase k to indicate 1024 instead of 1000. However, this usage was never consistently applied.
On the other hand, for external storage systems (such as optical discs), the SI prefixes are commonly used with their decimal values (powers of 10). Many attempts have sought to resolve the confusion by providing alternative notations for power-of-two multiples. In 1998 the International Electrotechnical Commission (IEC) issued a standard for this purpose by defining a series of binary prefixes that use 1024 instead of 1000 as the main radix:
Symbol | Prefix | ||||
---|---|---|---|---|---|
Ki | kibi, binary kilo | 1 kibibyte (KiB) | 210 bytes | 1024 B | |
Mi | mebi, binary mega | 1 mebibyte (MiB) | 220 bytes | 1024 KiB | |
Gi | gibi, binary giga | 1 gibibyte (GiB) | 230 bytes | 1024 MiB | |
Ti | tebi, binary tera | 1 tebibyte (TiB) | 240 bytes | 1024 GiB | |
Pi | pebi, binary peta | 1 pebibyte (PiB) | 250 bytes | 1024 TiB | |
Ei | exbi, binary exa | 1 exbibyte (EiB) | 260 bytes | 1024 PiB |
The JEDEC memory standard JESD88F notes that the definitions of kilo (K), giga (G), and mega (M) based on powers of two are included only to reflect common usage, but are otherwise deprecated.
Some of these names are jargon, obsolete, or used only in very restricted contexts.