Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


What is the best way to store a bitmask with over 2,000 bits (10^600)

Posted on 2010-01-08
Medium Priority
Last Modified: 2012-08-13
I want to use a bitmask to hold over 2000 binary states.  So I'm reckoning that I'm going to need a field that is at least 2000 bits long (i.e. 2^2000 or 10^602) .  Inbuilt numbers in oracle have a scale of -84 to +127, so thats not going to be big enough, I think...

Because one of the cool things about bitmasks is the ability to do quick bitwise compairsons to check for on/off, I was hoping to have the db treat this bitmask as a number.  Of course I could be missing something...

Other alternatives I though of would be to split the single bitmask into several smaller ones - in which case this question reverts to - "what is the largest bit number i can store"

I'm using Oracle 11g...Thanks!....Paul
Question by:PaultheBroker
LVL 74

Expert Comment

ID: 26210637
"what is the largest bit number i can store"

the largest integer is number(38,0)   meaning 38 decimal digits
which translates to 127 bits but only 126 of which are fully useable.
LVL 43

Accepted Solution

pcelba earned 2000 total points
ID: 26211131
You could use RAW data type - ideal for bitwise oriented data.

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question