Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8667035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:52:25+00:00 2026-06-12T17:52:25+00:00

From [hidden link–devolved into a malicious site] When the value to be shifted (left-operand)

  • 0

From [hidden link–devolved into a malicious site]

When the value to be shifted (left-operand) is an int, only the last 5 digits of the right-hand operand are used to perform the shift. The actual size of the shift is the value of the right-hand operand masked by 31 (0x1f). Ie the shift distance is always between 0 and 31 (if shift value is > 32 shift is 32 % value)

35             00000000 00000000 00000000 00100011
31 -> 0x1f     00000000 00000000 00000000 00011111
&              -----------------------------------
Shift value    00000000 00000000 00000000 00000011   -> 3

-29            11111111 11111111 11111111 11100011
31 -> 0x1f     00000000 00000000 00000000 00011111
&              -----------------------------------
Shift value    00000000 00000000 00000000 00000011   -> 3

What does that really mean? Does it mean for right shift, the maximum you can multiply is with 32? Is this to prevent overflow?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T17:52:26+00:00Added an answer on June 12, 2026 at 5:52 pm

    It’s not that the maximum you can multiply by is 32, it’s 2^31. (Bit shifting is exponentiation, not multiplication)

    Considering that integers only have 32 bits, what would you expect to happen if you shifted by more then 31 bits anyway? You’d end up with the exact same result regardless of your input value – all of its its bits would have been shifted “off the end” – so it would serve no purpose whatsoever as an operation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to extract a value from a hidden HTML field, have somewhat figured
I need to get the value from a checkbox which is not hidden. Here
I have hidden Divs with .display-link classes that are two levels up from an
I have some link elements which are dynamically added and hidden from the page.
How can I expand a hidden on page load div from a link saying
I'm trying to get the hidden field value on click event of a link.
How to prevent Javascript Menu from getting hidden under Flash Video (SWFObject ). I
I have a form with a hidden Came from Adwords field that will be
I have a hidden property which is fetched from ebean. how do i pass
How can I delete the hidden cropped elements from a pdf from command line?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.