Binary to decimal converter
The binary number system today is the second most common after the decimal one, and the operation of all electronic computing devices is based on it. There are only two values in the binary system: 0 and 1, which in electronic circuits / boards corresponds to the absence and presence of charge. Binary numbers are always read one digit at a time, 1011 does not sound like “thousand eleven”, but like “one, zero, one, one”.
Properties of the binary number system
There are 35 number systems in total, and if several of them are simultaneously used in a particular calculation / study, they are marked with digital prefixes. For example, 101(2) means the number is in binary, while 6(10) is in decimal. Two more notation options are the ampersand "&" and "0b". For example, the binary number 1010(2) can be written as 0b1010 or as &1010.
When working with numbers belonging to the binary number system, a number of properties are taken into account, which include the following:
- Odd binary numbers always end in 1, and even numbers always end in 0.
- Values that are evenly divisible by 4 end with two zeros (00).
- Binary numbers that can be divided by 2(k) end in k zeros.
- Values of the form 2(k) in binary are displayed as one followed by k zeros.
- Values like 2(k) − 1 are written as k ones.
Thus, 16 can be represented as 2^4 or as 10000(2), and 15 as 2^4 − 1 or as 1111(2). The computer automatically perceives the binary code 1111 as the number 15, and the code 10000 as the number 16. The first corresponds to four cells with an electric charge, and the second to five cells, the first of which is charged, and the rest are not. Bits / bytes of information recorded on a hard disk or flash memory can act as cells.
Pros and cons of the binary system
The importance of the binary number system cannot be overestimated, since it was it that made it possible to process huge amounts of information in a short time on electronic computing devices working with binary code. The advantages of this system include:
- High data processing speed. It is much easier for a computer to process binary than decimal numbers.
- Simplified mathematical operations for addition and multiplication. Binary tables take up much less space than decimal tables.
- Compatibility with technical devices / devices that perceive only two values: "on" or "off", "charged" or "no charge", "magnetic field present" or "no magnetic field".
From a technical point of view, the binary system is ideal, but for humans it is too complicated to use. It is difficult for us to understand that 17 corresponds to 10001, 46 - 101110, 148 - 10010100. And even more so - it is impossible to remember this for every existing decimal number. The binary number system has other disadvantages:
- The same number written in binary and decimal systems will have more digits in the first case.
- Ending decimals, when converted to binary, get an infinite number series.
In everyday life, we do not need a binary system, and the need for it arose relatively recently - after the invention of electricity, and until then, displaying data in the form of zeros and ones was purely experimental.
Historical stages of development
Although the binary number system was not actively used until after the 17th century, there is evidence that it existed even at the dawn of civilizations. So, the Indian mathematician Pingala in 200 BC developed a system by which textual information could be converted into a binary code, and each letter had its own binary value.
Ancient Incas more than a thousand years ago used the quipu script, in which, in addition to decimal numbers, binary numbers were present. And in the ancient Chinese “Book of Changes”, or “I Ching”, dated to the 11th century, 64 hexagrams and 8 trigrams are depicted, corresponding to 6-bit and 3-bit numbers, respectively. The binary system for displaying information in the Middle Ages also existed in Africa - in the traditional divination of many tribes, for example - in Ifa divination.
In the 17th century, the German scientist Gottfried Wilhelm Leibniz, in his scientific work Explication de l'Arithmétique Binaire, described the binary system in detail, bringing it to its final form - the one that still exists. In his studies, he relied on the Chinese "Book of Changes" of the 11th century, which made a strong impression on Leibniz. He called it "a major Chinese achievement in philosophical mathematics" and believed that its author Shao Yong was ahead of his time.
The English mathematician George Boole is considered to be the father of mathematical logic. A branch of mathematical logic, Boolean algebra (algebra of logic), is named after him. In 1848, George Boole published an article on the principles of mathematical logic - "Mathematical Analysis of Logic, or an Experience in the Calculus of Deductive Inferences", and in 1854 his main work appeared - "Investigation of the laws of thought, on which the mathematical theories of logic and probability are based." In it, the mathematician described algebraic number systems in relation to logic, and laid the foundation for the development of simple, and later increasingly complex electronic logic circuits.
In the 20th century, research on the binary system continued, and in 1937, American engineer Claude Shannon combined binary arithmetic and Boolean algebra, applying them in tandem to electronic relays and switches. The work of all modern electronic computing devices is, in fact, based on Shannon's research. In the same 1937, the Model K binary digital computer was created, which by 1940, after a series of upgrades, could already calculate complex numbers. Its creator, George Stibitz, for the first time gave a command to a computing device remotely: over a telephone line, thereby opening up horizons for the further creation and development of the Internet.
Summing up, we can say that from an insignificant and highly specialized, the binary system has become the most popular and widespread (in second place after the decimal) in just 150-200 years. Today, the operation of all computing devices is based on it, from push-button calculators to server stations.