User:HaydenBobMutthew/Mathematical analog circuit

A mathematical analog circuit is a circuit which operates on signal strength, such as arithmetic and comparison.

Introduction
Since there is no redstone adder in Minecraft, we need to convert addition into subtraction.

a + b = a + b - 15 + 15 = - 15 + a + b + 15 = - (15 - a - b) + 15 = 15 - (15 - a - b)

However, as signal strength cannot be higher than 15, we need to have sum and carry out outputs on the adder. Then we have:

sum = / a + b if a + b < 16 \ a + b - 16 if a + b ≥ 16 = / 15 - (15 - a - b) if a + b < 16 (hereinafter omitted) \ a + b - 15 - 1 if a + b ≥ 16 = a - 15 + b - 1 = - (15 - a) + (b - 1) = (b - 1) - (15 - a)

In an adder, there is also a carry in input, so we have the following equations:

sum = a + b + c    = / 15 - (15 - a - b - c) if a + b + c < 16 (hereinafter omitted) \ (b + c - 1) - (15 - a) if a + b + c ≥ 16 = (b - 1 + c) - (15 - a)    = b - (1 - c) - (15 - a)

If a + b + c > 15, 15 - (15 - a - b - c) will be 15 in terms of comparators. If a + b + c < 16, b - (1 - c) - (15 - a) will be 0 in terms of comparators. This runs a problem: if a + b + c = 15 or 16, then 15 - (15 - a - b - c) will be 15 and b - (1 - c) - (15 - a) will be 0, making impossible to distinguish whether the first expression or second expression should be the final output. So this method didn't work. See the next section for the workaround.

Designs

 * ?×?×? (? block volume)
 * flat, silent
 * circuit delay: TBD


 * Earliest Known Publication: February 5, 2013