How do I create an RS-NOR latch with a toggle input in addition to the standard "On" and "Off" buttons? [BEDROCK EDITION]

Upon request from moderators/experts, this question has been split into two questions, one for each of the main editions of Minecraft. If you have an answer for Java Edition, please post it here.


I am creating a redstone contraption that is based off an RS-NOR latch and a T-flip-flop at once.
The contraption needs to have three pulse-based inputs and one output.

Here are the inputs and their descriptions of what they should do:

  • "On" button: Turn the output on, or keep it on if it is already on.
  • "Off" button: Turn the output off, or keep it off if it is already off.
  • "Toggle" button: Toggle the state of the output, no matter what state it was in before.

Many online tutorials provide a solution for an RS-NOR latch or a T-Flip-Flop alone, but not this combination of them.

What is the most compact way to construct a redstone contraption like this?

Please include images with your solution.


Solution 1:

The primary mechanism you're going to want is an RS latch and some AND gates. This will operate as a regular RS latch when you press the On or Off button, and as a Toggle when you press Toggle. This works by routing the toggle signal to the appropriate end of your RS latch, turning it on or off based on the current state of the RS latch

Circuit diagram consisting of an RS latch and a pair of AND gates

I feel like I've been here before. Anyway. As it turns out there are quite a few differences in how Minecraft Bedrock Edition redstone works that I don't fully understand, which makes my Java Edition answer inoperative in Bedrock edition. However, with some small tweaking, it can be made to work.

The main tweak is a monostable circuit on the Toggle line:

Input lines with monostable circuit

This circuit uses a sticky piston to, in one game tick, send a redstone pulse and cut it off. This causes the Toggle input to only be on for 1 tick. This prevents the mechanism from cycling more than once when the toggle button is pressed. Without this, the pistons will switch back and forth repeatedly until the signal turns off, which is not what we want.

From here, only minor tweaks are required to the original Java mechanism (Bedrock edition has different rules about when redstone dust connects to pistons, so a few more redstone repeaters were required):

RS Latch and AND gate mechanism

As in my previous answer, there are sticky pistons underneath the gold blocks which act as AND gates, and a redstone repeater underneath the diamond block to keep the signal from the repeater on the Reset line from being directly connected to the Output line.

Unfortunately, due to the monostable circuit, this build is quite a bit bulkier in Bedrock edition, coming in at 9x4 on Bedrock (vs 5x4 on Java).