I'm trying to create a function where 0x04060002 and 0x00080008
would return 0x000X000X because each of the other positions have at least one zero. Any nonzero number can go where the "X" is.
I've tried &-ing and |-ing but I can't seem to find the right steps.
I would solve this problem something like this (C code):
Test:
Prints:
nibble_or(0x04060002, 0x00080008) = 0x00010001