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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:48:12+00:00 2026-05-18T22:48:12+00:00

I have the follow: public static final int LIMIT_ONE = 1; public static final

  • 0

I have the follow:

public static final int LIMIT_ONE = 1;
public static final int TRADEABLE = (1 << 1);
public static final int SELLABLE = (1 << 2);
public static final int STORABLE = (1 << 3);
public static final int STORABLE_IN_WH = (1 << 4);
public static final int STORABLE_IN_LEGION_WH = (1 << 5);
public static final int BREAKABLE = (1 << 6);
public static final int SOUL_BOUND = (1 << 7);
public static final int UNK9 = (1 << 8);
public static final int UNK10 = (1 << 9);
public static final int UNK11 = (1 << 10);
public static final int CAN_COMPOSITE_WEAPON = (1 << 11);
public static final int BLACK_CLOUD_TRADERS = (1 << 12);
public static final int CAN_SPLIT = (1 << 13);
public static final int UNK15 = (1 << 14);
public static final int UNK16 = (1 << 15);

and I wanted to understand how it is calculated to give the follow result, for example: 12414

I am really clueless on how the bitmask work and if any one could perhaps give some tips and explain how it goes to that number I would appreciate very much.

  • 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-05-18T22:48:12+00:00Added an answer on May 18, 2026 at 10:48 pm

    The expression (1 << n) is equivalent to 2 raised to the power of n.

    When you write (1 << n) | (1 << m) this is the same as (1 << n) + (1 << m) as long as n and m are different. So you can think of it in terms of simple additions if you wish.

    The number 12414 in binary is 11000001111110 so it is the sum (or bitwise OR) of the following flags:

    TRADEABLE                1 << 1  =     2
    SELLABLE                 1 << 2  =     4
    STORABLE                 1 << 3  =     8
    STORABLE_IN_WH           1 << 4  =    16
    STORABLE_IN_LEGION_WH    1 << 5  =    32
    BREAKABLE                1 << 6  =    64
    BLACK_CLOUD_TRADERS      1 << 12 =  4096
    CAN_SPLIT                1 << 13 =  8192
    ========================================
                             Total   = 12414
    

    Note that the flags that are included correspond to the bits that are set in the binary representation of 12414, when read right-to-left.

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

Sidebar

Related Questions

I have a static method like follows public static void foo(){ final ClassA a
I have the following servlet: public class MyServlet extends HttpServlet { private static final
I have a simple class inheriting from WebControl as follow: public class Instrument :
I have the enum structure as follows: public enum MyEnum { One=1, Two=2, Three=3
I have two classes Address and Employee as follows: public class Address { public
So I have an Interface as follows public interface IMembershipProvider { bool GetUserGuidFromSSOToken(string ssoToken,
I have created a JDialog in NetBeans and a custom constructor as follows: public
So I have a class with a method as follows: public class SomeClass {
I currently have a page which is declared as follows: public partial class MyPage
New to FluentNHibernate =D I have a parent/children classes as follows: public class Parent

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.