What Exactly is Computer Memory and How Is it Used?

by: Sarah Phelt

Memory is one of the core hardware components for the computer. It is the component that temporarily stores information (such as Numbers, Characters, Settings, Instructions, Files and so on) once a computer has started. The information is temporary because when a computer is switched off or restarted the information is deleted from memory. When a program has finished with the information, the memory it was using is released (not deleted) so other programs can then use that memory.

Memory itself is a microchip (see above) that can temporarily store Bytes. The more bytes the memory has the more information it can temporarily store. A byte is just a number with a value between 0 and 255. It is a program's job to turn each byte into something a human and/or another program can interpret. For example. If the memory was storing 4 Bytes with the values 74, 79, 72 and 78 it would mean nothing to you. However. To Microsoft Word 2007 the byte value 74 means J. The byte value 79 means O. The byte value 72 means H and the byte value 78 means N. So even though the memory is storing byte values that mean nothing to you, Microsoft Word 2007 has no trouble interpreting (reading) those same byte values as JOHN. The same applies to other programs that interpret (read) the byte values. For example. A Paint program might interpret 74 as colour Red, 79 as colour Yellow, 72 as colour Blue and 78 as colour Green. Whereas a Language program might interpret (read) 74 as English, 79 as Spanish, 72 as French and 78 as Italian. It depends on the program. Either way, the memory will always see 74, 79, 72 and 78. Here is a diagram of the memory with the 4 Bytes interpreted.

The logic behind interpreting byte values is like so: If the byte value is 74 display J (Microsoft Word 2007). If the byte value is 74 use English (Language program). If the byte value is 74 use colour Red (Paint program). And so on. In other words, the byte will always have its value of 74 but it can be interpreted differently depending on the program doing the interpreting. Programs that save settings files use interpretation a lot to cut down on the number of bytes used. For example. If a paint program had to interpret RED, YELLOW and BLUE with characters it would use 13 Bytes (R E D Y E L L O W B L U E). Whereas using the logic of byte values to represent RED, YELLOW and GREEN it would only use 3 Bytes (79, 74 and 72).

Although the above concentrated on programs interpreting byte values that were already stored inside memory, the reverse is just as true. For example. When you type the word JOHN into a Microsoft Word 2007 document its stores (puts) the byte values 74, 79, 72 and 78 inside memory. The same with a paint program. Instead of storing the characters R E D (byte values 82, 69 and 68) it might store the byte value 74 (which represents RED in the above example) so that it is uses 1 Byte, instead of 3, every time you use the red ink.

Basically, memory is just full of numbers that are interpreted by programs to mean Instructions, Settings, Characters, Words, Sentences, Numbers, Symbols and so on.

ENOUGH MEMORY

When a program opens it first allocates some memory for its own needs. For example. If you open a 1000 bytes essay file with Microsoft Word 2007, from a floppy disk, and edit it (i.e you change the word JOHN into PAUL) the changes are not made to the essay file on the floppy disk. They are made inside memory instead, to avoid wear of the floppy disk. If you imagine every time you edited an essay character (byte value) the whole essay file had to be re-saved onto floppy disk you would soon end up with a damaged floppy disk. Just changing JOHN into PAUL would mean four re-saves. Memory is purposely made for the constant editing of byte values.

When Microsoft Word 2007 opens an essay file from floppy disk for example it first allocates (reserves) 1000 bytes of file memory, so it can store an exact copy of the essay file inside that memory - The original essay file on the floppy disk is left intact. The next thing Microsoft Word 2007 does is allocate some memory for its editing needs. For example. If you make a copy of the word JOHN, because you want to add (paste) it somewhere else in the essay, behind the scenes Microsoft Word 2007 makes a copy of the word JOHN by storing the word JOHN inside the edit memory. So you now have 1000 bytes full of essay characters inside the file memory and 4 bytes used inside the edit memory for the J O H N characters. However. Because you might want to copy a paragraph, an whole essay page or even the whole essay Microsoft Word 2007 has to make sure it has allocated enough edit memory for these situations. The same applies to the file memory - It might not be allocated just 1000 bytes for the essay characters, but perhaps 3000 bytes just in case you need to add more to the essay (i.e you start copying bits out of an History/Research file into the essay or you just type more characters into the essay). So the essay might need 5000 bytes in total allocated for it. Once you have finished editing the essay, which is in file memory at this point, you then tell Microsoft Word 2007 to save the file memory back onto the floppy disk as an essay file.

A collection of bytes is known as Data. Microsoft Word 2007 sees files and memory as a block of data only, which means when it opens a file and copies it into memory all it is doing is copying a block of data from one place (i.e Floppy Disk) to another (i.e Memory). So when it saves the essay file from file memory to floppy disk it just sees it as copying a block of data from one place to another. And that is how you should see files and memory - as blocks of data. Once the essay (file memory) has been saved onto the floppy disk as an essay file the file memory and edit memory are released for other programs to use.

