Computer Presentation: Binary Information Encoding

In the physical world, any information must be somehow presented. Reading any article (book, review, note) published on the Internet or printed on paper, we perceive text and pictures. The image that we see focuses on the retina of our eyes, in the form of electrical signals is transmitted to the brain, which recognizes familiar characters and thus receives information. In what form this information remains in our memory - in the form of images, logic circuits, or something else - may depend on the circumstances of its receipt, the set goal, and the specific way of understanding. Computer technology is more limited and works with a stream of zeros and ones (the so-called binary encoding of information).

The binary number system , which is the basis of all computer technology, was chosen historically. Even in the era of the creation of the first tube computers, engineers thought about how to encode information so that the price of the entire device would be minimal. Since the electronic lamp has two modes of action - it passes current, blocks it, the two at the heart of the calculus system seemed the most rational. In the transition to semiconductor devices, this conclusion could be revised, but the engineers went along the knurled path, preserving the binary logic of increasingly sophisticated computers. Nevertheless, semiconductor physics also allows ternary encoding of information in a computer: in addition to the lack of charge (ternary zero), it is possible to have both positive (+1) and negative (-1), which corresponds to three possible values ​​of trit - an elementary memory cell. The same can be said about electric current: direct or reverse direction or the absence of current at all (also three values).

The choice of the ternary number system would automatically solve the problem of coding negative numbers, which in the binary system is solved by introducing the so-called inversion, taking into account the first bit as a sign. The wisdom of this operation for the binary system has been written a lot both on the Internet and in the literature on the Assember language. In the case of ternary logic, a number could be written, for example, in this way: β€œ+ 00–0 + 0 + -”. Here, β€œ+” is an economical record of the value β€œ+1”, β€œ-” respectively - β€œ-1”, but zero speaks for itself. When translated into human language, the following would have happened: + 3 ^ 8 + 0 + 0 - 3 ^ 5 + 0 + 3 ^ 3 + 0 + 3 ^ 1 - 3 ^ 0 = 6561 - 243 + 27 + 3 - 1 = 6347. The advantages of ternary logic would also be apparent when working with a wide variety of data: if a monosyllabic answer is supposed to be given to a certain question, then the binary bit can carry one of two answers (yes or no), while ternary trits are already three (β€œYes”, β€œno”, β€œnot defined”). Experienced programmers remember how often it is necessary to store one answer from exactly three possible ones, so for an indefinite value you have to think up something, for example, enter an additional parameter (binary) into the system: whether it was completely determined by the current moment in time.

Binary coding of information is also inconvenient for working with graphic images. The human eye perceives three different colors: blue, green and red, as a result, each graphic pixel is encoded with four bytes, of which three indicate the intensity of the basic colors, and the fourth is considered a backup. This approach obviously reduces the effectiveness of computer graphics, but so far nothing better has been proposed.

From a mathematical point of view, a ternary computer should be the most efficient. Strict calculations are quite complicated, but their result boils down to the following statement: the efficiency of computer technology is higher, the closer its native number system to the number e (approximately equal to 2.72). It is easy to see that the triple is much closer to 2.72 than the two. One can only hope that one day the engineers responsible for the release of electronics will turn their attention to the ternary number system. Perhaps this will be the breakthrough after which artificial intelligence will be created?

Source: https://habr.com/ru/post/C7701/


All Articles