My Java operator understands that

Source: Internet
Author: User

Basic concepts

Original code, anti-code, complement just remember these words is enough

1. The highest bit of binary is the sign bit: 0 for positive, 1 for negative

2. Positive source code, anti-code, complement all the same

3. Negative number of the anti-code = Its original code sign bit is unchanged, the other bits take the reverse

4. The complement of negative number = Its anti-code +1

5.0 of the counter code, the complement is 0

The numbers in 6.java are signed.

7 in the computer operation, are all in the form of a complement of the operation

8 The complement is reversed (the high is 1 to take the counter), the high must also take counter

The opposite is called

2&3 called with

2|3 called or

2^3 is called XOR or

1>>2 called arithmetic right shift low overflow, sign bit invariant, and sign bit to fill overflow high

1<<2 called arithmetic left shift sign bit unchanged, low fill 0

1>>>2 is called logical right shift low overflow, high fill 0

My Java operator understands that

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.