Bits and Entropy: Understanding Information Through the Concept of Distinction
This article explains information theory from the basic act of telling one state apart from another. It covers three basic properties of distinction (sufficiency, contentlessness, and serving as a starting point), how bits and entropy quantify a choice, and how noise threatens reliable distinction. It also shows how a binary symmetric channel and redundant coding, such as the repetition code, keep communication reliable.
Introduction: How Much Information Can a Switch Hold?
Classic information theory textbooks often use a switch with two stable states to explain how to store one bit of information. The switch can be a relay, a flip-flop, or any component that clearly sits in one of two states. The theory does not care which state is labeled 1 and which is labeled 0, and it does not require the states to carry any meaning. It only requires that the two states can be told apart and that the system is always in exactly one of them.
Starting from this simple device, we can state a basic claim: a reliable distinction is the smallest unit of information content. A distinction is the operation of dividing a set into “this” and “that.” This article follows that line of thought in three parts: the basic properties of distinction, how bits and entropy quantify distinction, and how noise undermines distinction. Finally, we look at how these ideas take shape in computer and communication engineering.
1. What Are the Three Basic Properties of Distinction?
Sufficiency. In a finite, enumerable set, every element can be encoded as a binary string. Text, images, audio, and programs are all ultimately stored as bit strings in computers. This works because binary logic is enough to express every operation in Boolean algebra, and any finite state machine can be described by a set of Boolean functions.
This conclusion has a precondition. Continuous quantities, such as the amplitude of an analog sound, must first be sampled and quantized into a finite number of discrete values before they can be represented as bit strings. Quantization introduces error, so the result is an approximation of the original content. As long as the quantization is fine enough, the approximation is good enough for most uses.
Contentlessness. Neither side of a distinction needs a definite content of its own. One side is “this side” only because it is not the other side. The distinction itself assumes no external meaning.
In his 1948 paper “A Mathematical Theory of Communication,” Claude Shannon deliberately set semantic questions aside as outside the engineering problem. He was concerned with selecting one message from a set of possible messages. The number of possible messages and their probabilities determine the amount of information. The meaning of the message is not considered. This separation allows the theory to apply to text, codes, images, and other media, and it lets the same mathematics serve many engineering settings.
A starting point. Making a distinction requires nothing that already exists beforehand. Logically, when constructing a formal system, the first step is to draw the boundary between “belongs to” and “does not belong to.” Physically, storing information requires only a distinguishable two-state system. Therefore, distinction can serve as the starting point for reasoning and modeling without assuming a more basic entity.
2. How Do Bits Measure a Choice?
In 1928, Ralph Hartley proposed that specifying one option from several equally likely options can be measured with a logarithm. The base of the logarithm determines the unit. The unit with base 2 is the bit, and the unit with base e is the nat. Shannon adopted this measure and named the base-2 unit “binary digit,” shortened to “bit.”
When symbols occur with unequal probabilities, the average information per symbol is given by the entropy formula:
$H(X) = -\sum_{i=1}^{n} p_i \log_2 p_i$
Here, $p_i$ is the probability of the $i$-th symbol. Entropy $H(X)$ is measured in bits and represents the average information carried by each symbol from the source.
The relationship between entropy and code length is described by the source coding theorem. For a discrete memoryless source, there exists a uniquely decodable prefix code whose average code length $L$ satisfies $H(X) \le L < H(X) + 1$. If symbols are encoded in blocks, the average code length per symbol can be made arbitrarily close to $H(X)$. Conversely, the average code length of any lossless code cannot fall below the entropy. This is the bound the source coding theorem provides.
Consider a classic example. A source produces four symbols with probabilities $\frac{1}{2}, \frac{1}{4}, \frac{1}{8}, \frac{1}{8}$. Its entropy is:
$H = \frac{1}{2}\times 1 + \frac{1}{4}\times 2 + \frac{1}{8}\times 3 + \frac{1}{8}\times 3 = 1.75$ bits
Using Huffman coding, map the four symbols to 0, 10, 110, and 111. The average code length is $\frac{1}{2}\times 1 + \frac{1}{4}\times 2 + \frac{1}{8}\times 3 + \frac{1}{8}\times 3 = 1.75$ bits. The average code length equals the entropy exactly because all these probabilities are integer powers of $\frac{1}{2}$. In most cases, code lengths must be integers, so the average code length is slightly higher than the entropy, by less than 1 bit.
Hardware implementations reflect this idea directly. Hard drives distinguish 0 and 1 by magnetization direction, flash memory distinguishes states by charge, radio communication distinguishes symbols by phase shift, and optical fiber distinguishes signals by the wavelength or intensity of light. Each device is designed with two or more states that can be reliably told apart. An encoder converts complex content into bit strings, and the receiver restores them according to preset rules. The hardware does not need to understand the content. It only needs to distinguish states reliably.
3. How Can Distinction Stay Reliable Under Noise?
An ideal distinction assumes that states can be identified exactly. Real physical systems, however, are subject to noise. When the noise amplitude exceeds half the gap between two states, the receiver may misjudge and produce a bit flip.
This phenomenon can be abstracted as a binary symmetric channel, in which each bit flips with probability $p$. Shannon’s second theorem, the noisy-channel coding theorem, states that the channel capacity $C$ is determined by the maximum mutual information between input and output. As long as the information transmission rate $R$ is below $C$, there exists an encoding scheme under which the error probability can be made arbitrarily small by using sufficiently long codes. For a binary symmetric channel, the capacity is $C = 1 - H(p)$. For example, when $p = 0.1$, $H(0.1) \approx 0.469$ bits, so $C \approx 0.531$ bits. This means that each channel use can reliably carry at most about 0.53 bits of information.
This result may seem counterintuitive. Noise exists, so why is near-error-free communication possible? The answer is that coding introduces redundancy, which means extra distinctions. The simplest example is the repetition code. Each information bit is sent three times, and the receiver recovers the original bit by majority vote. This code has a rate of 1/3, and the minimum Hamming distance between any two codewords is 3. It can therefore correct any single-bit error, but it cannot correct two-bit errors.
