this is not the best way to create RAM. but it's pretty close. right now, your ram is using only one green line at a time. normal RAM uses a decoder in the address line and multiplexers at the output