Re: Need help solving Boolean Expression



On Sun, 01 Mar 2009 16:58:59 -0500, Jim Flanagan wrote:



Hello..
I'm hoping someone could 'steer' me in the right direction
as to how and solve the following:

A = B xor (B << 1)

A is known and I need to find B such that when
shifted left by 1 bit (x2) and exclusive 'or'd'
together will give A.

Is there a closed form solution to this? Does
anyone recognize this as some form of cryptography
equation that is documented somewhere on the net?
Maybe this is fairly trivial, but I don't see it.


(pseudocode):
For B = 1 to N
If ((B xor (B << 1)) == A) break;
Next;

;-)

Cheers!
Rich

.