[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OT : bitmask calculation



PureBytes Links

Trading Reference Links

Nothing to do with trading.. but had to ask.. too many math background people here.

I need to calculate a number F and a number M such that,
all numbers (call them A) in the range 0x03C00000 and 0x04200000 would satisfy
(F & M) == (A & M)

if a single pair of F and M does not work, multiple pairs would work as well.

if you are aware of some resources on the net or otherwise that explains / calculates this sort of thing, that would be much appreciated as well.

Thanks,

Abhijit

PS : If you are wondering why I need something weird as that.. well it so happens that the above mentioned address range in RAM on one of my machines happens to be bad, and I am trying to configure a kernel patch that needs the F and M pair(s) as input.