The above is okay when everything is running smoothly, but problems arise when a program tries to allocate memory that is not available. For example. If you try to open too many programs or files at once they might crash (Freeze/Stop) Windows Vista. This would be due to the programs either not having enough memory to open themselves (i.e show their own windows) or not enough memory for their additional needs, such as editing files. For example. If there are only 10,000 bytes of memory remaining and two newly opened programs are waiting for 50,000 bytes of memory each they will be put in a waiting queue. Waiting forever. Or at least until another program closes and releases its memory, but it might only be releasing 4000 bytes of memory. In which case one of the waiting programs could use the 4000 bytes now available and then wait for the other 46,000 bytes to become available. On the other hand, the programs might get sick of waiting and decide to close. Either way it is a slow and messy process. This is why you should get to know the limits of your computer first before opening too many programs at once. Another scenario is memory corruption. Basically this is when a program misinterprets some byte values. For example. If a language program is supposed to read 74, in a settings file, as English but sees (reads) 77 instead. It would probably show text in a different language - Not much harm as you could probably change the language setting back to English once the language program had opened and fully completed. However. Imagine if a program interprets a byte value of 100 to mean you have paid/registered to use that program and a byte value of 101 to mean you are just trying out that program for 30 days. You might of paid £30 for a program that is saying you have not paid, but you are just trying it out. Incidently. This is one way hackers hack legal software...they change the software's data (byte values) so it thinks the user has paid for it. Apart from hacked bytes data is normally corrupted because the files (software/programs) came from a bad/scratched floppy disk or CD - The files can still be read as data (byte values), but as incorrect data. Unfortunately, a program will not test every byte value inside a file simply because it would take too long, especially if it was a large file.

BYTE SIZES

The reason for explaining memory to you is so that you get some idea of how Data is stored and how memory is allocated. In the above examples I mentioned bytes in terms of thousands only (i.e 4000 and 50,000) so you could understand the examples quite easily. However. The reality is that programs and files have become bigger and bigger over the years, to the point where you no longer say a file is just a few thousand bytes long. Now a file can be millions of bytes long. The same applies to the computer. Years ago the memory inside it might have been a maximum of 32KB (32768 bytes), whereas these days it must have a minimum of 256MB (262,144,000 bytes) inside it. KB, GB and MB are Byte terminology (jargon), as below:

Byte = 1 Byte
Bytes = 2 Bytes or more
1 KiloByte = 1,024 Bytes - KiloByte(s) is abbreviated to KB
2 KiloBytes = 2,048 Bytes - To work out KiloBytes just devide or multiply Bytes by 1,024
1 MegaByte = 1,024,000 Bytes - MegaByte(s) is abbreviated to MB
2 MegaBytes = 2,048,000 Bytes - To work out MegaBytes just devide or multiply Bytes by 1,024,000
1 GigaByte = 1,024,000,000 Bytes - GigaByte(s) is abbreviated to GB
2 GigaBytes = 2,048,000,000 Bytes - To work out GigaBytes just devide or multiply Bytes by 1,024,000,000

READ / WRITE

When data is being read (i.e from a floppy disk) it is known as Reading the data (because it is being looked at) and when data has been read it is known as Read (because it has been looked at).

When data is being saved it is known as Writing the data (because it is being written onto something, such as: a floppy disk) and when data has been saved it is known as Written (because it has been written onto something, such as: a floppy disk).

ROM / RAM

Memory is known by two types. ROM (Read Only Memory) which means hardware and software can only read the byte values stored inside rom memory and RAM (Read Access Memory) which means hardware and software can not only read the byte values stored inside ram memory but they can also, temporarily, change the byte values stored inside ram memory.

ROM memory is a microchip on a motherboard (green microchip board), such as a Modem motherboard, that contains the instructions (byte values) needed to make the hardware (Modem) work. This is why ROM memory cannot have its byte values changed. The instructions (byte values) are preprogrammed onto the microchip, so that when you first switch on the computer the instructions (byte values) are always the same.

