Bit

Share

The bit is the smallest amount of data that a computer can understand and manipulate. A single bit can only have two possible values. Think of the bit as a lamp being turned "off" or "on," except it's an extremely small lamp. We can interpret this off-on signal in various ways: "off" could mean "false," and "on" could mean "true," or "off" could mean 0 and "on" could mean 1. From this numeric interpretation comes its name: bit, a portmanteau of binary digit1, since we can interpret a set of bits as if they were a binary number, e.g. 10101010 is equal to 170 in decimal.

Diagram showing how bits and binary numbers work using lamps turned on and off as analogy.
Source: br.virtualcuriosities.com. Illustration of lamp by Ignacio javier igjav. License: CC BY-SA 3.0.

Because a bit is an extremely small amount of data, computers generally don't deal with bits directly, since that would be extremely wasteful. That is, the many hardware components, from CPUs to RAM memory to hard disks, and the software built to handle those, only work with with batches of bits at once. The basic batch we're talking about is the byte. A single byte is a batch of 8 bits and can be used to represent a number from 0 to 255 (or -128 to 127).

Modern CPUs are optimized to work with 64 bits (8 bytes) at once. As a consequence, data is often stored as more bits than it needs. For example, in programming, a boolean value is a value that is either false or true. Ideally, this value could be stored as a single bit. However, it's common for this value to be stored as 64 bits, having 1 bit to represent the value, and wasting 63 bits unnecessarily.

The physical structure of a bit varies from device to device. In essence, there's a physical object, like a hard disk or RAM stick, with some physical properties in it like electrical currents, and the measurement of the physical properties is where the bits come from. It's just like figuring out whether a lamp is on or off, but they're extremely small lamps.

It's possible for a cosmic ray from outside the Earth to affect a bit inside of a computer. These rays can go through walls, metal, and plastic, and if they hit a computer component just in the right spot where the bit is measured, it can be flipped. Not all bits are equal: 00000001 is only equal 1, but 10000000 equals 128. Depending on the bit flipped, either nothing happens, or Mario teleports through the ceiling2, or your computer stops working. The most amazing thing is that there are ways to protect critical data against random bit flips, and they're employed in computers used in spaceships, for example.

References

  1. Bit Definition & Meaning - Merriam-Webster, accessed in 2023-11-21. Cites "A Mathematical Theory of Communication," Bell System Technical Journal, vol. 27, July, 1948, p. 380: "The choice of a logarithmic base corresponds to the choice of a unit for measuring information. If the base 2 is used the resulting units may be called binary digits, or more briefly bits, a word suggested by J.W. Tukey." ↩︎
  2. Happened to a speedrunner, see How An Ionizing Particle From Outer Space Helped A Mario Speedrunner Save Time, accessed in 2023-11-22. ↩︎

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *