A memory write stores a new word at a given address. The steps, with active-high controls:
- Put the address on the address lines.
- Put the data word on the data lines.
- Set R/W = 0 (write) and activate CS.
- Inside, the address decoder activates one word line, and the data is stored into that row.
- Deactivate CS. The word stays stored.
The old contents of that location are overwritten completely. Every other location is untouched.
Why the order matters: the address must be stable before the write is enabled. If CS went active while the address lines were still changing, the decoder could briefly select other rows and the chip might store the data in the wrong place.
A write to a chip whose CS is inactive does nothing. And only RAM (and rewritable members of the ROM family, with special procedures) can be written at all.
In the diagram, the chip stores the word while CS = 1 and R/W = 0.