Key Difference – RAM vs ROM
A computer can be considered as an independently working machine like the human brain. Therefore, a computer or a similar electronic machine needs a memory to store required information. For example, a human can add two numbers together and produce the results based on a method he has learned and memorized. In the same manner, a computer needs to hold methods and information in a memory to operate. RAM and ROM are both different types of memories used in any computer to make it fast and to enable it to access information stored in the computer. Every computer comes with a certain amount of physical memory, which is in the form of chips that hold data. RAM (Random Access Memory) is a fast accessible memory that stores during its operation while ROM (Read Only Memory) stores permanent data that is used for its functions, such as methods to perform. Thus, the key difference between RAM and ROM is in the way data is stored in them; the storage in RAM is temporary whereas the storage in ROM is permanent.
What is RAM?
RAM is the abbreviation of Random Access Memory. As the name interpret, the usage or access to the memory is random since the microprocessor reads the memory and write to it very rapidly. Consider a computer which needs to add two numbers that a user inputs. When the user inputs the two numbers, the computer stores those numbers in the RAM. After that, it stores back the result in the RAM for the user to read. This is how the computer or the microprocessor reads and writes data in the RAM. Likewise, when a program is being executed, the computer stores the required data from hard disk drive in the RAM for fast access.
A RAM is an integrated circuit composed of memory cells which are circuits of logic gates. Each memory cell has an address by which the microprocessor identifies where the data should be written to or read from. One bit of data can be stored in one memory cell and usually memory cells are arranged as registers to hold 8 bit wide data. The width of data may vary depending on the RAM type. That is, a 16-bit RAM is composed of 16 bit registers, whereas 8-bit RAM has 8-bit registers. These registers have two types of connections: address lines and data lines. The logic ‘1’ and ‘0’ combination placed on the address lines activates the register that matches the particular combination and enables it either to read or write. However, the data stored in this RAM registers are only temporary, so they vanish when power is removed from the chip. This makes RAM a volatile memory.
There are several types of RAMs used in a computer; the main types are Static RAM (SRAM) and Dynamic RAM (DRAM). SRAM is much faster on access and cost of production is higher than DRAMs. Therefore, SRAM is used as a cache memory of the microprocessor chip. DRAM, on the other hand, is a bit slower and comparatively less expensive. DRAMs are used externally to the microprocessor on the motherboard. Sometimes, the computer makes a separate partition on the hard disk as a RAM when the physical RAM is overused. This process makes the computer slower in operation since this requires writing and reading data in a file called page file on the hard disk. This type of RAM is called virtual RAM.
What is ROM?
The term Read-Only Memory is abbreviated as ROM. Unlike RAM, ROM is a non-volatile memory; although the power is removed from the ROM chip, the stored data still remains in their registers. Data in ROMs are usually stored when they are manufactured. For computers, ROM is useful to store programs which are not altered; for example, BIOS, which is executed at the starting (boot). Older versions of compact disks are also known as ROMs (CD-ROM).
There are many disadvantages of ROMs, the main disadvantage being the inability to alter or update the features of the firmware. If the manufacturer has programmed it with malfunctioning firmware, the all chips have to be recalled and replaced one by one. Another drawback is that ROMs are not useful in R&D work since many versions of the firmware have to be tested by the programmer before launching the final product. There, a ROM is not useful to test firmware since it is not a user-friendly device. An erasable programmable ROM where the firmware can be re-written by the programmer has been introduced to overcome these issues. However, the erasing needs a high-intensity UV light, making it still difficult. As a solution for this, the electrically erasable programmable ROM has been introduced to the programmers, so that they could be used on the test-bed itself, and can be reprogrammable repeatedly. Flash memory, which is used in USB drives and modern laptops as the hard drive, is a further development of EEPROM which uses the chip area very efficiently. The re-writable CDs and DVDs are also considered as an advancement of CD and DVD ROMs.
What is the difference between RAM and ROM?
RAM vs ROM
|Data can be both stored and retrieved from RAM (Random-Access Memory).||Data can be only read from ROM (Read-Only Memory).|
|Access time is very short in RAM. The computer uses it rapidly to store frequently required data.||Access time is long in ROM. It cannot be used to read fast.|
|RAM is a volatile memory, so once the voltage supply is lost, the data is removed from the memory.||ROM is a non-volatile memory. If it is not erasable, data remains in storage until the hardware is damaged.|
|RAM is used in the cache and main memory of the computer since it is fast, the production cost is high and the surface area per unit memory is larger.||ROMs are used to store permanent, but less-used data like software setups, once-only-used BIOS in computers since they are manufactured in larger capacities and the cost of production is lesser.|
Summary – RAM vs ROM
RAM is a high-speed temporary storage for data which is used to store values which are rapidly used. In contrast, ROMs are a permanent type of memory and unlike RAMs, loss of data will not happen even though the voltage is removed. This is the key difference between RAM and ROM. ROMs are disadvantageous in use since once the firmware is written in the ROM, it cannot be altered for improvements or corrections. Therefore, ROMs are also introduced with read and write capability like RAMs. But the read/write function of RAMs is much faster than ROM.
1. Difference Between SRAM and DRAM
2. Difference Between RAM and Cache Memory
3. Difference Between RAM and Processor
4. Difference Between PLA and ROM
5. Difference Between Volatile and Nonvolatile Memory
6. Difference Between Primary and Secondary Memory