Source code-anti-code-supplemental code-transfer code

Source: Internet
Author: User
Values have positive and negative values, and the computer uses the highest bit of a number to store the symbols (0 is positive, 1 is negative ). this is the original code of the number of machines. assume that the number of digits processed by the machine is 8. that is, the word length is 1 byte, and the original code can indicate the value range is 127 ~ (-127)

Source code-anti-code-supplemental code-transfer code

Original code: binary (the first symbol at the beginning is 0 positive and 1 negative)

Anti-code: based on the original code, the symbol is not moved, and the other digits are reversed.

Complement: Based on the anticode, the operation is + 1

Shift code: Based on the complement code, the symbol bit is reversed.

101011 (Binary) --> original code 00101011 --> reverse code 01010100 --> supplemental code 01010101 --> transfer code 11010101


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.