REDSTONEPEDIA › Circuits › Memory and counters

On button + off button memory (RS latch)

reacts in 6 ticks (0.3 s) · 4 blocks

Press the set button (S) and the output turns on and stays on; press the reset button (R) and it turns off and stays off.

made of comparator, dropper · fits in 2×2×2

On/off memoryOn/off memory3D view loading (or not available in this browser)

Try it

Use the R and S buttons under the view to drive the inputs: the box marked OUT turns red while the output is on. Press play under the view to watch a demo on a loop; touch any other control to take over.

How this design does it: Two droppers face each other and hold one stone between them.

Build it

Download .litematic Download the design as text

The .litematic opens in Litematica (Minecraft 26.3): every block of the design in one region. The text file is the same build written as plain text, block by block.

Comes loaded with 1 stone in its containers: the download includes it; building it by hand, put it in first.

Blocks used: comparator dropper stone

Details: how it works, measurements and properties

In depth

A one-bit memory. A pulse on S (set) turns the output on, and it stays on; a pulse on R (reset) turns it off, and it stays off. It remembers which one came last.

How to try it

Press play under the view to watch the demo on a loop (the badge reads demo with the step it is on; the same sequence is drawn as a timing diagram below). Touch any control to stop it and try the circuit yourself.

To try it: press and hold the R button of the bar (or the cell tagged R) to power that input; a quick tap sends a short 2-tick pulse; press and hold the S button of the bar (or the cell tagged S) to power that input; a quick tap sends a short 2-tick pulse.

Inputs are tagged in lime; the output is tagged OUT: the redstone lamp in that cell (the view adds it to show the output) lights while the output is on (the output strip by the demo badge shows its last 40 game ticks, 2 seconds). Drag to look around, pinch or scroll to zoom, step one game tick at a time with the step button.

Inputs and output over time

The inputs follow this schedule (the 3D view's demo plays the same). Lime: an input is on; orange: the output is on (taller = a stronger signal, 1 to 15). Time runs left to right in game ticks (20 ticks = 1 s).

a 200-tick press on set (S)a 200-tick press on reset (R)RSOUTticks050100150200250300350400450500550600650700750

Swipe the diagram sideways: the whole sequence lasts 805 ticks (40.25 s).

Step by step (12 lines)
s pulse 4: q = 1 after 6 ticks (0.3 s)
s pulse 4: q = 1
r pulse 4: q = 0 after 6 ticks (0.3 s)
r pulse 4: q = 0
s pulse 4: q = 1 after 6 ticks (0.3 s)
r pulse 4: q = 0 after 6 ticks (0.3 s)
s pulse 20: q = 1 after 6 ticks (0.3 s)
r pulse 20: q = 0 after 6 ticks (0.3 s)
s pulse 30: q = 1 after 6 ticks (0.3 s)
r pulse 30: q = 0 after 6 ticks (0.3 s)
s pulse 200: q = 1 after 6 ticks (0.3 s)
r pulse 200: q = 0 after 6 ticks (0.3 s)

Measurements

metricvaluewhat it means
latency6 ticks (0.3 s)the worst time from an input change to the output's change
tileableevery 2 (0 2 0)

Notes from its designer

Two droppers face each other and hold one stone between them. s (next to the dropper by S) fires that dropper and the stone goes to the other one; r fires the dropper by R and it comes back; firing the empty one does nothing, so repeated s or r change nothing. A comparator on stone reads the dropper by R: q is its output (1). A stack of them tiles with NO gap: a column of latches costs 4 blocks per bit.

Properties

StudyMemory and counters
KindOn button + off button memory (RS latch)
Blocks placed4 (not counting the input levers or buttons and the lamp the view adds)
Box2×2×2 (8 blocks of space)
Made of (the blocks that change state)comparator, dropper
Inputs / outputsR (repeater), S (repeater) / OUT
Design filers-dropper

The design file

on GitHub

Design file (21 lines)
# On/off memory: reacts in 6 ticks (0.3 s) · 4 blocks
# https://vjeux.github.io/redstonepedia/circuits/memory/rs-dropper.html
name: rs-dropper
circuit: rs-latch
tile: 0 2 0
port input.s: -1 1 0
port input.r: 2 1 0
port output: 1 1 2
nbt: 0 1 0 {Items:[{Slot:0b,id:"minecraft:stone",count:1}]}
origin: 0 0 0
palette:
  S minecraft:stone
  A minecraft:dropper[facing=east,triggered=false]
  B minecraft:dropper[facing=west,triggered=false]
  C minecraft:comparator[facing=north,mode=compare,powered=false]
layer 0:
  ..
  .S
layer 1:
  AB
  .C