I'm building a bank with 100's of features. I need a button that I can press to alternate which ram to use (i.e.: Before I press the button once, RAM 1 will be open to receiving inputs and the other 3 RAMs will be closed off. If I press the button once, the first RAM will be closed and the second one will be the only one receiving inputs. If I press it for a second time, the 3rd RAM will be receivable while the 1st, 2nd and 4th RAMs will be closed, and so forth. This method I need is for my customizable 10-digit lock for the safe inside the bank.
23 Answers
Probably not the most compact solution, but one that should work in every release since some beta version and probably also the future:
Since these images aren't enough to rebuild it, here's a structure file.*
The size is 6x6x6 plus an input line that sends a two redstone tick long signal.
How it works:
The stone block and the three glass blocks get moved around by the pistons. Under each of them there's a redstone torch, but only the stone block conducts its signal, which can be taken out with a repeater or redstone dust. This principle is called a "piston tape", because you can basically write binary data into it, this is just a really small example with the data 0001.
The pistons are activated with proper timing using a small torch tower, because the wiring got extremely messy when I tried to put input and output on roughly the same height.
*That file is on my Google Drive, but it shouldn't get deleted. If I accidentally delete it, contact me (contact details on my profile page) saying that the file is in my November 2018 backup and link this answer.
Three pistons in positions as depicted, handing a redstone block to each other when pulsed simultaneously with 1-tick pulse like from an observer or a monostable.
The central output should be passed through a comparator to filter out momentary pulses as the block "passes through" but switch on when it's deposited in the central location.
For producing 1-tick pulse from a button you can use any classic monostable, like the upwards-piston one:
Obviously that only works in Java Edition. Also, the pistons must be in configuration left-right-top due to quasi-connectivity. If you want left-right-bottom, you'll need to use a full composter of cauldron as the moving block, and comparators in all positions to read the output, in case of the central one through adjacent solid block. This can be also used for a quintuple flip-flop:
Probably the easiest and least quirky design, the only disadvantage being funny placement of outputs. The 4 droppers feed in a loop. The hoppers are necessary as it depends on update order how far an item will travel if ejected directly from a dropper into another dropper powered in the same tick.