Hmm, i wonder what's 01100100x01100100 (100x100 in decimal)?
Yep, 0010 0111 0001 0000.
And 1101 0011 x 1011 1001 (211*185)?
After a bit of troubleshooting, the correct result - 39.035.
The basis of multiplication in binary is pretty simple - compare each bit of the first factor with every bit of the second factor, if both bits are on, there's a result - the basic multiplication table is nothing but an AND gate. Of course, when multiplying two eight-bit numbers, that still results in 64 AND gates. I don't know if there's a way to avoid that, i couldn't think of any.
So here you go, bunch of mechanical AND gates generating the basic signals:
The bits 5,6,7 and 8 of the first factor control whether the big eight-tile rollers are on, if they're on and the individual gear assemblies (run by each bit of the second factor) are also on, a signal is generated. What you see is half of the basic signal generation, housing 32 minecarts.
Now, we merely need to add up the signals and we got our result.
Hahaha. The obvious problem is that we can't just throw all those signals at a simple binary adder - it's gonna break when we're having four or more active inputs; and we can have eight of them from basic signals, plus incoming carries (and with that many input signals, we're going to get multiple carries). We actually need to distinguish, for our carry calculation, whether at least two, or at least four, or at least six inputs are on. Clearly a job for...
Load-based mechanical logic!
Yep, the much-maligned technique of slapping load on a circuit until it overloads and stops. Of course, we're not going to overload our main power supply, we're using separate "loadable" power supplies for each circuit. With the help of minecarts, we don't even need to build separate circuits for each possible number of active inputs - we use a cart moved by a roller drawing from the main power supply, and run it into an opposing roller, powered when few enough inputs are on, overloaded and off when too many inputs are live; in the latter case, the cart goes past the roller, activating a "carry" pressure plate _and_ disengaging the roller it just passed over. This already reduces the load on the system, and with some finetuning, the circuit can determine how many inputs are on, counting in pairs (obviously, since we're checking for carries, which spawn at every pair of active inputs).
And just to make things easier on the next circuit, carry No. 1 is sent to the next higher bit, carry No.2 switches that carry back off and sends a carry two bits up, carry No.3 re-activates the next-bit carry...
Of course, it still looks completely insane:
But it works, see above. This one is the eighth-bit carry calculator, there are ten more of these things in total. It uses the northern waterwheel to power the always-on roller (north), all other rollers draw from the southern waterwheel; the eight regular signal inputs and two carry inputs are attached to the e-w roller (using the sideways-connecting roller as "activity sensor"). Currently, four inputs are on, 94 of 100 power are consumed, the top two rollers are switched off and a carry is sent to bit No.10. The load used to keep the power drain in the correct range consists of seven grids of axle, a gear assembly and a millstone.
All the base signals _and_ all the carries are finally fed through XOR-type gates, i.e. single gear assemblies taking all possible inputs generated for the bit. If an odd number of inputs are on, the gear assembly switches off, the cart stops on top of the roller and the bridge corresponding to the bit in question becomes visible.
Total tally: 1510 mechanisms, 192 rollers, a bit over 800 blocks (all track was built on ordinary floor), 400 logs, the main power supply provides 2100 power, 7 additional waterwheels and 18 windmills are used for the carry calculators, 93 active minecarts. As far as i can tell, it takes about 250 turns to come up with the correct result, 200 of which are the reaction delays of the bridges (they all get retracted when powering up the machine, then the "on" bridges re-appear).
Errors at finish: one switchable gear assembly attached to the wrong side of a 2x1 roller, two pressure plates linked up wrong (actually caught that during the big link-up session, but that would've been a showstopper), one roller installed the wrong way round, forgot to make the rollers in one carry circuit switchable. I had expected worse.
I recommend not using bridges for output, though: a bit of fluctuation can happen in the adding machinery, which generally irons itself out in at most 200 steps, but intermittent incorrect signals can trigger shortly before the correct signal, and with bridges' long reaction time, that can lead to them getting wedged in the wrong position. In all my tests, the sum engine ended up in the correct state, but e.g. when multiplying 7x15, the bridge at 256 consistently displayed an "on", although the related pressure plate was off. Hatches should guarantee that the displayed result really matches the one the engine actually comes up with.
EDIT: I previously messed around with non-binary calculating, and the first attempt was a multiplier. I think it's a nice piece of dwarfgineering, but, ermm, it's a _bit_ much work for something that can barely calculate 6x6:
The first "factor" activates one of six rollers, sending one minecart up the northern path, where it gets deflected to the side by whichever of _those_ six rollers is on. The cart then bounces back and forth along an e-w track, keeping one of the plates active, which corresponds to the result. Obviously, this takes 36 weight-sensitive pressure plates and six minecarts of significantly different weights. Once the holding roller to the west turns back off, the cart travels south and sorts itself into its original starting bay, by way of weight-sensitive pressure plates switching rollers off.
It might be possible to have twenty different-weight carts, combined with, say, 50 deflecting rollers, you could get results up to 1000; for the paltry cost of 1000 pressure plates just to pick up the results, not to mention input/cart return regulation, and of course 1000+ mechanism linking jobs just to get a result display other than an active pressure plate...