Home>Article> How to understand binary

How to understand binary

Linda Hamilton
Linda Hamilton Original
2019-06-14 16:45:49 79697browse

Binary is a number system widely used in computing technology. It was invented by Leibniz, the German master of mathematical philosophy in 1679. Binary data is a number represented by two digits, 0 and 1. Its base is 2, the carry rule is "when two are entered, one is added", and the borrowing rule is "borrow one to be equal to two". The current computer system basically uses a binary system, and data is mainly stored in computers in the form of two's complement codes. The binary system in the computer is a very tiny switch, with "on" representing 1 and "off" representing 0.

How to understand binary

The invention and application of computers in the 20th century is known as one of the important symbols of the third technological revolution, because digital computers can only recognize and process information generated by A code composed of 0'.'1' symbol string. Its operation mode is binary. The 19th century Irish logician George Boole's thinking process on logical propositions was transformed into some algebraic calculation of the symbols "0''.''1". Binary is a carry system where 2 is the digit. 0 and 1 are the basic operators. .Because it only uses two digital symbols 0 and 1, it is very simple and convenient, and easy to implement electronically. (Recommended learning:PHP video tutorial)

Binary calculation method Features:

① Binary numbers only have two digits "0" and "1", the base is 2, and the largest number is 1;

② Adopt the principle of every two into one .

The binary bit weight is generally expressed as: 2^(n-1). The weight of each bit is the power of base 2. For example, (01101010) the weight of each bit is 2^7 , 2^6, 2^5, 2^4,

2^3, 2^2, 2^1, 2^0.

The four arithmetic rules of binary numbers, division Except for carry and borrow bits, they are the same as decimal numbers.

The advantages of binary are:

(1) Binary only has two digits "0" and "1", which is easy Representation. The high and low voltage, the cut-off and saturation of the transistor, the magnetization direction of the magnetic material, etc. can all be expressed as "0" and "1" states.

(2) Each bit of a binary number has only two states: 0 and 1, and only two devices are needed to represent it, so binary numbers save equipment. Because the states are simple, they have strong anti-interference and high reliability.

Binary The main disadvantage is that the digits are too long, which is inconvenient to read and write, and people are not used to it. For this reason, octal and hexadecimal are often used as binary abbreviations.

In order to adapt to people's habits, they are usually used in computers Binary numbers, input and output use decimal numbers, and the computer completes the conversion between binary and decimal.

The binary system was indeed invented by Leibniz.

There is a popular view that The binary system comes from Chinese gossip, but this has long been falsified. Guo Shuchun pointed out on page 461 of the book "Liu Hui, the Master of Mathematics in the Ancient World": "There is a saying in China that the binary system was created by the Zhouyi. As for Leibniz who was inspired by the "Book of Changes" The myth that the binary system was created and used in computers was influenced by the Eight Trigrams of the Book of Changes, and it is even more widely circulated. The fact is that Leibniz first invented the binary system, and later saw the Bagua of the Book of Changes rearranged by Song Dynasty scholars brought back by missionaries, and found that the Bagua could be explained by his binary system. "Therefore, it was not Leibniz who invented the binary system after seeing the Yin and Yang Bagua. Pages 14 to 18 of Liang Zong's masterpiece "Allusions to the History of Mathematics" have a more detailed examination of this historical case.More PHP For related technical articles, please visit the

PHP Graphic Tutorial

column to learn!

The above is the detailed content of How to understand binary. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What is server software Next article:What is server software