Background definition: XOR on numbers
Given two non-negative integers $x$ and $y$, let $x\oplus y$ denote the bitwise exclusive or (XOR) of the numbers $x$ and $y$. This is the result of writing $x$ and $y$ in binary notation, then XORing corresponding bits (also known as "addition without carry"), and finally interpreting the result as a number again. This operation is often represented by the expression x ^ y
in programming languages and is also known as nim-addition. This operation is commutative and associative, so one can take the XOR of more than one number in any order and simply write $x\oplus y\oplus z$.
It's important to note that we view $x\oplus y$ as an operation on numbers here, not on strings, which is consistent with its behavior in various programming languages. For example, Python will happily report that 123 ^ 456 ^ 789 == 678
, which you can see by examining the columns of the following table, where we use a subscript like $123_{10}$ to mean decimal notation and $0001111011_2$ to mean binary notation:
$$\begin{align*} 123_{10} &= 0001111011_2 \\ 456_{10} &= 0111001000_2 \\ 789_{10} &= 1100010101_2 \\ 678_{10} &= 1010100110_2. \end{align*}$$
[Hint: check that each column of bits has an even number of $1$s.]
Good collections of numbers have vanishing XOR
Motivated by a recent challenge on the Code Golf Stack Exchange, "For what block sizes is this checksum valid?" (which was the #1 Hot Network Question for a while!), let us call a collection of numbers good if their XOR is zero, and bad otherwise. For example, the set $\{123_{10}, 456_{10}, 789_{10}, 678_{10}\}$ is good. In other words, a collection is good if "the checksum is valid".
Given a bitstring like $101$, one can interpret the string in binary as $101_2 = 5_{10}$, or in decimal notation as $101_{10} = 1100101_2$. By analog to binary-coded decimal, one might call the latter interpretation decimal-coded binary (of $101$), meaning we use an entire decimal digit to represent a single binary bit.
Given a collection of bitstrings, like $\{10, 100, 110\}$, one can interpret the strings in binary like $\{10_2, 100_2, 110_2\}$ or in decimal notation like $\{10_{10}, 100_{10}, 110_{10}\}$. Sometimes, like in this case, it happens that both the interpretations are good, meaning $10_2\oplus 100_2\oplus 110_2 = 0$ and $10_{10} \oplus 100_{10} \oplus 110_{10} = 0$ as well:
$$\begin{align*} 10_{10} &= 0001010_2 \\ 100_{10} &= 1100100_2 \\ 110_{10} &= 1101110_2. \end{align*}$$
Unfortunately, sometimes the binary interpretation is good but the decimal interpretation is bad, like in the case $\{100,1000,1100\}$ which is good in binary because $100_2 \oplus 1000_2 \oplus 1100_2 = 0$ but where unfortunately the decimal interpretation has $100_{10} \oplus 1000_{10} \oplus 1100_{10} = 1984_{10}$:
$$\begin{align*} 100_{10} &= 00001100100_2 \\ 1000_{10} &= 01111101000_2 \\ 1100_{10} &= 10001001100_2 \\ 1984_{10} &= 11111000000_2. \end{align*}$$
Of course, it is very often the case that both binary and decimal interpretations are bad; this is the usual situation for a random collection. (Checksums are unlikely to be valid by accident.) Thus we have examples of "binary good and decimal good", "binary good but decimal bad", and "binary bad and decimal bad". That leaves a final possibility: "binary bad but decimal good".
The puzzle
Find a collection of bitstrings that is good when interpreted as decimal numbers but is bad when interpreted as binary numbers.
That is, find a collection of bitstrings (ie, strings of $0$s and $1$s) $$\{abc\dotsc def,\quad \dotsb,\quad uvw\dotsc xyz \}$$ so that the "decimal-coded binary XOR" vanishes, meaning $$abc\dotsc def_{10} \oplus \dotsb \oplus uvw\dotsc xyz_{10} = 0$$ but their "usual XOR" doesn't, meaning $$abc\dotsc def_{2} \oplus \dotsb \oplus uvw\dotsc xyz_{2} \ne 0.$$
1100 ^ 1000 ^ 100 == 1984
. Sad, but maybe it still works the other way around? Hence this puzzle. In terms of puzzling.meta.stackexchange.com/a/2784/63291 this has an "Unexpected problem statement" and "Unexpected result". $\endgroup$