This works because the difference between the AND of two numbers and the OR of those numbers, logically, is equal to the XOR. OR is also always greater than AND, as it has 1s in all the same places, and more.
Flag: ractf{x0rmoj1!}
β‘οΈπΌποΈπΌπ¦π¨ - Read T0 into A, store in X.
β‘οΈποΈποΈποΈ - Read T1 into A
π΄π¨π¦βοΈ - AND A in place with X, store result in Y.
ποΈποΈ - Read T1 back into A
π·π¨π¦π¨ - OR A in place with X, store result in X
π¦π¨π¦βοΈ - DEC X, DEC Y
ββοΈ - CMP Y 0
βοΈπππ·οΈ - JNE 1D (decrement phase - this makes a subtraction loop,
subtracting Y from X, and leaving result in X.)
ππ¨π€ - Print X
β‘οΈπΌποΈπΌβ¬ οΈπΌ - Read the next char from T0 into A, move back.
βποΈ - CMP A 0 (is the tape empty)
βοΈπππ·οΈ - JNE 00
β‘οΈποΈποΈποΈβ¬ οΈποΈ - Read the next char from T1 into A, move back.
βπ - CMP A 0 (same thing but makes sure both are empty
οΈβοΈπππ·οΈ - JNE 00
πΏ - HLT