Current location - Training Enrollment Network - Mathematics courses - How to understand binary?
How to understand binary?
Question 1: What does binary mean? 1. This is a pure mathematical concept. The reason why it is widely used in computer science is that the current mainstream computers are based on switch-type digital circuits, that is, each digital electronic device has only two states, on or off, which can be used to represent 1 or 0. Therefore, it is most convenient to express it in binary.

In the binary system, there are only two counting symbols, 0 and 1, which are used to represent numerical values. In our most commonly used decimal system, when the value is greater than 9, we carry forward, which is represented by 10. In binary system, when the numerical value is greater than 1, we carry it, which is represented by 10. So, as long as there are enough digits, we can use binary to represent infinite numbers, just like decimal.

The following is the correspondence between decimal representation and binary representation, which is recommended to be understood carefully.

Decimal binary

0 0

1 1

2 10

3 1 1

4 100

5 10 1

6 1 10

7 1 1 1

8 1000

9 100 1

10 10 10

……

3. On the basis of the above figures, many things will be deduced from pure mathematical concepts:

* * * The number 4 in decimal is represented by 100 in binary. If you have a certain mathematical mind, you will find that it is three digits, its three digits are 1, and the square of 2 is exactly 4.

* * * The number 8 in decimal is represented by 100 in binary. If you have a certain mathematical mind, you will find that it is 4 digits, its fourth digit is 1, and the cubic of 2 is exactly 8.

* * * The value of decimal 16 is represented by binary 1000. If you have a certain mathematical mind, you will find that it is five digits, its fifth digit is 1, and the fourth power of 2 is exactly 16.

* * * * Well, let's take a more complicated number, 7. In binary system, its third bit is 1, so the second bit of 2 is 1, so its 1 power is 2, and its 1 bit is also 1.

* * * * Other values, if you have a little mathematical mind and have been tortured by high school mathematics, you should know how to try it yourself.

* * * * You will ask, how about representing a decimal number in reverse as a binary number? For example, in pure mathematics, the algorithm for representing 52 as a binary number is as follows:

The final result is: 1 10 100, don't you understand? That is, continue the division and then copy the remainder in reverse.

Third, do you want to ask why it is calculated like that? That can't be explained clearly in a few words. If I can explain it to you by answering questions, I have only two ways. One is to be exhausted, and the other is to copy big texts that may make you exhausted. Learning mathematics requires meditation, patience and interest, not to mention such abstract things. Only by looking slowly and thinking slowly can we understand its principle.

Fourth, I really want to understand it. Search for more "binary" information yourself. There are also some descriptions in Baidu Encyclopedia. See more and think more. This is only the most basic thing in mathematics, and it is not difficult to understand.

Question 2: How to understand binary? It's too difficult! Is that every two become one. Only 1, 0.

Compare it with the decimal system. Decimal system is decimal one, 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.

Question 3: What is binary and how to calculate it? Binary is a digital system widely used in computing technology. Binary data are numbers represented by 0 and 1. Its cardinal number is 2, the carry rule is "every two enters one" and the borrowing rule is "borrowing one plus two"

There are four cases: 0+0=0.

0+ 1= 1

1+0= 1

1+ 1=0

0 decimal 1.

Example 1 103 Find the sum of101(2)+1(2).

Solution:

10 1 1+ 1 1

10 1 1+ 1 1[ 1]

increase

There are four cases: 0×0=0.

1×0=0

0× 1=0

1× 1= 1

subtraction

0-0=0, 1-0= 1, 1- 1=0,0- 1= 1。

separate

0÷ 1=0, 1÷ 1= 1。

Incremental addition

A special algorithm for binary addition, subtraction, multiplication and division.

Modular addition is similar to addition, but it doesn't need carry. This algorithm is widely used in game theory.

Decimal to binary conversion in computer

The decimal fraction in a computer is obtained in binary, usually multiplied by two.

For example, 0.65 is converted to binary:

0.65 × 2 = 1.3 take 1, leave 0.3 and continue to multiply by two to round off.

0.3 × 2 = 0.6 takes 0, and the remaining 0.6 continues to be multiplied by 2 for rounding.

0.6 × 2 = 1.2 take 1, leave 0.2 and continue to multiply by two to round.

0.2 × 2 = 0.4 takes 0, and the remaining 0.4 continues to be multiplied by 2 for rounding.

0.4 × 2 = 0.8 takes 0, and the remaining 0.8 continues to be multiplied by 2 for rounding.

0.8 × 2 = 1.6 take 1, leave 0.6 and continue to multiply by two to round.

0.6 × 2 = 1.2 take 1, leave 0.2 and continue to multiply by two to round.

.......

Loop until the accuracy limit is reached (therefore, the decimal saved by the computer is usually wrong, so in programming, if you want to compare whether two decimals are equal, you can only compare whether they are equal within a certain accuracy range. )。 At this time, the decimal 0.65 can be expressed in binary as:1010011.

In addition, it is worth mentioning that in the computer, except decimal is signed, others such as binary, octal and 16 are unsigned.

