Digital logic & computing · tree view
Memory is an array of addressed cells: SRAM latches bits in flip-flops, DRAM refreshes leaking capacitors, and ROM/flash families trade write convenience for permanence. N address lines select one of 2^N words.
The basic goal of digital memory is to provide a means to store and access binary data: sequences of 1's and 0's.
The location of this data within the storage device is typically called the address, in a manner reminiscent of the postal service.
Many electronic memory devices store binary data by means of circuits that are either latched in a "high" or "low" state, and this latching effect holds only as long as electric power is maintained to those circuits. Such memory would be properly referred to as volatile.
What "RAM" really refers to is the volatility of the memory, and not its mode of access.
Only the cell circuit that is addressed by the 4-bit decoder input will be accessible through the data bus.
This simple memory circuit is random-access and volatile.
They called this type of memory circuit a dynamic RAM, because of its need of periodic refreshing.
Read-only memory (ROM) is similar in design to static or dynamic RAM circuits, except that the "latching" mechanism is made for one-time (or limited) operation.
It is volatile, which means all data in memory is lost when the power supply is removed.
Core storage is nonvolatile. This means the data is retained even if there is a power failure or breakdown, since the cores store data in the form of magnetic charges rather than electric current.
Another kind of memory used inside computers is called random-access memory (RAM) or read/write memory. RAM memory is rather like a blackboard on which you can scribble down notes, read them, and rub them out when you are finished with them.
Memory that enables us to do this without the programs and data being lost (even when the computer is powered down) is called read-only memory.
Some of the advantages of semiconductor storage are fast internal processing speeds, high reliability, low power consumption, high density (many circuits), and low cost. However, there is a drawback to this type of storage.
Random access means that you can quickly and precisely address a specific data location within the device, and non-random simply means that you cannot.
Storage media such as magnetized disk or tape is nonvolatile, because no source of power is needed to maintain data storage.
Recent advances in IC chip manufacturing has led to the introduction of flash memory, which works on a capacitive storage principle like the dynamic RAM, but uses the insulated gate of a MOSFET as the capacitor itself.
The memory (internal storage) section of a computer is essentially an electronically operated file cabinet.
Every memory cell sits behind a decoder: the address lines are a binary number, and exactly the one selected cell connects to the data bus (Kuphaldt's 16-cell array uses 4 address lines into a 1-of-16 decoder). The prediction rule is pure powers-of-two.
To predict the outcome:
| address_lines_n | words_selectable | example |
|---|---|---|
| 1 | 2 | selects between 2 cells |
| 4 | 16 | Kuphaldt's 16 x 1 static RAM |
| 8 | 256 | LUT-sized ROM (see the FPGA lesson) |
| 10 | 1,024 | 1 KiB = 2^10, not 1,000 |
| 16 | 65,536 | '64 kbyte' device — 2^16 bytes |
| 20 | 1,048,576 | 1 MiB = 2^20 |
| 32 | 4,294,967,296 | 4 GiB address space |
NEETS calls RAM "read/write memory" — a blackboard you scribble on and rub out — while ROM arrives pre-written by the manufacturer and cannot be changed in normal use. Predict each behaviour from those definitions, then check the verdict column.
To predict the outcome:
| operation | ram | rom | verdict |
|---|---|---|---|
| read word at address | works — returns stored word | works — returns stored word | no difference in reading |
| write new word at address | accepted — cell updated | ignored — contents fixed | the defining difference |
| power removed, then restored | data lost (volatile) | data retained (nonvolatile) | volatility, not access mode, decides |
| reprogram in the field | any time, any address | no; PROM once, EPROM only with UV/electrical eraser | write convenience costs permanence |
| typical job | working memory / variables | boot code, firmware, fixed tables | complements, not substitutes |
Two verdict axes only: does it lose data without power (volatile?), and can a user rewrite it in normal operation? Everything else (speed, density, refresh) follows from the storage mechanism — latched flip-flops need power; magnetic domains and trapped MOSFET gate charge do not.
To predict the outcome:
| technology | holds_bit_with | volatile | user_writable | typical_role |
|---|---|---|---|---|
| SRAM (static RAM) | flip-flop latch (bistable multivibrator) | yes | yes, any time | cache, small fast arrays |
| DRAM (dynamic RAM) | tiny capacitor + MOSFET, periodically refreshed | yes | yes, any time | main memory |
| ROM | fixed pattern written at manufacture | no | no | firmware, boot code |
| PROM | blown (or intact) fuses | no | once, with a programmer | one-time custom firmware |
| EPROM / EEPROM | charge on insulated MOSFET gate | no | yes, after UV or electrical erase | reworkable firmware, config storage |
| Flash | same floating-gate charge, block-erasable | no | yes, in blocks | SSDs, phone storage, MCU program memory |
| Magnetic disk / tape | magnetized domains on the medium | no | yes | bulk / backup storage |
| Ferrite core (historical) | bistable magnetization of a ferrite ring | no | yes | main memory 1960s–70s, read is destructive |
Kuphaldt builds a 16-bit static RAM from sixteen D latches, each with a tristate buffer pair on a shared 1-bit bus, all addressed by a 4-line decoder. Predict, for each address, which cell talks on the bus and what the other fifteen are doing.
To predict the outcome:
| address_a3_a2_a1_a0 | cell_enabled | others | bus_sees |
|---|---|---|---|
| 0000 | cell 0 | 15 cells high-Z | cell 0's stored bit |
| 0010 | cell 2 | 15 cells high-Z | cell 2's stored bit |
| 0111 | cell 7 | 15 cells high-Z | cell 7's stored bit |
| 1000 | cell 8 | 15 cells high-Z | cell 8's stored bit |
| 1111 | cell 15 | 15 cells high-Z | cell 15's stored bit |