Understanding Computer Memory
Understanding computer memory is important because your computer's memory is where
the action is. Sure your computer's central processing unit (CPU) may be the computer's
brain, but what good is a brain without memory?
Because memory is such an important part of the computer, it has been redesigned
and tweaked over the years to make it store more data and work faster. That has
resulted in all kinds of technical terms and contractions. In this article, I attempt
to clear up some of these terms and give you a basic understanding of computer memory.
When you work with an application on your computer, it is loaded into "main memory".
There are other kinds of memory besides main memory. For example, there is "flash BIOS"
memory and "cache" memory. In fact, I could argue that a computer consists mainly of
memory. Even the CPU consists mainly of a type of memory called "registers". In this
article, I focus on main memory.
Memory is actually an array of "cells". Each cell holds a binary bit, either 0 or 1.
The cells are arranged in rows of 32 cells to store each "word". A word might contain
the bits to code a single number or a single character. Each word can be accessed by
it's address. A computer does not have to access the addresses in numerical order. It
can store or retrieve a word from any address at random, hence the term "random access
Because a computer needs millions of memory cells, they have to be cheap. The
cheapest memory cell is an extremely tiny capacitor. In reality "0" means no electric
charge is stored in the cell and "1" means an electric charge is stored in the cell.
A tiny capacitor can store an electric charge, but that charge dissipates off within
a few milliseconds. To prevent loss of the data, the computer uses circuitry that
repeatedly scans all the memory cells and refreshes the charge in any cells that
contain a "1". This circuitry operates between accesses of the memory by the CPU and
other components. This continuous recharging is referred to as "dynamic" refresh, hence
the term "dynamic" RAM (DRAM).
I am always surprised at how many people who work with computers don't understand
what a "bus" is. It's very simple. You need a wire to connect to a memory cell.
Instead of a wire, a circuit board uses a copper "trace" inside or on the surface of
the circuit board. To access a word of data, you need 32 parallel traces. You also
need a few traces to carry the signals that control whether you are reading or writing
the memory. This describes the "data bus".
To access a word of data, you need to provide the address of the word. It requires
64 parallel traces for the "address bus". There are many other parallel groups of
traces on the circuit board that conduct various communication and control signals,
each of them is referred to as a "bus". The most important signal tracing around the
circuit board is the system clock.
The system clock is the "heart beat" of the system. It is a continuous stream of
electric pulses at a very high frequency. If you have a 1.2 GHz computer system, then
your system clock pulses come at a rate of 1,200,000,000 per second. Memory can be
accessed on the rising edge of the system clock. In other words, memory reading and
writing is synchronized to the system clock, hence the term "synchronous" DRAM (SDRAM).