Tutorials/Redstone computer

Redstone has literally no limits of what you can create. Of all the creations, computers are the main interest in Redstone Development. Computers can be from a simple 4-bit processor with a byte or two of RAM that can do commands such as adding, storing to memory, and branching, to a super-computer with an integrated octa-core 16-bit CPU that can multitask and compute within less than a second. Computers' functions are to calculate and compute within a program, therefore it is not to be confused with a calculator. The following tutorial will show you how to build your own.

Logic Gates
The following are the main logic gates to a computer:

AND Gate: This gate will send an output if both input A and input B are true.

OR Gate: This gate will send an output if either A or B is true.

Exclusive OR Gate: The XOR gate will output true if A or B is true but not if they are both on.

NOT Gate: Inverts signal with a redstone torch.

Memory
The following will tell you about ways of storing memory:

RS-NOR Latch: This cell uses two switches to toggle their state. They are built by two torches with wires connected to their input faces.

D-Flip-Flop: The cell uses two switches, one is for the memory to be stored and the other is to read it. Unlike an RS-NOR latch, it needs only one form of input from it's back side.

T-Flip-Flop: Uses one trigger only. Updating the wire toggles the mode of output.

Step 1: ALU
The first step to a computer is the Arithmetic and Logic Unit. This unit is designed to add and subtract, however it may be able to do multiplication and division via the program. First, you must build an adder.