I am trying to solve a problem that basically involves the implementation of a logical AND between an input parameter.
The complexity of the problem is related to the size of the input parameters. To give a high level overview, I am trying to implement logic similar to
100 & 100 == 100 001 & 010 == 0 001 & 100 == 0 .....
The difficulty is that some of the input parameters can be 400 bits long. This is not a true binary numeric representation. It is rather a positional representation. The same input can be represented as
100 = x1; (or) x100 011 = x2,3; (or) x011 001.......11 = x3,......450,451;
So basically βxβ is just a prefix with a value for it. This is an ACL system developed a long time ago, and I'm trying to implement a version of Java for it.
I could not find a data type in Java that could be used to represent a binary representation that is as huge as 400 bits. I can also use decimal representation [i.e. X2,3] and solve it too, but I could not think differently than going over the entire range of numbers and comparing it with another input parameter. Both input parameters can be normalized to the same presentation format [that is, binary or decimal].
Any suggestions (or) help in solving this problem?
java
karthik
source share