http://mkv25.net/dfma/movie-1084-numberabbeydemonstrationThere's the beast doing two additions:
27 : 0001 1011
+ 82 : 0101 0010
= 109 : 0110 1101
71 : 0100 0111
+ 123 : 0111 1011
= 194 : 1100 0010
You might have to do some tricky pausing at the end to catch the final result; the movie cuts off abruptly.
After I build it up to sixteen bits, I want to build some seven-segment displays out of retracting bridges. I don't suppose anyone around here has a good feel for the logic behind those?
Now, a little about the design process.
I wanted to build an adder, and I started here:
http://www.dwarffortresswiki.net/index.php/User:Kyace/AdderI noticed that the design has a major logical flaw. If you'll notice, a full adder with two false inputs and a true carry-in should output a true sum, but in that design, with two false inputs there is no way for water to go through the system to the sum pressure plate. I wanted a design that would be logically correct.
I also didn't like the way the design extended over z-levels with the output plates a level down, and used hatches-as-inverse-doors to control flow by draining water before it could reach the channels down to the plates. I wanted a design on one z-level, and in the interest of conserving water when running it through several adders, I wanted to avoid letting it flow through when not triggering an output.
http://www.dwarffortresswiki.net/index.php/User:SL/Logic_Gates suggested the concept of using 1x1 drawbridges as inverse doors.
I came up with a design that seemed correct and built
Playsmiths. I quickly regretted combining instant doors with delayed drawbridges and resolved to use floodgates in the future. (Using delayed buildings instead of instant ones is a little bit of a bother, but I decided it was worth it to avoid the water-hogging nature of using hatches, or the overhead of supplementing each adder with an inverted for each color of door) I also had drainage problems.
I tried again with
Weatherbridged. This time I discovered more significant flaws in my design, due to pressure not transferring diagonally. (I later turned this to my advantage in the drainage system for Numberabbey.)
That was a couple months ago and it was just this weekend I finally came back to it and designed a no-diagonals version of the full adder. I also settled on pushing pressurized water into each adder instead of giving each one its own pump to pull water from a supply system (didn't seem to give me enough volume) and hit on my idea of making the drainage pump feed back into the pressurized water whenever possible rather than dumping water outside unnecessarily.
But the most important innovation was building an access stairway in each separate compartment of the full adder for ease of construction.
This leads to my most important piece of advice for anyone designing such a project: Work one bit at a time, and have a meticulous method of construction which covers every single detail. There's a long row of identical constructions, and it is ridiculously easy to get confused and link something to the wrong thing — or accidentally give your link orders to the lever next to the one you meant, when you have a row of input levers — and end up having to tear everything back out and do it over again. I have four separate stages of construction for each full adder, where I build some of the parts, order them to be linked, and then build the next stage. They are always built in exactly the same order, so that they appear in exactly the same positions relative to the end of the linkable-building list.
Also, the most labor-intensive part of Numberabbey was actually the construction of the water and pump towers, but I am grateful for every minute of it. My two earlier attempts just stuck one pump next to a stream, built a cistern to store some water, and called it good. The logic part is actually pretty simple once you settle on a precise method to avoid making disastrous mistakes; the hard part is making the water system keep putting in enough water to consistently press the plates. The water-reusing drainage system was a major breakthrough in this regard, because it just gets better the more water you press into its intake.