RAM memory is a microchip that is permanently fitted onto a Card (small motherboard), such as a Graphics Card or Memory Card, or a single removable microchip that you attach to the main motherboard. The main motherboard is the big green microchip board inside the computer (base unit). RAM memory can have its byte values temporarily changed, and read, so that you can change Graphics settings (Graphics Card) or store data (Memory Card) for example. Even though RAM memory is cleared when you switch off or restart the computer, because it is meant as a temporary storage place only, the data inside the memory is normally saved by a program (as a file) beforehand. For example. If you change the Modem (hardware) settings using a modem program it will save your changes as a settings file on the hard drive before the computer is switched off or restarted. When the computer is switched on again the modem uses its default (normal, preprogrammed) settings before looking at, and using, the settings from the saved settings file. The modem uses its default settings first for two reasons. One is so that it knows it is setup correctly (by using its normal, manufacturer's, preprogrammed settings) and two is in case the settings file is corrupt, damaged or missing. If it reads a settings file incorrectly (i.e because it is corrupt) you may get problems with the modem or it may revert back to its default settings.

VIRTUAL MEMORY

When Windows Vista finally runs out memory, or when it cannot fit something really big inside memory as one piece, it starts using a thing called Virtual Memory, which is Hard Drive space that is used as memory. For example. Imagine you have just typed out a 10,000 line document using Microsoft Word 2007 and then you run out memory. Instead of Windows Vista telling you "You cannot type anything else - No more Memory available" it will just let you carry on typing as normal. This is because the rest of your typing will be stored on the hard drive as a file, which you have no access to. As far as you are concerned you are just typing a document and so do not have to worry about virtual memory. However. You should be aware that over time this wears out the hard drive. So always make sure you have plenty of memory.

GRAPHICS MEMORY

Graphics Memory is the memory that stores your Imagery (Desktop Picture, Game Scenes, Photographs, Icons, Text and so on). It is a microchip on the Graphics Card. The main job of a graphics card is to store Imagery inside its graphics memory and then display that imagery, on the monitor screen, when a program asks it to. For example. If you are editing a photograph the paint package would of allocated some of the graphics memory as file memory (for the original photograph) and some of the graphics memory as edit memory (for editing purposes) - In the same way the file memory and edit memory was allocated in the Microsoft Word 2007 explanation above. The graphics card will not only display the photograph (file memory) on the monitor screen, but it will also update (refresh) the monitor screen instantly every time you edit the photograph. In the same way that Microsoft Word 2007 updates instantly any changes you make to a document. Graphics memory is also in charge of storing other imagery. For example. If you have one game open, a paint program open and the Internet open it is graphics memory storing the imagery of those three programs. The more programs open that use graphics memory the more tasks (jobs) you are giving the graphics card. Meaning. If you give it too much to do and/or it runs out of graphics memory it will not be able to update the monitor screen quick enough, which means editing and game playing for example will not be instant. The monitor screen will update (draw the imagery) so slowly that it would not be worth editing a photograph or playing a game. A normal sign of this is when the monitor screen is updated (drawn) line by line as opposed to instantly. So get a good Graphics Card with plenty of Graphics Memory because the one built into the computer might not be good enough for your needs.

MEMORY SPECIFICATIONS

Memory Size is measured in multiples of 8 MegaBytes (i.e 256MB, 512MB and 1024MB), which means you could never have 274MB or 519MB for example, and Memory Speed is measured in MegaHertz (Mhz).

Computers made before the year 2000 normally use memory known as SDRAM, which is now difficult to find because it is no longer manufactured. A SDRAM memory chip can either be 100Mhz, 133Mhz or 166Mhz and is named after its speed: PC100, PC133 or PC166.

Computers made between the years 2000 to 2005 (approximately) normally use memory known as DDR, which is still being sold at the present time. A DDR memory chip normally comes with one of the following specifications: PC1600 (200 Mhz), PC2100 (266 Mhz), PC2400 (300 Mhz), PC2700 (333 Mhz), PC3200 (400 Mhz) or PC4000 (500 Mhz).

Computers made between the years 2005 to 2008 (approximately) normally use memory known as DDR 2, which is currently the main type of memory sold. A DDR 2 memory chip normally comes with one of the following specifications: PC2-3200 (400 Mhz), PC2-4200 (533 Mhz), PC2-5300 (667 Mhz) or PC2-6400 (800 Mhz).

Note. As newer/better memory is manufactured every so often the memory specifications above are just to give you an idea of the kind of memory specifications available - I have not mentioned every single memory specification out there in other words. The time overlaps above (i.e. in 2005) mean that newer memory was created in the same year.

As most computers, regardless if old or new, only have two memory slots inside them it is wise to have at least 512MB in each slot. Using anything less is just going to make the computer slow. For example. The minimum memory requirement for Windows XP used to be 256MB only, but now that many programs like Windows Media Player have improved and use more memory it means Windows XP's minimum memory requirement is now 512MB. Remember. This is minimum. You should always aim for the maximum.

Here are the minimum requirements for 2009.

Windows XP - 768 MegaBytes (1.5GB or more recommended)
Windows VISTA - 1.5 GigaBytes (2GB or more recommended)