|This page or section has been suggested to be merged with Tutorials/Redstone computers. |
Reason: These two should not be separate pages - they're about the same topic but each has different information
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. Please note that this does not show you how to build components. You need an understanding of them in order to put them together.
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.
There are also inverted versians of the above gates such as NAND, NOR, and XNOR
RAM, short for Random Access Memory, is a place where the CPU can store strings of bits 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 its back side.
T-Flip-Flop: Uses one trigger only. Updating the wire toggles the state.
ROM short for read only memory is used to store data that can only be read and usually is used when the computer is turned on/off It can also be used to store programs in this case it is usually called program memory or program ROM.
The Arithmetic and Logic Unit (ALU) is controlled by the Control Unit and is part of the CPU. It gets two inputs, a and b. it also gets what to do with it. It should be able to do things like NOT, AND, OR, XOR, NOT, addition, and subtraction. ALU's have an adder at their core, and they also have extra functions not normally included in standard adders. These extra functions include:
- !A (inverts all A inputs)
- !B (inverts all B inputs)
- Flood carry (turns on all carries in the adder)
- OR (turns adder into an OR gate, typically by disabling the AND part of the adder's XOR's, thus removing the exclusive part)
- Cut carry (forces all carries to be constantly off. Commonly excluded in modern ALU's)
- Invert out (Inverts output. Excluded in modern ALU's)
ALU's also make use of the carry in of the least significant bit (LSB, the bit typically to the far right). The carry in adds one, and is used in subtraction.