Calculator Display Input Decoder

This circuit forms the user interface and visual output of a redstone calculator, converting button presses on a 0-9 keypad into Binary Coded Decimal (BCD) and displaying them on 7-segment lamp screens. You would use this system in computational redstone builds whenever you need to translate single human inputs into multi-bit binary numbers and render them as readable digits.

Redstone ComputingAdvancedJava Edition
Calculator Display Input Decoder video tutorial

Video: Redstone Calculator Tutorial Part 2 - Inputting to the Display by mattbatwings

How to build it

  1. Build the Control Platform and Keypad

    Construct a floor platform with a 4-block-tall wall in front of the player. Place 10 buttons arranged as a 0-9 numeric keypad, along with a lever to toggle between Input A and Input B, a clear button, and four buttons for math operations.

  2. Invert and Route Keypad Lines

    Place a redstone torch directly behind each keypad button so all lines default to ON. Route the 10 individual redstone dust lines backward into three vertical tiers, using slabs to weave adjacent lines past each other without connecting, ensuring every line only passes through a single torch to keep a 1-tick synchronized timing.

  3. Build the 5-Bit BCD Output Bus

    Below each of the three vertical tiers of keypad lines, run five perpendicular horizontal redstone lines representing the 8, 4, 2, and 1 bits, plus a 5th 'Signal' bit. Connect the three vertical tiers of each bit together at the end using a slab staircase and repeaters so powering a bit on any tier activates the main output line.

  4. Encode Keypad Lines to BCD

    Place redstone torches on the side of every keypad line (0 through 9) over the 'Signal' bit line so any button press sends an activation pulse. Then, place torches on each numbered line above the corresponding binary lines that add up to that digit (for example, line 3 gets torches over the 1 and 2 bit lines; line 5 gets torches over 4 and 1).

  5. Construct the 7-Segment Display Face

    Build the 7-segment display frame using groups of 3 redstone lamps for each of the three horizontal and four vertical segments. Behind the horizontal segments, run 3 parallel repeater lines; behind the four outer vertical segments, build miniature redstone torch towers so each segment can be powered independently from the back.

  6. Extend the Segment Control Lines

    Bring the seven individual segment input lines straight back so they align into two horizontal rows (three lines on the top row, four on the bottom). Stack and extend these seven parallel lines backward by 20 blocks to create the programming grid.

  7. Add Dual-Layer Digit Decoding Lines

    Perpendicular to the seven segment lines, build 10 upper input lines (representing digits 0 through 9) with a second set of 10 lines directly underneath the bottom segment row. Link each upper line to its corresponding lower line using a downward two-torch tower on the side so powering the top line simultaneously powers the bottom line.

  8. Program the 4-Bit BCD Decoder

    At the start of the 10 digit lines, create four input lanes for your 8, 4, 2, and 1 BCD lines. Along these four lanes, place specific patterns of repeaters and side-mounted torches to lock all digit lines except the one matching the active binary input: the 8-bit line uses 1 repeater and 2 torches at the end; the 4-bit line uses 3 repeaters, 4 torches, and 2 repeaters; the 2-bit line alternates 1 repeater, 2 torches, 2 repeaters, 2 torches, 2 repeaters; and the 1-bit line alternates dust, torch, repeater, block across the whole length.

  9. Encode Digits to the 7 Segments

    With no input active, the '0' digit line will be the only unpowered line; place redstone torches along it above all segment lines except the middle horizontal segment to display a 0. Repeat this for digits 1 through 9 by powering each binary value, identifying which single digit line turns off, and placing torches on it to light up the corresponding lamp segments (adding repeaters along the segment lines to refresh signal strength).

  10. Clone Modules for Multi-Digit Inputs

    Using WorldEdit (or manual rebuilding), copy the completed BCD-to-7-segment decoder module and paste it to create two rows of three displays (six displays total for Input A and Input B). Leave 3 blocks of horizontal space between adjacent digits and 1 block of vertical space between the top and bottom display rows.

How it works

This system uses a two-stage inverted torch logic (NOR logic) pipeline to convert a single button press into a visual number:

  • Keypad to BCD Encoder: Every button has a redstone torch behind it, holding its dedicated wire ON by default. Along that wire, encoding torches are attached to the sides above the 8, 4, 2, 1, and Signal output buses. Because the wire is normally ON, those side torches are held OFF. Pressing a keypad button turns its wire OFF for a pulse, allowing only the side torches attached to that specific wire to turn ON and output the binary value.
  • The Signal Bit: Because pressing 0 outputs 0000 on the BCD lines (which looks identical to pressing nothing at all), the 5th line (Signal bit) is triggered by every button from 0 to 9. This tells downstream shift registers and memory cells that a valid keypad entry occurred.
  • BCD to 1-of-10 Decoder: At the display unit, the 4-bit BCD signal enters a binary decoder grid. Depending on which of the 8, 4, 2, and 1 lines are powered, torches and repeaters force 9 of the 10 digit lines ON, leaving only the selected digit's line OFF.
  • 1-of-10 to 7-Segment Encoder: Each digit line splits into an upper and lower rail via a vertical torch inverter so it can reach all 7 segment wires. When a single digit line turns OFF, the torches attached to it turn ON, powering the exact combination of horizontal repeater groups and vertical torch towers needed to form the number on the redstone lamps.

Tips & variations

  • Keep Input Timing Synchronized: When routing the 10 wires out of the tightly packed keypad, make sure every single line passes through the exact same number of redstone torches (ideally just 1 torch). Every torch adds 1 redstone tick (2 game ticks) of delay; mismatched delays will cause bits to arrive out of sync at the shift registers.
  • Use WorldEdit to Save Time: As mentioned in the tutorial, building large computational circuits by hand is tedious. Use WorldEdit commands like //stack to extend the 20-block segment lines and //copy / //paste from a consistent reference block when duplicating the six 7-segment display units.
  • Signal Strength Management: The 7-segment decoder lines are over 20 blocks long. Place repeaters along the lower segment lines underneath the decoding grid so signals from the far end still reach the lamps at the front.

Frequently asked questions

Why do we need a 5th 'Signal' line in a 4-bit BCD encoder?
In binary-coded decimal, the number 0 is represented as 0000 (all four bit lines off). Without a 5th signal line that turns on whenever any button is pressed, the calculator's memory or shift register would not be able to tell the difference between the player pressing the 0 button and no button being pressed at all.
Why are all the keypad and decoder lines powered ON by default?
Redstone encoders and decoders rely on redstone torches acting as NOT/NOR gates. By keeping the main lines powered ON by default, all encoding torches attached to their sides stay OFF. When a line is selected and turns OFF, only its attached torches flip ON, preventing signal backfeed between different numbers.
Can I build this without WorldEdit?
Yes, all the logic uses standard vanilla redstone components (torches, dust, repeaters, slabs, and lamps). However, because the 7-segment display unit must be built six times for the two 3-digit inputs, using WorldEdit or Structure Blocks is heavily recommended to avoid manual placement errors.

Components used

More decoder / encoder