D LATCH (DATA LATCH)
Stores a single bit. Has a Data input and an Enable input. When Enable is ON, the output follows the Data input. When Enable goes OFF, the output freezes at its current state.

When to Use
Sample-and-hold circuits, storing comparator readings, sequential logic, registers for binary computers.
Materials
- ▸2 Redstone Repeaters
- ▸Redstone Dust
- ▸Solid Blocks
- ▸Redstone Torches
Overview: what the D Latch (Data Latch) is and does
Stores a single bit. Has a Data input and an Enable input. When Enable is ON, the output follows the Data input. When Enable goes OFF, the output freezes at its current state.
As a memory circuit it stores a state and holds it after the input goes away, giving redstone the equivalent of a saved bit.
In practice it is used for sample-and-hold circuits, storing comparator readings, sequential logic, registers for binary computers. The build below targets vanilla Java Edition 1.21.
How it works: the redstone mechanics
It wraps an RS latch with two AND gates: when Enable is on, the Data input is steered to Set or Reset so the output copies Data; when Enable goes off, neither can fire and the output freezes at its last value. That is classic sample-and-hold behaviour.
It is assembled from 2 Redstone Repeaters, redstone Dust, solid Blocks, and redstone Torches, and each of those parts plays a specific timing or logic role in the circuit rather than being interchangeable filler.
Because this is a memory circuit, the thing to watch as you build is the input isolation — stray power on the wrong line can flip or corrupt the stored state.
How to build it
- 1Build an RS latch as the core memory element.
- 2Gate the Set input: AND the Data input with the Enable signal, this feeds Set.
- 3Gate the Reset input: AND the inverted Data (NOT Data) with Enable, this feeds Reset.
- 4When Enable is ON, Data=1 sets the latch, Data=0 resets it (output follows data).
- 5When Enable goes OFF, neither Set nor Reset can fire, output holds.
- 6Power it up and watch one full cycle: confirm it holds its state after you release the input before wiring it into a larger contraption.
Uses & applications
- ▸Sample-and-hold circuits, storing comparator readings, sequential logic, registers for binary computers.
- ▸Repeater-lock D latch (lock a repeater with the enable signal) — a variant suited to particular space or timing needs.
- ▸Torch-based D latch (classic gate implementation) — a variant suited to particular space or timing needs.
- ▸D flip-flop (edge-triggered version, only captures on Enable edge) — a variant suited to particular space or timing needs.
Tips & common mistakes
- !While Enable is high the output tracks Data live, so latch the value by dropping Enable at the exact moment you want to capture it.
- !Label or colour-code your Set/Reset (or Data/Enable) inputs while building; mixing them up is the usual cause of a latch that will not hold.
- !Remember that bare redstone dust loses 1 signal strength per block, so insert a repeater before any run exceeds 15 blocks inside this circuit.
D Latch (Data Latch) FAQ
What is a D Latch (Data Latch) used for?
A D Latch (Data Latch) is used for sample-and-hold circuits, storing comparator readings, sequential logic, registers for binary computers. As a memory circuit it stores a state and holds it after the input goes away, giving redstone the equivalent of a saved bit.
What do you need to build a D Latch (Data Latch)?
You need 2 Redstone Repeaters, redstone Dust, solid Blocks, and redstone Torches. Build an RS latch as the core memory element.
How does a D Latch (Data Latch) work?
It wraps an RS latch with two AND gates: when Enable is on, the Data input is steered to Set or Reset so the output copies Data; when Enable goes off, neither can fire and the output freezes at its last value. That is classic sample-and-hold behaviour.
Are there different versions of the D Latch (Data Latch)?
Yes — common variants include repeater-lock D latch (lock a repeater with the enable signal), torch-based D latch (classic gate implementation), and D flip-flop (edge-triggered version, only captures on Enable edge). Pick the one that fits your available space and timing requirements.