Data types in 2_c languages (ii) binary

Source: Internet
Author: User

1.1 binary number, bit, byte and word

We are accustomed to decimal numbers: 10,12, etc.

A bit can only represent 0, or 12 states, short bit, a bit

A byte is 8 binary, called 8 bits, or byte,8 bits is a byte

A word is 2 bytes, abbreviated to Word.

Two words for double word, abbreviated DWORD

1.2 Octal

Octal system is based on the number 8, the C language 0 means octal, 0666;

1.3 Hex

The hexadecimal value 16 is the radix number system, the C language uses 0x to denote hexadecimal

Decimal

Hexadecimal

Binary

0

0

0000

1

1

0001

2

2

0010

3

3

0011

4

4

0100

Decimal conversion 8, with the decimal number as dividend, 8 as the divisor, the quotient and the remainder, until the quotient is 0, the remainder is reversed is the result of conversion

Decimal conversion 16, with the decimal number as dividend, 16 as the divisor, the quotient and the remainder, until the quotient is 0, the remainder is reversed is the result of conversion

Source: Intelligence Podcast for study only

Data types in 2_c languages (ii) binary

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.