Here’s my solution (it’s the one from the book):

And here’s the link:

http://www.lodev.org/jstumble/?board=00llllr0r0eerrlaeerxlgreeagaalelaagrelrllllexllieilie0

**Description:** This is a tough one. Both registers are set up to count down. The key to understanding this one is to look at the two sets of connected gear bits.

**If register A is less than register B:**

Register A will underflow first, flipping both sets of gear bits right. Then a ball will test register B. It won’t underflow because it’s greater than register A, so the ball will interact with the first set of gear bits (which are now turned right) and end up in the left-most interceptor.

**If register A is greater than register B:**

Register B will underflow first, and since the right-most gear bits will still be facing to the right, the ball will end up in the right interceptor.

**If register A is equal to register B:**

Register A will underflow first, flipping both sets of gear bits right. Then register B will underflow. Since both sets of gear bits are facing right, the ball will end up in the basket.