Binary Conversion, Binary Conversion

Source: Internet
Author: User

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;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.