Here’s my solution (it’s the one from the book):
And here’s the link:
Description: The two bits on top set up a 4-ball cycle. The first ball subtracts one from register B. The second ball adds the 1’s place of register A to register C. The third ball is thrown out (it doesn’t do anything). The fourth ball adds the 2’s place of register A to register C. When register B underflows, the computer stops.