Binary original code, reverse code (done), and reverse code

Source: Internet
Author: User

Binary original code, reverse code (done), and reverse code

In one case, you can understand the source code, reverse code, and complement code.

First, write down the following seven rules:

For signed,

1. The highest bit of binary is the sign bit;

(0 indicates a positive number, and 1 indicates a negative number)

2. The original codes, backcodes, and supplementary codes of positive numbers are the same;

3. Negative negative anticode = the symbol bit of the original code remains unchanged, and the others are reversed (0 is changed to and 0 );

4. complement the negative number = its anticode + 1;

5.0 of the reverse code, and the completion code is 0;

6. Java has no unsigned number. In other words, the number in Java is signed;

7. During computation on the computer, the computation is based on the complement code. (This sentence indicates that we have to switch between the two to demonstrate the computing process. Bitter smile)

The following is a demo of Computing: 1-2.

Interesting ~~

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.