Java's displacement symbol

Source: Internet
Author: User
<< is the left symbol, column x<<1, is the content of X left one (the contents of x does not change) >> is the symbol bit of the right move symbol, X>>1 is the content of X to move to the right one, if the beginning is 1 to fill 1, is 0 responsibility to complement 0, ( The contents of x do not change). >>> is the right move without a sign bit, x>>>1 is the contents of X to the right one, the beginning of the 0 (x content does not change) the displacement operator can only be used for byte,short,char,int,long types. For operands below int type, the first is automatically converted to int and then offset, and the displacement can not be greater than 31, for the displacement system to do the first 32 of the model, the result is the real displacement, because the type of int is 4 bytes, that is 32 bits, moving 32 bits will have no meaning. For long is modulo 64.

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.