Novice First day Learning C # language (binary interchange)

Source: Internet
Author: User

We have some fears about unfamiliar or unknown things, but there are some expectations, although I am not sure I can learn the language, but I will try my best to learn.

The first day we learned the content, for most people know that the computer language is binary, but in life we use the decimal. How do you convert the binary?

For example: I have a number 72 (decimal) replaced by binary

72 divided by 2 quotient is 36 18 9 4 2 1

The resulting remainder is 0 0 1 0 0 1

Then write from left to right as 1 0 0 1 0 0

Then the binary is 100100

Binary decimal is calculated as 0x2 (1-1) +0x2 (2-1) +1x2 (3-1) +0x2 (4-1) +0x2 (5-1) +1x2 (6-1)////////formula for AX20+BX21+CX22+...+MX2 (n-1)

=8+64

=72

Decimal interchange octal and decimal interchange hexadecimal are the same (the remainder is 1-8///1-9 ABCDEF)

But the conversion to the binary (number) is also the cardinality of the

Binary cardinality 0 1

Decimal Base 0 1 2 3 4 5 6 7 8 9

Octal cardinality 0 1 2 3 4 5 6 7

Hex Cardinality 0 1 2 3 4 5 6 7 8 9 A B C D E F (A for 10)

Binary interchange octal (using right-to-left each three-bit group, not enough plus 0 8=23)

Binary 001 101 111 011

Octal 1 5 7 3

Except quotient remainder 1 101 111 11

Binary 001 101 111 011

Binary swap hexadecimal (is used per four digits 16=24)

Binary 1001 0111 0111 1001

Hex 9 7 7 9

divided by quotient remainder 1001 111 111 1001

Change binary 1001 0111 0111 1001

Novice First day Learning C # language (binary interchange)

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.