Binary numbers are numbers from a binary number system with a base of 2. It is directly implemented in digital electronics and is used in most modern computing devices, including computers, mobile phones, and various kinds of sensors. We can say that all the technologies of our time are built on binary numbers.
Record numbers
Any number, no matter how large it is, is written in the binary system using two characters: 0 and 1. For example, the number 5 from the familiar decimal system in binary will be represented as 101. Binary numbers can be indicated by the prefix 0b or the ampersand (&), For example: & 101.
In all number systems, excluding the decimal, the characters are read individually, that is, taken in example 101 is read as "one zero one."
Transfer from one system to another
Programmers who constantly work with the binary number system can convert a binary number to a decimal on the fly. This can really be done without any formulas, especially if a person has an idea of how the smallest part of the computer "brain" - the bit.
The number zero also means 0, and the number one in the binary system will also be one, but what to do next, when the numbers are over? The decimal system would "suggest" in this case to introduce the term "ten", and in the binary system it would be called "deuce".
If 0 is & 0 (ampersand is the binary notation), 1 = & 1, then 2 will be denoted by & 10. The triple can also be written in two digits, it will have the form & 11, that is, one deuce and one unit. The possible combinations have been exhausted, and hundreds are entered in the decimal system at this stage, and "fours" in the binary. Four is & 100, five is & 101, six is & 110, seven is & 111. The next, larger unit of account is the figure eight.
You can notice a feature: if in the decimal system the digits are multiplied by ten (1, 10, 100, 1000 and so on), then in the binary, respectively, by two: 2, 4, 8, 16, 32. This corresponds to the size of flash cards and other drives used in computers and other devices.
What is binary code?
Numbers represented in binary notation are called binary, but non-numerical values (letters and symbols) can also be represented in this form. Thus, in numbers you can encode words and texts, though they will look not so concise, because to write just one letter you will need several zeros and ones.
But how do computers manage to read so much information? In fact, everything is simpler than it seems. People who are accustomed to the decimal number system, first convert binary numbers to more familiar ones, and only then do any manipulations with them, and computer logic is initially based on a binary number system. A unit in the technique corresponds to a high voltage, and zero corresponds to a low voltage, or for a unit there is voltage, but for zero it is completely absent.
Binary numbers in culture
It will be considered a mistake that the binary number system is a merit of modern mathematicians. Although binary numbers are fundamental to the technologies of our time, they have been used for a very long time, and in different parts of the world. A long line (unit) and an intermittent (zero) are used, encoding eight characters, meaning eight elements: sky, earth, thunder, water, mountains, wind, fire and a reservoir (mass of water). This analogue of 3-bit digits was described in the classic text of the book of Changes. The trigrams were 64 hexagrams (6-bit digits), the order of which in the book of Changes was located in accordance with the binary digits from 0 to 63.
This order was compiled in the eleventh century by the Chinese scientist Shao Yong, although there is no evidence that he really understood the binary number system as a whole.
In India, even before our era, binary numbers in a mathematical basis were also used to describe poetry, compiled by the mathematician Pingala.
Inca nodular writing (kipu) is considered the prototype of modern databases. It was they who first applied not only the binary code of the number, but also non-numeric entries in the binary system. A nodal letter to a pile is characterized not only by primary and additional keys, but also by using positional numbers, color coding, and series of data repetitions (cycles). The Incas first applied the accounting method called double entry.
The first of programmers
The binary number system, based on the numbers 0 and 1, was described by the famous scientist, physicist and mathematician, Gottfried Wilhelm Leibniz. He was fond of ancient Chinese culture and, studying the traditional texts of the book of Changes, noticed the correspondence of hexagrams to binary numbers from 0 to 111111. He admired the evidence of such achievements in philosophy and mathematics for that time. Leibniz can be called the first of programmers and information theorists. It was he who discovered that if we write groups of binary numbers vertically (one below the other), then the resulting vertical columns of numbers will regularly repeat zeros and ones. This called him to suggest that the existence of completely new mathematical laws is possible.
Leibniz also realized that binary numbers are optimal for use in mechanics, the basis of which should be the change of passive and active cycles. It was the 17th century in the courtyard, and this great scientist invented a computer on paper that worked on the basis of his new discoveries, but he quickly realized that civilization had not yet reached such technological development, and in his time the creation of such a machine would be impossible.