Turing Tumble Community

Puzzle 52 Solution - 28 parts and fast calculation

I made this to solve it, using ideas from puzzle 47 and 39:
Puzzle 52
I haven’t fully checked if I can remove any ramps, but it’s more marble efficent than the book solution, using only 3 balls to add 5 to register B. It has the 2 vertical gear bits and a bit to their left at the top for three states. They are used for subtracting one from register A, adding 1 to register B, and adding 4 to register B by flipping the four bit. There is probably a way to do this with less ramps, but I want to finish all of the puzzles first before I put too much time into one solution.