What is the fastest way to calculate 2 of the 16-time square?

Source: Internet
Author: User

Tag: Represents the binary Java bit Operation shift Operation nbsp Topic Direct Brackets

The fastest operation in the computer is the direct binary operation,

In Java, it is possible to perform binary operations in the preferred bit operation.

The problem is to investigate the shift operation, to understand, left to move <<, which means multiplication, right shift >>

Like the 2 binary 0000 0010, if the left shift 1 is equivalent to (2) * *, the left Shift 2 is equivalent to (2), the left 3 is equivalent to (2) *8,,,,, 2 in parentheses is the original number

So as long as it's multiplied by 2, it can be calculated by shifting.

The answer to that question is, of course,

2<<4

What is the fastest way to calculate 2 of the 16-time square?

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.