
Video: Compact binary decoder using observers by pallapalla
How to build it
- Set Up the Binary Input Matrix
Create a row of input levers representing your binary bits (for example, 4 levers for a 4-bit decoder). Each bit line runs across all unary output slices and is 1-wide tileable with a supporting block on each end.
- Encode the Observer Pattern
At the bottom of each output slice, arrange observers attached to sticky pistons according to the binary value of that slice. The observers must be positioned so that when the correct combination of input levers is toggled, they shift into a single continuous horizontal line.
- Install the Trigger Rail Line
Place a line of rails along the front of the decoder across all output slices. Connect a button to this rail line so that pressing it updates the rails and sends an initial pulse into every slice simultaneously.
- Build the Timing Delay Chain
Construct an observer delay chain leading from your trigger button that is exactly one observer longer than the total number of bits in your decoder. For a 4-bit decoder, use a chain of 5 observers in series.
- Add the Output Gate and Lamps
Place a row of redstone lamps (or your desired output lines) at the back of each slice. Add a movable solid block controlled by a piston at the end of the observer chains to prevent shifting observers from accidentally pulsing the outputs while you flip the input levers.
How it works
This circuit operates as a pulsed decoder rather than a continuous constant-signal decoder:
- Binary Alignment: Each output slice has a unique arrangement of raised and lowered observers at the bottom. Toggling the input levers shifts these observers up or down. For any given binary number, only one specific output slice will have all of its bottom observers aligned into an unbroken chain from front to back.
- Noise Suppression: Because moving observers create block updates, shifting the bits would normally misfire the output lamps. A gating block at the end of the line moves out of the way or blocks the signal until the read button is pressed.
- Reading the Output: When you press the trigger button, the front rail line updates. The pulse travels through the aligned observer chain of the selected number and illuminates the corresponding redstone lamp at the end.
- Delay Rule: The trigger delay line must be
N + 1observers long (whereNis the number of bits) so the gating mechanism lines up with the signal traveling through the bit observers.
Tips & variations
- Expanding the Decoder: This design is infinitely expandable in both directions. If you expand it to 8 bits, remember to increase the synchronization delay line to 9 observers (always bits + 1).
- Repeating Rail Signals: Powered or activator rails only transmit power for up to 9 blocks. If your decoder has more than 9 outputs, insert a rail repeater section by pulsing top observers twice to push an observer up and down, refreshing the signal without losing an input slot.
- Companion Encoder: You can reverse this concept to build a binary encoder by placing a binary observer pattern under your input lines that feeds into piston-driven rail lines.





