Is your memory like an elephant's... or is it more like a sieve? You often hear people comparing themselves to one of those things, but you almost
never hear someone say their memory is like a computer. That's
partly because human brains and computer memories have very different
purposes and operate in quite different ways. But it also reflects
the fact that where we humans often struggle to remember names,
faces, and even the day of the week, computer memories are the
closest thing we have to memory perfection. How exactly do these "remarkable
rememberers" actually work? Let's take a closer look!
Photo: A computer memory chip like this is an example of an
That means it's a miniaturized collection of thousands of electronic parts (usually
called components) created on a tiny chip of silicon about the size of a pinkie nail. This one is a 1-gigabit
NAND flash memory chip from a USB memory stick.
Illustration: Computers remember things in a very different way from human brains, although it is
possible to program a computer to remember things and recognize patterns in a brain-like way
using what are called neural networks.
Historic illustration of brain anatomy c.1543 by Jan Stephan van Calcar, who worked closely
with the pioneering anatomist Andreas Vesalius.
The basic purpose of memory—human or machine—is to keep a record of
information for a period of time. One of the really noticeable things about
human memory is that it's extremely good at forgetting. That sounds
like a major defect until you consider that we can only pay
attention to so many things at once. In other words, forgetting is most likely a clever
tactic humans have evolved that helps us to focus on the things that are
immediately relevant and important in the endless clutter of our
everyday lives—a way of concentrating on what really matters. Forgetting
is like turning out old junk from your closet to make room for new stuff.
Computers don't remember or forget things the way that human brains do.
Computers work in binary (explained more fully in the box
below): they either know something or they
don't—and once they've learned, barring some sort of catastrophic
failure, they generally don't forget. Humans are different.
We can recognize things ("I've seen that face before somewhere")
or feel certain that we know something ("I remember learning the
German word for cherry when I was at school") without necessarily being able to
recollect them. Unlike computers, humans can
forget... remember... forget... remember... making memory seem more
like art or magic than science or technology. When clever people
master tricks that allow them to memorize thousands of pieces of
information, they're celebrated like great magicians—even though
what they've achieved is far less impressive than anything a
five-dollar, USB flash memory stick could do!
The two types of memory
One thing human brains and computers do have in common is different types of
memory. Human memory is actually split into a short-term "working"
memory (of things we've recently seen, heard, or processed with our
brains) and a long-term memory (of facts we've learned, events we've
experienced, things we know how to do, and so on, which we generally
need to remember for much longer). A typical computer has two different kinds of memory as well.
There's a built-in main memory (sometimes called internal memory), made
up of silicon chips (integrated circuits). It can store and retrieve
data (computerized information) very quickly, so it's used to help the computer process whatever it's currently working on. Generally, internal memory is volatile, which means it forgets its contents as soon as the power is
switched off. That's why computers also have what's called auxiliary
memory (or storage) as well, which remembers things even when the power is disconnected.
In a typical PC or laptop, auxiliary memory is generally provided by a hard drive or a
flash memory. Auxiliary
memory is also called external memory because in older, larger
computers, it was typically housed in a completely separate machine
connected to the main computer box by a cable. In a similar way, modern
PCs often have plug-in auxiliary storage in the form of USB flash
memory sticks, SD memory cards (which plug into things like digital
cameras), plug in hard-drives, CD/DVD ROMs and rewriters and so on.
Photo: These two hard drives are examples of auxiliary computer memory. On the left, we have a 20GB PCMCIA hard drive from an iPod. On the right, there's a somewhat bigger 30GB hard-drive from a laptop. The 30GB hard drive can hold about 120 times more information than the 256MB flash memory chip in our top photo. See more photos like this in our
main article on hard drives.
In practice, the distinction between main memory and auxiliary memory can get a little blurred.
Computers have a limited amount of main memory (typically somewhere between 512MB and 4GB on a modern computer). The more they have, the more quickly they can process information, and the faster they get things done. If a computer needs to store more space than its main memory has room for, it can temporarily move less important things from the main memory onto its hard drive in what's called a virtual memory to free up some space. When this happens, you'll hear the hard drive clicking away at very high speed as the computer reads and writes data back and forth between its virtual memory and its real (main) memory. Because hard drives take more time to access than memory chips, using virtual memory is a much slower process than using main memory—and it really slows your computer down. That's essentially why computers with more memory work faster.
Photo: Most memory chips are two dimensional, with the transistors (electronic switches) that store information laid out in a flat grid. By contrast, in this 3D stack memory, the transistors are arranged vertically, as well as horizontally, so more information can be packed into a smaller space. Photo courtesy of
NASA Langley Research Center (NASA-LaRC).
RAM and ROM
The chips that make up a computer's internal memory come in two broad flavors
known as RAM (random access memory) and
ROM (read-only memory).
RAM chips remember things only
while a computer is powered on, so they're used for storing whatever
a computer is working on in the very short term. ROM chips, on the
other hand, remember things whether or not the power is on. They're
preprogrammed with information in the factory and used to store
things like the computer's BIOS (the basic input/output system that
operates fundamental things like the computer's screen and keyboard).
RAM and ROM are not the most helpful names in the world, as we'll shortly find out,
so don't worry if they sound baffling. Just remember
this key point: the main memory inside a computer is based on two kinds
of chip: a temporary, volatile kind that remembers only while
the power is on (RAM) and a permanent, nonvolatile kind that
remembers whether the power is on or off (ROM).
The growth of RAM
Today's machines have vastly more RAM than early home computers. This table shows typical amounts of RAM for Apple computers, from the original Apple I (released in 1976) to the iPhone 12 smartphone (released over four decades later) with about
half a million times more RAM onboard! These are rough comparisons based on the idea of KB meaning about 1000 bytes,
MB meaning about a million bytes, and GB meaning about a billion. In fact, KB, MB, and GB can be a little bit ambiguous,
since in computer science, 1KB is actually 1024 bytes. Don't worry about it: it really doesn't change these comparisons very much.)
~ × Apple I
Photo: The Apple ][ had a basic 4K of memory, expandable to 48K. That seemed a huge amount at the time, but a modern smartphone has about 60,000 times more RAM than its 48K predecessor.
In 1977, a 4K RAM upgrade for an Apple ][ cost a whopping $100, which works out at $1 for 41 bytes; today, it's easy to find 1GB for less than $10, so $1 buys you over 100MB—about 25 million times more memory for your money!
Random and sequential access
This is where things can get slightly confusing. RAM has the name random
access because (in theory) it's just as quick for the computer to
read or write information from any one part of a RAM memory chip as from any
other. (Incidentally, that applies just as much to most ROM chips, which
you could say are examples of nonvolatile, RAM chips!) Hard drives are
also, broadly speaking, random-access devices, because it takes
roughly the same time to read information from any point on the drive.
Picture: 1) Random access: A hard drive can read or write any piece of information in more or less the same amount of time, just by scanning its read-write head back and forth over the spinning platter.
2) Sequential access: A tape drive has to spool the tape backward or forward until it's at the right position before it can read or write information.
Not all kinds of computer memory is random access, however. It used to be common
for computers to store information on separate machines, known as tape drives, using long
spools of magnetic tape (like giant-sized versions of the music
cassettes in old-fashioned Sony Walkman cassette players). If
the computer wanted to access information, it had to spool backward
or forward through the tape until it reached exactly the point it
wanted—just like you had to wind back and forth through a tape for
ages to find the track you wanted to play. If the tape was right at the
beginning but the information the computer wanted was at the very end,
there was quite a delay waiting for the tape to spool forward to the right
point. If the tape just happened to be in the right place, the computer
could access the information it wanted pretty much instantly.
Tapes are an example of sequential access: information
is stored in sequence and how long it takes to read or write a
piece of information depends where the tape happens to be in relation
to the read-write head (the magnet that reads and writes information
from the tape) at any given moment.
Photo: Sequential access in action: This is the operator's terminal of an IBM System/370 mainframe computer dating from 1981. You can see a bank of five tape drives whirring away in the background and, behind them, cupboards filled with stored tapes. If the computer needed to read some really old data (say, last year's payroll records or a backup of data made a few days ago), a human operator had to search for the correct tape in the cupboard and then "mount it" (load it into the drive) before the machine could read it! We still talk about "mounting" discs and drives to this day, even when all we mean is getting a computer to recognize some part of its memory that isn't currently active. Photo courtesy of NASA Glenn Research Center (NASA-GRC).
DRAM and SRAM
RAM comes in two main varieties called DRAM (dynamic RAM) and
SRAM (static RAM). DRAM is the less expensive of the two and has a higher density
(packs more data into a smaller space) than SRAM, so it's used for
most of the internal memory you find in PCs, games consoles, and so on.
SRAM is faster and uses less power than DRAM and, given its greater
cost and lower density, is more likely to be used in the smaller,
temporary, "working memories" (caches) that form part of a
computer's internal or external memories. It's also widely used in portable gadgets such
as cellphones, where minimizing power consumption (and maximizing
battery life) is extremely important.
The differences between DRAM and SRAM arise from the way they're built
out of basic electronic components. Both types of RAM are volatile,
but DRAM is also dynamic (it needs power to be zapped
through it occasionally to keep its memory fresh) where SRAM is
static (it doesn't need "refreshing" in the same way). DRAM is
more dense (stores more information in less space) because it uses
just one capacitor and one transistor to store each bit (binary
digit) of information, where SRAM needs several transistors for each
Photo: An old-fashioned 32K EPROM chip dating from 1986. You could only erase and reprogram these by blasting ultraviolet light through the little circular window!
Like RAM, ROM also comes in different varieties—and, just to confuse matters, not all of it is strictly
readonly. The flash-memory you find in USB memory sticks and
digital camera memory cards is actually a kind of ROM that retains
information almost indefinitely, even when the power is off (much like conventional ROM) but
can still be reprogrammed relatively easily whenever necessary (more
like conventional RAM). Technically speaking, flash memory is a type of EEPROM (electrically
erasable programmable ROM), which means information can be stored or wiped out
relatively easily just by passing an electric current through the memory.
Hmmm, you might be thinking, doesn't all memory work that way... by passing electricity through it? Yes!
But the name is really a historic reference to the fact that erasable
and reprogrammable ROM used to work a different way. Back in the 1970s, the most common form of
erasable and rewritable ROM was EPROM (erasable programmable ROM).
EPROM chips had to be erased by the relatively laborious and inconvenient method of first removing them from their circuit
and then blasting them with powerful ultraviolet light.
Imagine if you had to go through that longwinded process every time you wanted to store a new set of photos
on your digital camera memory card.
Gadgets such as cellphones, modems, and wireless routers often
store their software not on ROM (as you might expect) but on
flash memory. That means you can easily update them with new firmware
(relatively permanent software stored in ROM), whenever an upgrade
comes along, by a process called "flashing." As you may have
noticed if you've ever copied large amounts of information to a flash
memory, or upgraded your router's firmware, flash memory and
reprogrammable ROM works more slowly than conventional RAM memory and
takes longer to write to than to read.
The most popular kinds of auxiliary memory used in modern PCs are hard drives,
CD/DVD ROMs, and solid-state drives (SSDs), which are similar to hard drives only
they store information on large amounts of flash memory instead of spinning magnetic discs.
Photo: The 3.5-inch floppy disk was the most popular form of auxiliary memory
in the 1980s and 1990s—these were the flash sticks of their time! Inside the hard, plastic protective case, there's a flimsy spinning circle of magnetic material—that's the floppy bit. You can see it if you gently slide the shutter at the top.
But in the long and fascinating history of computing, people have used all kinds of other memory devices, most of which stored information by magnetizing things.
Floppy drives (popular from about the late-1970s to the mid-1990s) stored
information on floppy disks. These were small, thin circles of plastic, coated with magnetic material, spinning inside durable plastic cases, which were gradually reduced in size from about 8 inches, through 5.25 inches, down to the final popular size of about 3.5 inches.
Zip drives were similar but stored much more information in a highly compressed
form inside chunky cartridges. In the 1970s and 1980s, microcomputers
(the forerunners of today's PCs) often stored information using
cassette tapes, exactly like the ones people used back then for
playing music. You might be surprised to hear that big computer departments still widely use tapes for backing
up data today, largely because this method is so simple and inexpensive. It doesn't matter that
tapes work slowly and sequentially when you're using them for backups, because generally you want
to copy and restore your data in a very systematic way—and time isn't necessarily that critical.
Photo: Memory as it used to be in 1954. This closet-sized magnetic core memory unit (left),
as tall as an adult, was made up of individual circuits (middle) containing tiny rings of magnetic material (ferrite), known as cores (right), which could be magnetized or demagnetized to store or erase information. Since any core could be read from or written to as easily as any other, this was a form of random access memory. Photos courtesy of NASA Glenn Research Center (NASA-GRC).
Going back even further in time, computers of the 1950s and 1960s recorded information on
magnetic cores (small rings made from ferromagnetic
and ceramic material) while even earlier machines stored information using
relays (switches like those used in telephone circuits) and
vacuum tubes (a bit like miniature versions of the cathode-ray tubes
used in old-style televisions).
How memories store information in binary
Photos, videos, text files, or sound, computers store and process all kinds of information
in the form of numbers, or digits. That's why they're sometimes called digital computers.
Humans like to work with numbers in the decimal (base 10) system (with ten different digits ranging from 0 through 9).
Computers, on the other hand, work using an entirely different number system
called binary based on just two numbers, zero (0) and one (1). In the decimal system, the columns of numbers correspond to ones, tens, hundreds, thousands, and so on as you
step to the left—but in binary the same columns represent powers of two
(two, four, eight, sixteen, thirty two, sixty four, and so on). So the
decimal number 55 becomes 110111 in binary, which is 32+16+4+2+1. You need a lot more
binary digits (also called bits) to store a number. With eight bits (also called a byte), you can store any decimal number from 0–255 (00000000–11111111 in binary).
One reason people like decimal numbers is because we have 10
fingers. Computers don't have 10 fingers. What they have instead is
thousands, millions, or even billions of electronic switches called
transistors. Transistors store binary numbers when electric currents
passing through them switch them on and off. Switching on a transistor stores a one; switching it off
stores a zero. A computer can store decimal numbers in its memory by switching off a
whole series of transistors in a binary pattern, rather like someone holding
up a series of flags. The number 55 is like holding up five flags and
keeping one of them down in this pattern:
Artwork: 55 in decimal is equal to (1×32) +
(1×16) + (0×8) + (1×4) + (1×2) + (1×1) =
110111 in binary. A computer doesn't have any flags inside it, but it can store the
number 55 with six transistors switched on or off in the same pattern.
So storing numbers is easy. But how can you add,
subtract, multiply, and divide using nothing but electric currents? You
have to use clever circuits called logic gates, which you can read all
about in our logic gates article.
A brief history of computer memory
Artwork: IBM's original hard drive from its 1954/1964 patent. You can see the multiple spinning discs, highlighted in red, in the large memory unit on the right. Artwork from US Patent 3,134,097: Data storage machine by Louis D. Stevens et al, IBM, courtesy of US Patent and Trademark Office.
Here are just a few selected milestones in the development of computer memory; for the bigger picture, please check out our detailed article on the history of computers.
1804: Joseph Marie Jacquard uses cards with holes punched into them to control textile-weaving looms. Punched cards, as they're known, survive as an important form of computer memory until the early 1970s.
1835: Joseph Henry invents the relay, an electromagnetic switch used as a memory in many early computers before transistors are developed in the mid-20th century.
19th century: Charles Babbage sketches plans for elaborate, gear-driven computers with built-in, mechanical memories.
1947: Three US physicists, John Bardeen, Walter Brattain, and William Shockley, develop the transistor—the tiny switching device that forms the heart of most modern computer memories.
1949: An Wang files a patent for magnetic core memory.
1950s: Reynold B. Johnson of IBM invents the hard drive, announced to the public on September 4, 1956.
1967: IBM's Warren Dalziel develops the floppy drive.
1960s: James T. Russell invents the optical CD-ROM while working for Battelle Memorial Institute.
1968: Robert Dennard of IBM is granted a patent for DRAM memory.
1981: Toshiba engineers Fujio Masuoka and Hisakazu Iizuka file a patent for flash memory.
Find out more
On this website
You might like these other articles on our site covering similar topics:
PC Mods for the Evil Genius by Jim Aspinwall. McGraw-Hill Professional, 2006. A simple introduction to hacking a basic PC into something slightly more interesting.
Build Your Own Computer by Gary Marshall. Haynes, 2012. A simple illustrated guide to building a PC, written in the familiar Haynes car manual style.
PCs All-in-One For Dummies by Mark L. Chambers.
John Wiley & Sons, Jun 2010. A Dummies-style introduction covering all aspects of PCs, from using Windows and installing simple applications like Excel to full-scale memory upgrades.
US Patent 3,134,097: Data storage machine by Louis D. Stevens, William A. Goddard, and John J. Lynott. May 19, 1964. IBM's original hard drive patent, originally filed a decade earlier (on December 24, 1954).
US Patent 3,503,060: Direct access magnetic disc storage device by William A. Goddard and John J. Lynott, IBM. March 24, 1970. One of IBM's later hard drive ("DASD") patents and incorporating quite a bit from the earlier US Patent 3,134,097. This one is hugely detailed—you could almost build a hard drive by following it carefully!
US Patent 3,387,286: Field-effect transistor memory by Robert Dennard, IBM. June 4, 1968. The key components of DRAM memory are memory cells for storing individual bits of information, each made from one FET and one capacitor, as explained here in the original patent.
Please do NOT copy our articles onto blogs and other websites
Articles from this website are registered at the US Copyright Office. Copying or otherwise using registered works without permission, removing this or other copyright notices, and/or infringing related rights could make you liable to severe civil or criminal penalties.