Computer Memory

In this article we will discuss:-

  • Computer memory
  • Working of a Computer Memory
  • Types of Internal Memory
  • Primary Memory
  • RAM- Random Access Memory
  • ROM- Read-Only Memory
  • Secondary Memory

What is Computer Memory?

Computer memory is a data storage system capable of temporarily or permanently storing or saving data. The information is stored in binary forms, such as 0 and 1, allowing the user to save and retrieve it whenever they need it. You might think of computer memory as a human brain; it gives the machine the ability to access data fast. As a result, the processor would be able to interact with the application much more quickly. Without computer memory, the user would be unable to store anything, which is why it is so critical!
Internal and external memory are the two types of memory used in computers.
Internal memory, often known as "main" or "primary" memory, stores small quantities of data that may be accessed quickly while the computer is functioning.
External memory, sometimes known as "secondary memory," is a storage device capable of retaining or storing data indefinitely. Embedded or removable storage devices might be used. Hard disc or solid-state drives, USB flash drives, and compact discs are all examples.

How Does Computer Memory Work

Whatever input source you use, whether it's turning on your computer or typing on your keyboard, it all goes to read-only memory (ROM) and executes a power-on self-test (POST) to check all components are working properly.
The memory controller will next examine the memory locations and execute a brief read/write operation to ensure that no errors have occurred. The system will then load a basic input/output system (BIOS) from ROM, as well as the operating system (OS) from the hard drive into the machine's RAM.

So, regardless of whether you're loading or saving a file, it'll first travel via RAM. This is due to the fact that the random-access memory (RAM) will process all of the temporary data required by the CPU, but none of it will be stored in RAM. As a result, when the program is closed, the data is also gone.

Types Of Internal Memory

Internal memory is divided into two types:

  • ROM
  • RAM
    Read-only memory is referred to as ROM. It is non-volatile, which means it can store data even when the power is turned off. It is mostly used to start or restart a computer.
    The computer utilizes RAM, which stands for random-access memory, to temporarily store data while the central processing unit (CPU) is executing other duties once the operating system has been installed. More RAM on a computer means the CPU doesn't have to read data from external or secondary memory (storage device), allowing it to operate quicker. RAM is quick, but it is volatile, which means it will lose data if the power goes off. As a result, saving data to the storage device before the machine is switched off is critical.

Primary Memory

Internal memory, often known as internal storage, is the primary memory in a computer. Data is accessed quickly from the main memory, which is either volatile (RAM) or non-volatile (ROM). Primary memory has a limited capacity, and it is often smaller than secondary memory.

RAM: Random Access Memory

RAM, often known as cache memory, is the primary memory in a computer system. It's essentially a high-speed component that stores the data the device requires briefly and allows the device to access it quickly.
You won't have to wait for your CPU to dig through other storage, which usually takes a long time if you have RAM. However, because RAM is volatile, any temporary memory saved inside will be erased when your computer is turned off.

Types Of RAM

RAM is divided into two types:

  • Dynamic RAM (DRAM) and
  • Static RAM (SRAM)
    DRAM (pronounced DEE-RAM) is a kind of computer memory that is commonly used. A data bit is stored in the capacitor of each DRAM memory cell, which is made up of a transistor and a capacitor within an integrated circuit. Because transistors always lose a little amount of charge, the capacitors progressively discharge, causing the information stored in them to drain; as a result, DRAM must be refreshed (given a new electrical charge) every few milliseconds in order to preserve data. DRAM, on the other hand, is less expensive than SRAM, hence it is utilized as the primary memory of a CPU. While slower than SRAM, it is still quick and can link directly to the CPU bus. DRAM is commonly 4GB to 16GB in laptops and 1GB to 2GB in smaller devices, unlike the more costly SRAM.

    Four to six transistors make up SRAM (pronounced ES-RAM). Unlike DRAM, which must be refreshed on a regular basis, it preserves data in the memory as long as power is given to the machine. It is far more costly than DRAM and takes up significantly more space, resulting in less memory on a chip.
    It's also the most common type of cache in a CPU, and it's frequently labeled as L2 or L3. However, as previously said, because it is somewhat costly, the values of L2 and L3 are normally limited to 1MB to 16MB.

ROM: Read Only Memory

ROM, like RAM, is the main memory, however, unlike RAM, ROM can hold data permanently, making it non-volatile. It is a programmable chip that saves all of the critical instructions needed to start the system; this procedure is referred to as bootstrapping. Even if you turn off the computer, the system will remain operational, and your data will not be overwritten, destroyed, or updated. The data can only be read and accessed by the user, thus the name "read-only memory."

Types Of ROM

  • MROM: Mask ROM

One of the first ROMs, MROM is a hand-wired device. It also features a software mask that is burnt onto the chip during the semiconductor manufacturing process' design phase. Furthermore, it is the cheapest ROM among the others and has a pre-programmed set of data.

  • PROM: Programmable ROM

