This is just a stub for now but in order to avoid your inevitable disappointment have a lovely link.
From a top level perspective you can think of each bit of computer memory as having the following functionality.
- It must retain its state (either zero or one) at least semi-permanently. RAM will often lose its state when power is removed and ROM will often lose its state if left for a period of years, but for our purposes here, it remembers what it is set to.
- It must allow external hardware to read its value.
- It must allow external hardware to write its value.