Link to home
Start Free TrialLog in
Avatar of PaultheBroker
PaultheBrokerFlag for Afghanistan

asked on

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

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
Avatar of Sean Stuber
Sean Stuber

"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.
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial