Rerversing AND Bitwise.
- by Benjamin
Hey all,
Here's the following algorithm:
int encryption(int a, int b) {
short int c, c2;
uint8_t d;
c = a ^ b;
c2 = c;
d = 0;
while(c) {
c &= c - 1;
d++;
}
return d;
}
How can I find which variable a and b I should send in that function to decide of the output value of d?
In other words, how can I reverse the algoritm to let's say if I want d=11?