COMPUTER  MEMORY  EXPLAINED

Apple Mac Computer Lessons   Basic Hungarian   Apartman Szeged Website

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.

Computer Memory Explained

Fig 1.0 - A DDR Laptop Memory Stick - 256MB (Megabytes). Speed 333Mhz.

Memory itself is a microchip (Fig 1.0) 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 is storing 4 Bytes with the values 74, 79, 72 and 78 it would mean nothing to you. However, to Microsoft Word 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 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.

Computer Memory Explained

Fig 1.1 - Byte values inside the Memory

Computer Memory Explained

Fig 1.2 - Byte values as interpreted by Microsoft Word

The logic behind interpreting byte values is like so: If the byte value is 74 display J (Microsoft Word). 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. When you type the word JOHN into a Microsoft Word document for example 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, 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 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 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 does is allocate some memory for its editing needs. So 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 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 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 to save the file memory back onto the floppy disk as an essay file.

A collection of bytes is known as Data. Microsoft Word sees a file, and memory, as a block of data only. This means when it opens a file all it is doing is copying a block of data (the file's bytes) from one place (i.e. a Floppy Disk) to another (i.e. into File Memory). The same applies when saving a file - It sees the bytes that make up the essay (i.e. "An essay about....") as a block of data that it can save from file memory onto a floppy disk. 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 then 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 10. 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. 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 2 GigaBytes (2,000,000,000 Bytes) inside it. KB, MB and GB are metric measurement Byte terminology (jargon), as below:

Byte
Bytes
1 KiloByte
2 KiloBytes
1 MegaByte
2 MegaBytes
1 GigaByte
2 GigaBytes
1 Byte
2 Bytes or more
1,000 Bytes
2,000 Bytes
1,000,000 Bytes
2,000,000 Bytes
1,000,000,000 Bytes
2,000,000,000 Bytes


KiloByte(s) is abbreviated to KB
To work out KiloBytes just divide or multiply Bytes by 1,000
MegaByte(s) is abbreviated to MB
To work out MegaBytes just divide or multiply Bytes by 1,000,000
GigaByte(s) is abbreviated to GB
To work out GigaBytes just divide or multiply Bytes by 1,000,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 can not 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 10 finally runs out memory, or when it can not 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 and then you run out memory. Instead of Windows 10 telling you "You can not 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 a microchip on the motherboard of a Graphics Card. It is the memory that stores your Imagery (Desktop Picture, Game Scenes, Photographs, Icons, Text and so on). Its main job 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 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 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 used memory known as SDRAM, now obsolete and no longer manufactured. A SDRAM memory chip would either be 100Mhz, 133Mhz or 166Mhz and was named after its speed: PC100, PC133 or PC166.

Computers made between the years 2000 to 2005 (approximately) normally used memory known as DDR, now obsolete and no longer manufactured. A DDR memory chip normally came 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 used memory known as DDR 2. A DDR 2 memory chip normally came with one of the following specifications: PC2-3200 (400 Mhz), PC2-4200 (533 Mhz), PC2-5300 (667 Mhz) or PC2-6400 (800 Mhz).

These days DDR3 is the main memory type used in computers. The memory specifications above were just to give you an idea/history of the kind of memory specifications once used - I have not mentioned every single memory specification out there simply because there are too many of them. The time overlaps above (i.e. in 2005) mean that newer memory was created in the same year.

Computer Memory Explained

Fig 1.3 - An old SDRAM Memory Stick - 32MB (Megabytes) only. Speed 100Mhz.

As most computers, regardless if old or new, only have two memory slots inside them it is wise to have at least 1GB in each slot. Using anything less than 2GB is just going to make the computer slow. For example: The minimum memory requirement for Windows XP used to be 256MB only, but when programs such as Windows Media Player began adding more features that used more memory it meant Windows XP's minimum memory requirement changed to 512MB. Remember, that was minimum. Hence why you should always aim for the maximum memory your computer can use. Here are the minimum requirements for 2015.

Windows XP
Windows VISTA
Windows 7
Windows 10
768 MegaBytes
1.5 GigaBytes
1 GigaByte
2 GigaByte
(1GB recommended)
(2GB or more recommended)
(2GB or more recommended)
(4GB or more recommended)