In real life and counters, if the "device" representing numbers has only two states, such as the "on" and "off" of electric lights and the "on" and "off" of switches. One state indicates the number 0, and the other state indicates that the numbers 1, 1 and 1 should be equal to 2. Because there is no number 2, we can only go up by one digit, that is, we adopt the principle of "all binary ones", which is exactly the same as the principle of "all decimal ones" in decimal system.

1+ 1= 10, 10+ 1= 1 1, 1 1+ 1= 100, 100+ 1= 10 1,

10 1+ 1= 1 10, 1 10+ 1= 1 1 1, 1 1 1+ 1= 1000,……,

It can be seen that binary 10 means two, 100 means four, 1000 means eight, and 10000 means sixteen.

Binary system is also a "value system". The same number 1 represents different values with different digits. Such as 1 1 1, counting from right to left, the first 1 is one, the second1is two, the third1is four and the fourth/kloc-.

The so-called binary system is also an algorithm used in computer operations. Binary only consists of 1 and 0.

For example, when you were in the first grade, you must have heard of "carry cylinder" ("digital cylinder")! Decimalization is to bundle ten sticks into a bundle and put them into a ten-position cylinder, and bundle ten sticks into a big bundle and put them into a hundred-position cylinder. ...

The same is true of binary. When a column is full of two bits, it will put one into ten bits, when it is full of two bits, it will put one into one hundred bits, and when it is full of two bits, it will put two bits into one hundred bits ... Binary is the algorithm used by the first computer in the world. There are light bulbs in the oldest computers. When calculating, such as expressing "one", the first light bulb will light up. It means "two", the first light bulb goes out and the second light bulb comes on.

Binary means carry when it is equal to 2.

0=00000000

1=0000000 1

2=000000 10

3=000000 1 1

4=00000 100

5=00000 10 1

6=00000 1 10

7=00000 1 1 1

8=0000 1000

9=0000 100 1

10=0000 10 10

……

That is, every binary is a one, and binary is widely used in the most basic operations ...

Question 4: How to understand binary? Binary is a digital system widely used in computing technology. Binary data are numbers represented by 0 and 1. Its cardinal number is 2, the carry rule is "every two enters one", and the borrowing rule is "borrowing one as two", which was discovered by the German master of mathematical philosophy Leibniz in18th century. The current computer system basically uses a binary system. Binary data also uses the position counting method, and its bit weight is a power based on 2. For example, for binary data110.11,the order of weights is 2 2, 21,2- 1, 2-2. For N-bit integer and M-bit decimal binary data, the weighted coefficient expansion is used. It can be written as: (a (n-1) a (n-2) … a (-m)) 2 = a (n-1) × 2 (n-1)+a (n-2 )× 2 (n). +...+A (-m) × 2 (-m) binary data can generally be written as: (a (n-1) a (n-2) ... a (1) a (0). Note: 1. In the formula, aj represents the coefficient of the j-th position, which is one of 0 and 1. 2. The (n- 1) in a (n-1) is a subscript, and the input method cannot be entered, so it is enclosed in brackets to avoid confusion. 3.2 2 represents the square of 2, and so on. Example 1 102 binary data11is written as a weighting coefficient. Solution: (11) 2 = (1× 2 2)+(1× 21)+(1× 2 0)

Question 5: How to carry the binary?

Decimal system has ten basic numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.

Binary has two basic numbers: 0, 1.

It can be seen that there is no 10 in the decimal number, because the number 10 is actually the combination of 1 and 0, that is, the combination of 1 in the decimal number and 0 in the unit number, so it is.

The first 1 times 10.

add

The second 0 is multiplied by 1.

Equal to 10

If there is no 2 in the basic binary number, the order from zero to 15 is as follows:

0, 1, 10, 1 1, 100, 10 1, 1 10, 1 1 1, 1000, 100 1, 10 10, 10 1 1, 1 100, 1 10 1, 1 1 10, 1 1 1 1

For example, the binary number 1 01above1(that is, the decimal number 1 1) is the first1multiplied by 8.

add

Seconds 0 times 4

add

The third 1 times 2.

Add the fourth 1 times 1.

It is equal to decimal 1 1.

Finally, to sum up:

Decimal, full 10 decimal 1, so 8+2= 10.

Binary, all binary 1, so 1+ 1= 10.

Finally, I'll give a few random binary examples, hoping to understand the truth:

1+ 1 = 10

10+ 1 = 1 1

1 1+ 1 = 100, and the lowest bit1+1is 10. This10 is a two-digit number, and one bit/kloc is required.

10 1+ 1 = 1 10

1 1 1+ 1= 1000

10 10+ 1 1= 1 10 1

1 1 1 1+ 10 10= 1 1 1 1+ 1000+ 10= 10 1 1 1+ 10= 1 100 1

Question 6: There are 10 kinds of people in the world. How to understand the words that people know binary and don't know binary? That's not 1 0, it's binary 10, which is decimal 2.

Question 7: What does the b in binary 10 100 1b mean? B = binary, which can be understood as an identifier.

Octal means O = octal.

Hexadecimal is H = Hex.

Question 8: What does binary mean? How to understand? The first few of the five points can be said to be decimal, and the last one can be said to be decimal or binary.