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 9237255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:29:46+00:00 2026-06-18T07:29:46+00:00

Would that mean that the 100th constant would have to be 1 << 100?

  • 0

Would that mean that the 100th constant would have to be 1 << 100?

  • 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-18T07:29:47+00:00Added an answer on June 18, 2026 at 7:29 am

    You can’t do it directly because maximum size for a primitive number which can be used as a bitmask is actually 64 bit for a long value. What you can do is to split the bitmask into 2 or more ints or longs and then manage it by hand.

    int[] mask = new int[4];
    final int MAX_SHIFT = 32;
    
    void set(int b) {
      mask[b / MAX_SHIFT] |= 1 << (b % MAX_SHIFT);
    }
    
    boolean isSet(int b) {
      return (mask[b / MAX_SHIFT] & (1 << (b % MAX_SHIFT))) != 0;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to be able to read any well-formed RSS/ATOM file. That would mean
By closed connection I mean that the other end closed it gracefully. I would
how would you use JQuery with asp.net Code-Behind what i mean by that: i
How do I write the formula that would mean this: If X<$999.00 then multiply
This would mean that the class was initialized, but the variables were not set.
In C to parallelize a loop with schedule(static) would mean that the chunk size
Should I start a new project for my unit tests? That would mean that
When I first heard about ASP.NET MVC, I was thinking that would mean applications
I've decided to use this.variableName when referring to string/int etc.. fields. Would that include
I would like that the Index action doesn't appear in the url. For example,

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.