
Video: How to Make a Redstone Computer from Scratch by mattbatwings
How to build it
- Set Up Your Building Environment
Start in a flat creative world (built in Java 1.18.2 in the video). Install helper tools like WorldEdit for stacking components, Carpet Mod for tick warping, and Redstone Tools to speed up the massive wiring process.
- Build the 8-Bit Carry-Cancel Adder
Begin the Arithmetic Logic Unit (ALU) by building an 8-bit carry-cancel adder (CCA) to handle addition. Configure the B-input lines with Redstone torches so they can be inverted along with a carry-in of 1 to perform two's complement subtraction (A - B).
- Add Bitwise Logic Operations to the ALU
Expand the ALU so each of the 8 bit-lanes can compute the six two-input bitwise logic gates: OR, AND, XOR, NOR, NAND, and XNOR. Connect a control setting input so the ALU can output any of its 8 total functions (addition, subtraction, and the 6 logic operations).
- Construct the Register File
Build a small collection of 8-bit registers where each register holds a single number for quick access. Wire the output of the register file into the two 8-bit inputs of your ALU, and route the ALU's 8-bit output back into the register file for writing results.
- Define the Instruction Set and Machine Code
Plan out your custom assembly instruction set—such as Load Immediate (LDI), ADD, and Halt (HLT)—and map each instruction and register address to binary machine code (1s and 0s).
- Build the Instruction Memory Bank
Create the instruction memory hardware to physically store your program's binary instructions in sequential addresses (Address 0, Address 1, Address 2, and so on) so the computer can read them from top to bottom.
- Wire the Program Counter (PC)
Build a sequential register for the Program Counter with a main input, main output, and a clock pulse line. Wire it so that it starts at address 0 and increments by 1 on each clock cycle to advance to the next instruction in memory.
- Add Flags, Jumping, and Branching Logic
Connect status flags from the ALU output and wire branching logic back into the Program Counter's input. This allows the computer to overwrite the Program Counter with a new address when a conditional jump or branch instruction triggers.
- Install the Call Stack
Build a hardware call stack connected to the Program Counter system. This stores return addresses in memory so your assembly programs can jump to reusable functions and return to where they left off.
- Construct the Data Memory Bank
Build a large addressable read/write memory bank separate from your instruction memory. Wire it to your data buses so programs can store and retrieve variables at any memory address during execution.
- Connect Input and Output (I/O) Devices
Attach user input controls and Redstone lamp displays or peripheral ports to the data bus so you can interact with running programs and see visual output.
- Assemble and Paste Your Program Schematic
Write your program in your custom assembly language, assemble it into a binary Minecraft schematic of 0s and 1s, and paste it directly into the Instruction Memory using WorldEdit to run the code.
How it works
This computer separates its hardware into combinational components (which have no memory and immediately compute an output from their inputs) and sequential components (which hold state in memory and only update when pulsed by a central clock signal).
- Program Counter & Instruction Memory: The Program Counter (sequential) holds the address of the current instruction, starting at
0. Instruction Memory reads that address and sends the encoded binary instruction lines out to control the rest of the hardware. - Register File & ALU: When executing an instruction like
LDI R1 2(Load Immediate), the value2is clocked into Register 1. When executingADD R1 R2 R3, the Register File outputs the 8-bit values ofR1andR2into the combinational ALU with the setting set toADD. The ALU's carry-cancel adder computes the sum, and the next clock pulse saves that result intoR3. - Data Memory, Call Stack & Branching: Larger data values are read from or written to the Data Memory bank by address. When a function call or conditional branch occurs, the Call Stack and branching circuits feed a new target address into the Program Counter instead of simply adding 1, allowing loops and subroutines before hitting a
HLT(Halt) instruction.
Tips & variations
- Trade-offs vs. Single-Purpose Circuits: A general-purpose Redstone computer is much slower than a dedicated hardwired circuit (often up to 1,000x slower), so use external simulation mods like Carpet (tick rate speeding) or MCHPRS (Minecraft High Performance Redstone Server) if you want to run complex games like Tetris at playable speeds.
- Prerequisite Knowledge: Before building a full CPU from scratch, practice building basic binary logic gates, 8-bit carry-cancel adders, multiplexers, and D flip-flop registers.
- Use Schematics for Software: Rather than flipping hundreds of levers by hand to program the ROM, use an external assembler script to convert text assembly code into a schematic file and paste it into the instruction memory with WorldEdit.

