Redstonery
RedstoneryCircuits › Two-bit ripple counter
Memory circuit

Two-bit ripple counter

Use state to count accepted events.

11 × 1 footprint1 layer11 blocksTested in 4 rotationsJava Edition 26.2
Open in the simulatorBuild it in the game

Layout

Layer 0 (on the floor)
lever [face=floor, facing=north, powered=false] at x 0, z 0redstone dust at x 1, z 0copper bulb at x 2, z 0comparator [facing=west, mode=compare] at x 3, z 0redstone dust at x 4, z 0stone at x 5, z 0redstone torch (on a wall) [facing=east] at x 6, z 0redstone dust at x 7, z 0copper bulb [lit=true] at x 8, z 0comparator [facing=west, mode=compare] at x 9, z 0redstone dust at x 10, z 0
redstone dustredstone torchrepeater or comparatorinputcopper bulbsolid blockarrows point where a device sends its output; north is up

How it works

Two copper-bulb toggles count rising edges modulo four: 00, 01, 10, 11, then 00. An inverter makes Bit 1 toggle when Bit 0 falls. Hold the input to see that it counts once. Preview Reset restores 00; this layout has no independent electrical reset pin.

  1. Two copper-bulb toggles count rising edges modulo four. An inverter makes Bit 1 toggle when Bit 0 falls.
  2. Read Bit 1 then Bit 0 as 00, 01, 10, 11, then 00. Preview Reset restores the initial state; there is no independent electrical reset input.

Inputs and outputs

  • InputCount (x 0, y 0, z 0)
  • OutputBit 0 (x 4, y 0, z 0)
  • OutputBit 1 (x 10, y 0, z 0)

Blocks you need

4 × redstone dust, 2 × copper bulb, 2 × comparator, 1 × lever, 1 × stone, 1 × redstone torch (on a wall).

Build it in the game: 11 commands

Relative to where you stand, with x running east and z running south. Paste one line at a time into chat, or into a chain of command blocks. The block art is the game's own; the layout is what the page above shows.

setblock ~0 ~0 ~0 minecraft:lever[face=floor,facing=north,powered=false]
setblock ~1 ~0 ~0 minecraft:redstone_wire
setblock ~2 ~0 ~0 minecraft:copper_bulb
setblock ~3 ~0 ~0 minecraft:comparator[facing=west,mode=compare]
setblock ~4 ~0 ~0 minecraft:redstone_wire
setblock ~5 ~0 ~0 minecraft:stone
setblock ~6 ~0 ~0 minecraft:redstone_wall_torch[facing=east]
setblock ~7 ~0 ~0 minecraft:redstone_wire
setblock ~8 ~0 ~0 minecraft:copper_bulb[lit=true]
setblock ~9 ~0 ~0 minecraft:comparator[facing=west,mode=compare]
setblock ~10 ~0 ~0 minecraft:redstone_wire