Bit
A bit is the basic unit of information in computer science and information theory. A single bit has one of two values, usually written 0 and 1, which can also stand for pairs such as false and true, no and yes, or off and on.[1] Groups of bits can hold more choices, because each added bit doubles the number of possible patterns.[2]
The word, short for binary digit, was suggested by John Tukey at Bell Labs in 1946 or 1947. Claude Shannon first used it in print in 1948, in the paper that made it a unit for measuring information.[3] In that sense, one bit is the information you gain by learning the result of a choice between two equally likely options, such as a fair coin toss.[3]
Counting with bits
Shannon noted that adding one relay to a group doubles the number of its possible states. So two-state devices have states and can store bits.[2]
Here is the number of bits and is the number of different patterns they can form.
Counting the other way, choosing one of equally likely options takes bits of information.[2] Storing the choice needs a whole number of bits, so the number of bits needed is:
Here is the number of stored bits, and the brackets mean rounding up to the next whole number. When is a power of two, no rounding is needed.
- 1 bit gives 2 patterns: 0 and 1.
- 3 bits give 8 patterns, from 000 to 111.
- 8 bits, one Byte, give 256 patterns.
- A decimal digit has 10 values, so it carries about bits.[2] Storing one takes bits.
Bits as binary numbers
In a binary number, each bit is a digit whose place value is a power of two. Tukey's 1947 memo used bit in this sense, as the binary counterpart of a decimal digit.[3]
Here is the value of the number, is the bit (0 or 1) in position , and positions count from 0 at the right. For example, 1011 in binary is .
Two meanings of "bit"
The word bit names two related but different things. One is a binary digit, a slot that holds a 0 or a 1. The other is a unit of information, which the standard IEC 80000-13 calls the shannon (symbol Sh).[4][5]
| Binary digit | Unit of information | |
|---|---|---|
| What it counts | Two-state slots used to store or send data | Uncertainty that a message removes |
| Example | A byte holds 8 bits | A fair coin toss gives 1 Sh |
| Name in IEC 80000-13 | bit | shannon (Sh) |
| Typical uses | Memory size, file size, data rate | Entropy, channel capacity |
A stored bit carries at most one shannon, so there is no fixed conversion between the two.[5] It carries exactly one shannon only when its two values are equally likely.[2]
How hardware stores a bit
Any physical thing with two stable states that can be told apart can hold a bit. Shannon gave a relay and a flip-flop circuit as examples.[2]
Voltage levels
In digital circuits, a bit is a voltage on a wire, read as one of two ranges rather than as an exact value. In positive logic, a voltage in the higher range means 1 and a voltage in the lower range means 0.[6] These ranges are called logic levels.
For a TTL-compatible input, a voltage of at least 2 V reads as 1, and a voltage of at most 0.8 V reads as 0.[6] Voltages between these limits are not guaranteed to read as either value.
Memory cells
Each type of computer memory holds a bit in a different physical form.
| Memory | How one bit is held | Note |
|---|---|---|
| SRAM | Two inverters wired back to back, each holding the other in one of two states; the standard cell has six transistors | Must stay connected to power[7] |
| DRAM | Charge on a tiny capacitor, reached through one transistor | Charge leaks away; standards require it to last at least 64 ms[7] |
| Flash | Charge stored on an insulated floating gate | Keeps data without power[7] |
| Hard disk | A tiny area of the disk surface magnetized one way or the other | Each bit covers about 100 magnetic grains[8] |
In older hard disks, the magnetization pointed along the track. In perpendicular recording, it points up or down, at right angles to the disk surface.[8]
Cells with more than two states
A cell that can be set to more than two states stores more than one bit. A device with possible states has an equivalent binary storage capacity of bits.[4] So a cell with four levels holds 2 bits, and a cell with eight levels holds 3 bits, as in multi-level cell flash memory.
Units and prefixes
The bit is one of several quantities of information and storage. Its symbol is bit, and one byte (symbol B) is 8 bits.[9] IEC 80000-13 notes that, as a count of storage slots, bit is not strictly a unit but is used like one.[4]
Byte has been used for sizes other than 8 bits in the past. The standard therefore recommends using the name only for 8 bits, which it also calls an octet (symbol o).[4]
Decimal and binary prefixes
Bits and bytes take either SI prefixes, which step by powers of 10, or binary prefixes, which step by powers of 2.[4][9]
| Name | Symbol | Size |
|---|---|---|
| kilobit | kbit | bit = 1,000 bit |
| kibibit | Kibit | bit = 1,024 bit |
| megabyte | MB | B = 1,000,000 B |
| mebibyte | MiB | B = 1,048,576 B |
| gigabyte | GB | B = 1,000,000,000 B |
| gibibyte | GiB | B = 1,073,741,824 B |
The IEC first adopted the binary prefixes in an amendment to its standard IEC 60027-2, published in January 1999.[9] Before then, kilo often meant 1,024 in computing. A megabyte could mean 1,000,000 bytes, 1,048,576 bytes, or 1,024,000 bytes, the size used on the "1.44 MB" floppy disk.[9]
Bit rate
The speed of a data link is its bit rate, measured in bits per second (bit/s).[4] Telecommunications engineers use megabit per second to mean bit/s.[9]
Bits as a measure of information
Information theory measures information by how unlikely an outcome is. The less likely an outcome, the more you learn when it happens.
Information content of one outcome
The information content of an outcome is defined as:[4]
Here is the probability of , with .
- A fair coin landing heads has , so it gives 1 Sh.
- One of 8 equally likely outcomes has , so it gives 3 Sh.
- A certain outcome has , so it gives 0 Sh.
Entropy
The entropy of a source is the average information content of its outcomes.[4] With base-2 logarithms, Shannon's formula gives it in bits per symbol:[2]
Here is the probability of outcome , is the number of outcomes, and the sum runs over outcomes with .
Shannon showed two key properties.[2]
- only when one outcome is certain.
- For outcomes, is largest when all are equally likely, and then . For two outcomes, this maximum is 1 bit.
One two-valued source
For a source with two outcomes of probability and , the entropy is the binary entropy function:[2]
It peaks at 1 bit when and falls to 0 at and .[2] A stored bit that is 1 nine times out of ten has , about 0.47 Sh.
Other units of information
Choosing the base of the logarithm chooses the unit. To convert a value from base to base , multiply it by .[2]
| Unit | Log base | Conversion |
|---|---|---|
| shannon (bit) | 2 | 1 Sh ≈ 0.693 nat ≈ 0.301 Hart[4] |
| nat | 1 nat ≈ 1.443 Sh ≈ 0.434 Hart | |
| hartley (ban, decimal digit) | 10 | 1 Hart ≈ 3.322 Sh ≈ 2.303 nat[4] |
| trit[1] | 3 | 1 trit ≈ 1.585 Sh |
Each value in the last column comes from , such as .
Rates and capacity
Information rates are given in bits per second. A 32-symbol teletype that allows any sequence of symbols carries 5 bits per symbol, so at symbols per second its channel capacity is bit/s.[2]
The energy cost of erasing a bit
Landauer's principle sets a lower limit on the heat released when a bit is erased. In 1961, Rolf Landauer argued that erasing information must release heat.[10] The limit for each bit lost is:
Here is the heat released, is the Boltzmann constant, and is the temperature. At room temperature (300 K), this is about J.[10]
The limit applies to operations that are logically irreversible, meaning the input cannot be worked out from the output. Erasing a bit is one. So are logic gates such as AND, OR, NAND, and XOR, which map several inputs onto the same output.[10]
Measuring the limit
An experiment reported in 2012 used a silica bead 2 μm across, held by laser light in a trap with two wells, as a one-bit memory.[10] The bead in the left well meant 0, and in the right well meant 1.
- Lower the energy barrier between the two wells.
- Tilt the trap so the bead ends up in the right well.
- Raise the barrier again. The memory now reads 1, whatever it held before.
When each erasure was done slowly, the average heat released approached the Landauer limit.[10] The authors noted that silicon circuits then used about 1,000 times more energy per logic operation than this limit. They also noted that the principle's validity has been repeatedly questioned.[10]
The principle explains the Maxwell's demon paradox. The demon must reset its memory, and this costs more entropy than the demon removed from the gas.[10]
Quantum bits
A Qubit is the quantum version of a bit. It is a two-state quantum system whose basis states and stand for the classical values 0 and 1.[11] Unlike a bit, a qubit can also be in a superposition of both:
Here and are complex numbers. Measuring the qubit gives 0 with probability and 1 with probability , so these two values add to 1.[11]
Measurement changes the state, so and cannot be read out directly.[11] Holevo's bound implies that one qubit cannot send more than one bit of classical information. If sender and receiver share entangled qubits, superdense coding can send two classical bits with one qubit.[11]
History
The idea of measuring information came before the word bit. Shannon credited Ralph Hartley with choosing the logarithm of the number of possible messages as the measure.[2][12]
| Date | Event |
|---|---|
| 1928 | Hartley's paper "Transmission of Information" looks for a measure of information in the number of possible symbol sequences.[12] |
| 1945 | Shannon's classified Bell Labs memo "A Mathematical Theory of Cryptography" uses the word alternative for a binary choice.[3] |
| 1946 | At a Bell Labs discussion, probably over lunch, Tukey asks, "Well, isn't the word obviously bit?" Brockway McMillan recalled this happening between July and late November.[3] |
| 9 January 1947 | Tukey's memo "Sequential Conversion of Continuous Data to Digital Data" defines bit as the binary counterpart of a decimal digit.[3] |
| July 1948 | Shannon's "A Mathematical Theory of Communication" uses bits as the unit of information and credits the word to Tukey.[2] |
| 1954 | Marcel Golay proposes binit for a binary digit, keeping bit for the unit of information. The word did not catch on.[3] |
| 2008 | IEC 80000-13 lists the shannon, nat, and hartley as units of information content.[4] |
McMillan pointed out that the two early uses differ. In Tukey's memo, a bit was a digit in a binary number. Shannon used the word to count independent two-way choices, a significant extension, and his paper was probably the first open publication to use bit as a technical term.[3]
Not everyone liked the word. The science writer Lancelot Hogben wrote in 1969 that it had "nothing but irresponsible vulgarity to commend it."[3]
References
- A bit on the bit, Nature Physics, 2016.
- A Mathematical Theory of Communication, C. E. Shannon, Bell System Technical Journal, 1948.
- Anecdotes: Origin of the Term Bit, Annals of the History of Computing, 1984.
- IEC 80000-13:2008 Quantities and units, Part 13: Information science and technology, IEC, 2008.
- Unit: Bit, QUDT.
- Understanding and Interpreting Standard-Logic Data Sheets, Texas Instruments, 2016.
- Memory technologies: Status and Perspectives, Sandia National Laboratories, 2014.
- Perpendicular Magnetic Recording Technology, Western Digital (HGST), 2007.
- Definitions of the SI units: The binary prefixes, NIST.
- Experimental verification of Landauer's principle linking information and thermodynamics, Nature, 2012.
- Quantum information representation and manipulation, H. Schomerus, Lancaster University.
- Transmission of Information, R. V. L. Hartley, Bell System Technical Journal, 1928.
