The National Computer Grade examination two level course-C Language Programming _ 15th Chapter _ Bit operation

Source: Internet
Author: User

Original code

Also called symbol-absolute value code

The highest bit 0 indicates positive, 1 is negative, and the remaining bits is the absolute value of the number bits.

Easy to understand the original code

Subtraction complex, there are subtraction four kinds of operations, increase the complexity of the CPU

The zero representation is not unique

Not applied in the computer

Anti-code

The anti-code operation is inconvenient, nor is it applied in the computer.

Shift Code

The shift code represents the value shift n bit, n is called the shift code amount

Shift code is mainly used for the storage of floating-point number order code

Complement

Known decimal to seek binary

Binary for positive integers

Except 2, until the quotient is zero, the remainder is sorted in flashbacks.

binary with negative integers

First the positive integer corresponding to the negative number of the binary, and then all the bits are reversed, the end of the 1, not enough digits, left 1

Binary with zero

It's all 0.

Binary decimal is known

If the first is 0, it indicates a positive integer, and the common method is to ask for

If the first is 1, it indicates a negative integer, all the bits are reversed, and the end is 1, the resulting number is the absolute value of the negative.

123

The National Computer Grade examination two level course-C Language Programming _ 15th Chapter _ Bit operation

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.