Pristine Bit Checking Write a program/function that takes two integers in the range \$0\$ to \$255\$ inclusive, and returns whether the binary forms of the numbers are exactly one bit different. 

For example, \$1\$ and \$0\$ have binary forms 00000001 and 00000000, which are one bit apart. Similarly, \$152\$ and \$24\$ are 010011000 and 000011000, so they return true.

However, your code must be pristine, such that if any one bit in your program is flipped, it should throw an error. For example, if your program was the single byte a (01100001), then all the 8 possible modified programs:

á ! A q i e c `


must throw an error. Make sure you are modifying by bytes (e.g. the á up there is actually representing the byte \$225\$, not the actual two byte character á).

Test cases:

0,1     =&gt; Truthy
1,0     =&gt; Truthy
152,24  =&gt; Truthy
10,10   =&gt; Falsey
10,11   =&gt; Truthy
11,12   =&gt; Falsey
255,0   =&gt; Falsey


Rules:


Provide a testing framework that can verify that your program is properly pristine, since there will be a lot of possible programs (number of bytes*8), or else a complete proof of pristineness.


Please make sure your program is valid before you post it.

Output needs to be either truthy/falsey (either way around is fine), or else two distinct non-error values
Errors can be runtime, compiler, interpreter etc.
Python 2, 35 bytes



lambda a,b:(a^b)&amp;-(a^b)in[a^b or[]]


Try it online!

Uses the power-of-two check n&amp;-n==n, eliminating the n==0 false positive.

For reference, these are the pairs of one-char binary operators that are one bit apart, making them hard to use:

+ /
- /
* +
% -
&lt; |
&lt; &gt;


Fortunately, &amp; and ^ are not among these.

Also note that == can become &lt;=, and + can become the comment character #.



Python 2, 41 bytes



lambda a,b:bin(a^b).count(`+True`)is+True


Try it online!

Taking TFeld's lambda a,b:bin(a^b).count('1')==1 and making it pristine by changing the 1's to +True and == to is. Thanks to Jo King for 1 byte.