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. these are only some gates ....

STEP1: Ram
ram, short for random acsas memory. it is a place where the cpu can store strings of bits(a #), only to be used at a different time. The following will tell you about ways of storing memory(ram):

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

D-flip-flops are the best way to do it, as data does not have to be erased but can simply ne over writen.

using it
make several of these rams and group them together into groups based an a how many bits your computer has. make an address code circuit for it so you can simply address it to be added anded etc with something else or for something to be stored in it. then make several of these groups, each with different address codes. the more you have the more sets of numbers your computer can store...

STEP2: ALU
the alu is controlled by the CU and is part of the CPU. it gets two inputs, a and b. it also gets what to do with it. including different Boolean operations like---)or and xor(--- and also stuff like addition and subtraction. it then outputs the answer.