Original code anti-code complement

Source: Internet
Author: User

The original code: the number of binary, such as: 10 original code 0000 1010

Anti-code: Positive number is the same as the original code, such as: 10 anti-code 0000 1010

Negative number is the original code 0 change to 0, (sign bit unchanged) such as:-10 original code 1000 1010

Anti-code 1111 0101

Complement: Positive complement is the same as the original code, such as: 10 complement 0000 1010

Negative number of the anti-code for the complement plus 1, such as:-10 anti-code: 1111 0101

Complement: 1111 0110

The numbers in the computer are stored in the complement, because the original code and the inverse code calculation is inaccurate, and the complement is accurate.

Note: Learn about Yun Zhengjie in the blog Park .

Original code anti-code complement

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.