This circuit consists of the memory cells where the data is saved as well as the support circuitry. The support circuitry consists of the row select and the column select options. For reading the RW pin is high and for writing data it is low. A0 and A1 are the row select pins while A2 and A3 ar ethe column select pins. The particular memory cell is selected using these lines. The row select lines are given as the clock inputs for the flip-flops (memory cell) So as the particular flip-flop is selected and the clock goes from 0 to 1, the data gets latched on to it. And when write is selected, the latched data is output. The demux is used for selecting the column for writing data while the mux is used for selecting the column for reading data.