Turing Tumble Community

Double-input register with overflow warning

The number of marbles in each input should be the same, or the number of blue marbles should be 1 more than the number of reds.

IF there are 15 or fewer marbles total: Subtract the total number of marbles from the register.

IF AND ONLY IF there are more than 15 marbles total: Flip gear bits A to the left.

turing puzzle

Things to test: 3 marbles/input: Register reads 9.
6 blue, 5 red: Register reads 4.
9 blue, 8 red: Gear bits left.
15 blue, 15 red: Gear bits left.

Hint: You need not count correctly if there is an overflow. Just turn the gear bits, if they’re turned we already know something went wrong.