suppose we have two numbers i want write program which print common bits subsequent which occurs in these number
or
1000010111001010100011110001010010101001011101001001001
0101 01110011011001010111101111111010001001011
one of the answer should be 0101
but constraint is that we should make bitwise operations and mathematical operations
and not string problems ( longest common subsequent)
thanks
for example:
to clear the single bit sequences you can use this:
It is not clear if this is what you want, but this is a quick and easy way to find all common bit sequences at the same position in two values. If you are looking for common bit sequences at any position, you would need to rotate one value into each bit position and perform the above tests.