PROM stands for "read-only memory," which means that the user can only overwrite the data once. It is differentiated from regular ROM by the fact that it is a blank memory chip, whereas ROM is pre-programmed.
Because the chip has microscopic fuses that allow you to program the PROM, a static electric charge might cause the fuse to burn out. As a result, it is more brittle than ROMs and is less expensive. To write the data, however, the user will need a PROM programmer or PROM burner.

  • EROM: Erasable Programmable ROM

Using ordinary ROMs and PROMs, despite their low cost, might be useless because they cannot be rewritten and reused. As the name implies, the data may be overwritten by exposing it to ultraviolet light for up to 40 minutes.
You'll need to expose the quartz transparent glass lid to ultraviolet light to wipe the data. You may reuse it when you've finished using it by simply sealing the lid with a sticker. You may, however, use an EPROM eraser as an alternative if you have one.

  • EEPROM: Electrically Erasable and Programmable ROM

It has a long name, but it functions in the same way as EPROM! The only thing that differs is the method of erasing the data. Rather than exposing it to ultraviolet light, you may just charge it with electricity! As a result, there is no need for a translucent window.
Even though the erasing process is slow, EEPROM can be wiped and reprogrammed roughly 10,000 times. What's more, you can delete one byte at a time, which gives you a lot of flexibility.

Secondary Memory

External memory or auxiliary memory are other terms for secondary memory. Secondary memory, unlike primary memory, is generally volatile, and it processes data at a slower rate. Because secondary memory is just more storage for more data, it is less critical than primary memory.

  • SSD: Solid-State Drive

SSDs employ a basic memory chip called NAND flash memory, and they're a newer type of computer storage device that's designed to take the place of hard drives (we'll get to that later). SSDs can enhance the overall performance of your computer by speeding it up. When the transistors in the NAND flash conduct electricity, the value is set to 1, and when they don't, the value is set to 0. The SDD will be able to store data at a high rate as a result of this.

With that in mind, we can divide SSDs into two categories: memory chips and interfaces. There are various different types of SSDs depending on the interface:

  • SATA: Serial Advanced Technology Attachment

SATA SSDs are a sort of interface connection that allows SSDs to transfer data with the system and are rather popular. SATA may be used with almost any laptop or computer, even if it is somewhat old.
SATA 3.0 is the most flexible type of SDD at the moment, with a transfer rate of 6Gb/s, although owing to physical overhead, the real transfer speed is generally 4.8Gb/s. Aside from SATA 3.0, there's also SATA 2.0.

  • PCIe: Peripheral Component Interconnect Express

PCIe, commonly known as PCI Express, is a solid-state drive that uses the PCIe interface to connect to a computer system. It is feasible to embed flash directly on the server's motherboard since it is hooked into the backplane. This considerably enhances the transfer speed. When compared to the other SSDs, PCIe is also the quickest.

  • HDD: Hard Disk Drive

A hard disc drive (HDD) is a type of conventional storage device, also known as a magnetic storage device, that stores data on a magnetized material. These gadgets generally offer a big storage capacity and are also cost-effective!
It is also very easy to read or write the data because it is read and written by a head, same as how vinyl works. Despite the fact that their data accessing speed is poor, they are used in RAM that has a high data accessing speed.

  • Flash Drives

One of the most common secondary storage devices, flash drives is also known as thumb drives, pen drives, and USB drives. They're essentially a little portable storage device that makes it simple to save, modify, and remove data.
To retrieve the data on it, simply connect it to a USB port on your computer; it may also be used with mobile phones or tablets. Nowadays, storage capacities range from 8GB to 64GB, but some even go up to 1TB!

  • NAS: Network-Attached Storage

NAS stands for network-attached storage, and it is essentially a specialized file server. What's nice about NAS is that it has a lot of storage capacity and you can access it from anywhere with an ethernet connection.
Though NAS isn't ideal for databases since it isn't as fast as SAN (we'll get to that later), it is extremely inexpensive, making it a good place to start. It may be used for high-end applications like rendering and 3D animation, as well as for analytics!

  • SAN: Storage Area Network

SAN is a sort of storage network that, like NAS, moves storage devices away from the server to establish a central data pool. SAN, on the other hand, is not dependent on a Local Area Network (LAN); capacity is shared and a separate network is supplied.
The data is also saved in block-level storage, which is controlled by the operating system and is not attached to a file. As a result, SAN is a preferable alternative for database storage management.

  • Tertiary Memory: Cloud Storage

Cloud storage, or clouding as some may refer to it, is becoming increasingly popular these days. It is essentially a collection of networked computer hardware that delivers a variety of computing capabilities in the form of online services. Cloud storage is inaccessible, and you can't see it, but you can operate it remotely, as its name implies. This is ideal if you need to access and save a big quantity of data on a regular basis, such as in large organizations or for personal use!

Download CuriousJr for more updates on Coding for Kids.
Happy coding!