Reputation
Next privilege 250 Rep.
View close votes
Badges
6
Newest
 Quorum
Impact
~471 people reached

  • 0 posts edited
  • 0 helpful flags
  • 10 votes cast
May
8
comment Is there any mathematical operation on Integers that yields the same result as doing bitwise “AND”?
Thanks for all the comments. Perhaps the "sharper"version which you mentioned would be something like "Is there an arithmetic expression which simulates that?"? Sorry for my terminology, I'm a computer scientist most of the time =P
May
8
comment Is there any mathematical operation on Integers that yields the same result as doing bitwise “AND”?
Agreed.12345678
May
8
comment Is there any mathematical operation on Integers that yields the same result as doing bitwise “AND”?
I'm actually not thinking in terms of time here, it just struck me that perhaps there was another way of reaching the bitwise AND computed value, without having to convert anything to binary form, just using the properties of natural numbers...
May
8
comment Is there any mathematical operation on Integers that yields the same result as doing bitwise “AND”?
That looks like what I've described in the title I guess. I know I can do it in that way. But I would like to know whether an expression using things like +,-,/, pow, whatever, that gave out the same results.. Perhaps I'm looking for an isomorphism, I'm not sure.
May
8
comment Is there any mathematical operation on Integers that yields the same result as doing bitwise “AND”?
Yeah. Good point. I'm sorry, if we puts negative numbers into this we have to deal with 2's complement, and I don't think I need that. Thanks.
May
8
comment Is there any mathematical operation on Integers that yields the same result as doing bitwise “AND”?
Hmm.. I would like some function which, given two Integers as parameters, gave out another Integer Value, the same as what I would get if I first converted those 2 number to binary form, did a bitwise "and", and then re-converted it back to base 10 Integer.
May
8
comment Is there any mathematical operation on Integers that yields the same result as doing bitwise “AND”?
Yeah I know but I want an operation that works directly on Integers