0

I need help completing a proof that defines bitwise-and in terms of arithmetic and bitwise-masking.

Let $\&$ denote the bitwise-and operation on natural numbers and $\preceq$ denote the bit-masking relation on natural numbers. Specifically, $x \preceq y$ if each binary digit of $x$ is $\leq$ the corresponding binary digit of $y$.

(3.6) of Jones and Matijasevic's "Proof of Recursive Unsolvability of Hilbert's Tenth Problem" states that bitwise-and can be expressed logically in terms of bit-masking: $$a \& b = c \text{ iff } c \preceq a \text{ and } a \preceq a+b-c.$$ This is the result I'd like a proof of, but unfortunately, the paper doesn't come with a proof of this, and internet searches are turning up basic computer-science introductions to bitwise operations.

I have the $\Rightarrow$ direction down. Let $a', b'$ be the digits of $a,b$ which are not common, then $a = a'+c$ and $b =b'+c$, so $$a+b-c = (a'+c)+(b'+c)-c = a'+b'+c = (a'+c)+b' = a+b'$$ $a+b'$ doesn't involve any carrying, so is $\succeq a$.

But I can't find a proof of $\Leftarrow$ that isn't incredibly tedious. Can anyone find a nice proof of this?

As a bonus, does anyone know of a reference that contains this result, that might contain other, similar results?

TomKern
  • 3,407
  • Perhaps you should edit your question and tell us something about your incredibly tedious proof, so we can help to improve it. – Rob Arthan Dec 18 '24 at 23:33

1 Answers1

1

The reverse implication doesn't seem to hold. If $a, b, c$ are the single bits $1, 1, 0$ respectiviely, we have $a \& b \ne c$ but $c \preceq a$ and $a \preceq a+b-c$.

By the way, it appears (to me) that $a \preceq a+b-c$ can be simplified to $c \preceq b$.

paw88789
  • 41,907