If you do not understand what is going on, have a read at this discussion first!http://forums.deepworldgame.com/discussion/26550/how-2-logic-gates-properly#latest
Now then, as promised, a tutorial for a 4-Bit Ripple Carry Adder. This is a bit advanced, but if you understood the discussion above, then you should probably be good to go.
Note, this is by far not even close to being a good and optimized creation, I spaced everything out in order to make it easier to draw in the connectivity lines. You can most definitely make it more compact and faster as well.
A look back to the previous discussion, if you remember the full adder circuit, you will note it has 3 inputs. A, B, and a carry input. The circuit has two outputs, one being a true output and the other being a carry output. The way a ripple carry adder works is you have multiple full adders and connect the carry output to the next carry input. With this in mind, you can go a lot higher than 4-Bit by simply chaining more full adders, but expect a slower output as you go higher in bit count.
Before starting the design, it is important to note that because the first full adder does not and will not ever get a signal from its carry input, you can remove it altogether and use a half adder, which is much more compact, do note that you can only do this for the FIRST adder, and only the first.
Using the designs, but a bit spaced out, I created this structure for the circuit, this is where the logic is going to be placed.
As you can see, I reflected the adder in order to save the racer travel time.
Go somewhere, and set up a control panel, like this.
There is a good reason we have 5 signs for an output. A 4 bit number can be as high as 15, so adding two 4 bit numbers could result in a value as high as 30, and a 4 bit number cannot hold a value above 15. That's why we use 5 signs, for 5 bits of potential output.
Now lets hook up the first adder to its switches and its sign. Make sure to type a "1" in the output touchplate.
This first adder is pretty straight forward.
Now, lets connect all of the carry outputs to the next carry inputs.
Next, connect the second adder to its switches.
And the third adder.
And finally the fourth adder.
Lets now connect the first XOR gate in the three full adders.
And the second XOR gate, which is actually the true output gate.
Now to finish up the gates, here is the two AND gates, we have already connected the OR gates' outputs so don't worry about that.
This is the most important part, you WILL need a reset switch as some trapdoors are triggered by levers and touchplates, as such, they will be difficult to properly reset, the easiest solution is just to have a large timed lever at one second connected to all trapdoors. Additionally, you can use this large timed lever to reset the output signs to say 0.
And I believe that is it, well, except for the spawner, and that has a pretty obvious spot. (it goes at the start of the first adder)
I apologize for some of the darker screenshots, but you should still be able to see what goes where.
If you haven't figured it out, the output is also in binary, but I will leave it to you to find out how to translate binary to decimal. :D