The beacon tower in ancient China was a tool for transmitting information. The beacon tower lit fireworks, indicating that the enemy was coming. Otherwise, it means that the enemy has not moved. It conveys only two kinds of information: "yes" or "no". This is the simplest communication situation, and we take it as the unit of information, which is called "1 bit". In mathematical language, that is, the information content of communication contains only two situations: 0 (smoke-free) and 1 (smoke-free) are defined as log22= 1.
Suppose there are two chimneys on the beacon tower. Chimney A indicates the enemy's situation: attack (1) or not attack (0). Chimney B indicates that our situation needs reinforcements (1) or does not need reinforcements (0). So we have four situations:
A and B.
(0,0) The enemy does not need reinforcements in the future;
(0, 1) The enemy needs reinforcements in the future;
(1, 0) The enemy invaded without reinforcements;
(1, 1) The enemy has invaded and needs reinforcements. In this way, we know more information than before, and it should contain 1og24=2 (bits).
It is easy to imagine that a beacon with three chimneys can transmit information in eight situations, namely: (0,0,0); (0,0, 1); (0, 1,0); (0, 1, 1); ( 1,0,0); ( 1,0, 1); ( 1, 1,0); ( 1, 1, 1)。 The amount of information at this time should naturally be 1og28=3 (bits).
In more complicated cases, the amount of information will change from this simplest case. Because there are only two possibilities for the simplest information, when calculating the amount of information, the most basic information value1can be obtained by taking the logarithm with the base of 2; When the information changes with y=2x, using log2y=x to calculate the information can correctly reflect the real situation of the information.
This is a detailed understanding.
Thank you, for your reference only.