How Computer Memory Works
By Stephen Bucaro
An important part of Von Neumann's stored program architecture is the memory,
because that is where not only the program is stored, but also where the data that
the program works on, and any temporary results are stored. Although a computer
uses all kinds of memory for various functions, the memory where the program
can be executed and the data is manipulated is called "main memory".
Every program being executed and every piece of data being manipulated must
be copied from a storage device, such as a magnetic disk, into main memory.
The amount and speed of main memory is possibly the most important factor
in determining the power of a computer.
Types of Memory
It's important to understand the basic types of memory. When computer data is
"backed up" it is usually backed up to a tape drive. A tape drive represents "serial"
or "sequential" memory. With serial memory, data is accessed sequentially. This
has the disadvantage that access time depends on the location of the desired
data on the serial storage device.
Random Access Memory (RAM) is a type of memory where any byte of memory can
be accessed randomly, without examining the preceding bytes. The term RAM is also
used to distinguish read⁄write memory from Read Only Memory (ROM) which
is unfortunate because ROM is also accessed randomly.
Whereas you can read and write data to RAM any number of times, you can write
to ROM only one time. After that you can only read from the ROM memory. The term
ROM is also used to distinguish non-volatile memory from volatile memory. With
volatile memory, when the computer power is lost, so is the data in the RAM.
However, with ROM, data is not lost when the computer power is lost. ROM is
important because it contains the basic programming and data that allows your
computer to be "booted up" or restarted each time you turn it on.
If you're not confused enough about the different types of memory, there are also
various types of "electrically alterable" ROM memory. These devices normally work
like a ROM, that is read only, but with the proper control signals they can be re-written.
Most of the time these are referred to as EPROM (Erasable Programmable ROM),
but they can also be called EAROM, EEPROM, E^2PROM, and may other contractions.
RAM can also be divided into "static" and "dynamic" types. You might think dynamic
RAM (DRAM) must be far superior to static RAM (SRAM), but no. DRAM is used for the
computers main memory because it's cheap to manufacture. However, like everything
in life, there are always trade-offs. The trade-off with DRAM is that it quickly loses its
contents. It must be constantly "refreshed", and this requires complicated circuitry.
How a Capacitor Works
A capacitor consists of two conductor plates which are very close to each other,
but have a dielectric insulator between them. When you apply an electric charge
across a capacitor, electrons can't flow through the insulator, so they build up on
the plate connected to the negative voltage source. Although electrons can't flow
through the insulator, an electrostatic charge can pass through the insulator, thus
repelling electrons on the opposite plate, causing it to gain a positive charge.
If you apply a positive electric voltage to a capacitor, and then remove its continuity
to the circuit, it will retain the voltage. Obviously, if the voltage is equal to the
level defined as binary 1, you have stored a binary bit. If you restore the continuity
with zero volts, the capacitor will discharge. If you then remove its continuity,
you have stored a binary 0. This is how a binary bit is stored in DRAM.