I'd like to build a queue of three internal bits as inexpensively as possible. Externally, the queue has two input bits and one output bit. The inputs are (dataIn) and (shift), and the output is (dataOut). The internal bits are arranged from the left to the right, and can be implemented in any way imaginable, as long as it's as inexpensive as possible. In my mind's eye I'm thinking of something like a DRAM, where there's just one transistor/capacitor pair per each bit, but I don't know if that's possible.
The output (dataOut) always has the value of the internal bit on the right. While (shift) is low, all three internal bits just retain their current value. When (shift) goes high, the internal bit on the left takes the value of (dataIn), the internal bit in the middle takes the former value of the bit on the left, and the internal bit on the right takes the former value of the bit in the middle.
In particular, I'm interested in whether or not this can occur with just three internal bits, or whether instead each bit has to have a master (set on one edge of changing (shift)) and a slave (set from the value of the master on the other edge).
Also, a size of three is just a fairly simple example of what I want to have; ultimately my design is going to need much larger groups of internal bits.