
Video: Logical Redstone Tutorial 2: Our First Matrix Decoder by WildEngineering
How to build it
- Build the First 4-Bit Horizontal Slice
Start with a single vertical-to-horizontal 4-bit decoder slice set to the zero binary address. Extend its output forward with a block staircase that carries redstone dust upward to feed a vertical column.
- Stack the Horizontal X-Axis Decoder
Tile or stack your horizontal decoder slice 15 times horizontally so you have 16 columns (addresses 0 through 15), encoding the binary torch pattern across the 4 input lines. Update the top redstone line so only the selected column's output remains active.
- Add Repeaters for Vertical Signal Strength
Along the vertical output columns coming off the bottom decoder, insert redstone repeaters going up the staircase. Because the signal has to climb across 16 rows, you will need repeaters spaced along the vertical line so power reaches the very top.
- Position the Vertical Y-Axis Decoder
Directly above and intersecting the horizontal decoder's vertical output columns, build a single horizontal-to-vertical 4-bit decoder slice. Its horizontal output line should run across all 16 vertical columns.
- Stack the Vertical Y-Axis Rows
Stack the vertical decoder slice upward 15 times to create 16 horizontal rows (0 through 15) on the Y-axis, encoding the binary address torches for each row. This forms a 16x16 grid of 256 output torches where the X columns and Y rows intersect.
- Combine Inputs into an 8-Bit Vertical Bus
Route the 4 input lines from the bottom (X) decoder and the 4 input lines from the top (Y) decoder over to a single 8-lever vertical input panel. The bottom 4 levers act as the least significant bits (X position 0–15) and the top 4 levers act as the most significant bits (Y position 0–15).
- Update Lines and Test X/Y Coordinates
Ensure repeaters are placed on the horizontal row lines so signal strength reaches all 16 columns across the grid, then update the redstone lines. Toggle the bottom 4 levers to move the active output torch left/right (X) and the top 4 levers to move it up/down (Y).
How it works
A standard 1D decoder takes an n-bit binary input and activates one of 2^n outputs in a single row or column. A matrix decoder multiplies two smaller decoders together across two axes (X and Y), squaring the total number of outputs:
- X-Axis (Bottom 4 Bits): The lower 4-bit decoder reads the first 4 levers (values 0 to 15). All unselected columns remain powered, while the single selected column turns off its inhibiting line (or vice versa, depending on torch inversion), enabling only that vertical column.
- Y-Axis (Top 4 Bits): The upper 4-bit decoder reads the upper 4 levers (values 0 to 15, representing increments of 16 in an 8-bit number) and selects a single horizontal row across the 16-high grid.
- 2D AND Intersection: At each of the 256 grid points (16 columns × 16 rows), an output redstone torch is controlled by both its column line and its row line. Because a redstone torch only turns on when all powering inputs to its block are off (NOR/AND logic), only the single torch where the selected X column and selected Y row meet will light up.
Tips & variations
- Watch Signal Strength on 16x16 Grids: Redstone dust only travels 15 blocks. Across a 16-wide by 16-tall matrix, both the vertical column lines and the horizontal row lines will fall short of the last bit unless you place repeaters midway through the lines and adjust the block spacing so no cross-connections occur.
- Use WorldEdit for Stacking: Building 256 intersections by hand is tedious. In creative mode, build one slice, use
//stack 15horizontally and vertically, and then break/replace a block on the most significant bit line to fix any stuck redstone torch states after pasting. - Synchronizing Timing: Adding repeaters to extend signal reach introduces 1-tick delays to the far side of the grid. If you are hooking the matrix up to high-speed RAM or a synchronized display, add matching delay repeaters to earlier segments so all 256 outputs switch at the same tick.





