On write enable, the four data-inputs are saved to the d-flipflops selected by the address inputs. The output is always read from the current selected flipflops.
Connect a clock, buttons for reset and write_enable and switches for address and data like shown below. The output can be read by using 4 LEDs or any other kind of binary output device.
# | Input | Output |
---|---|---|
0 | clock | data1 |
1 | reset | data2 |
2 | write_enable | data3 |
3 | addr1 | data4 |
4 | addr2 | |
5 | data1 | |
6 | data2 | |
7 | data3 |