Binary Conversion, Binary Conversion
I have always believed in the truth as a small Java hacker. It is the best thing for me to learn how to use it anytime, anywhere, at the same time, I also hope to learn from each other, communicate with each other, make common progress, and get down to the truth;
What is binary? First, we understand what is binary. Binary is composed of "0" or "1" regardless of the number of digits, such a number is binary.
Nothing can be done, so we will change him. At this time, we will have a new term, "every two goes into one, borrow one for two;" What is every two goes into one, that is, breaking 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, and 11 when the number is reached, here is 0, 1, 10, 11, 100, 101, and so on. The second is to take the previous digit to the next digit and use it as the second digit;
Now let's look at the conversion:
For example: 10001 = 1*24 + 0*23 + 0*22 + 0*2 1 + 1*20
What does it mean to use the first number to multiply the Npower of 2 (n represents the total number of digits after that number) add the second number to the power B of 2 (B represents the total number of digits after that number ).......
The power I mentioned above is the total number of digits after that number. Instead of adding them together, the power of a number is 10, so it is the power of 1*2, and 1 represents 10. After removing 1, there is only one number, which means it is a single party.
Hope to help you;