RAM Vs ROM

  What is RAM?

       . Random Access Memory is a type of computer data storage.
       . It provides space for your computer to read and write data to be accessed by the CPU (central processing unit).
       . If you add more RAM to your computer, it reduces time for CPU to read data from hard disk.
       . RAM is volatile, so data stored in RAM stays there only as long as your computer is running.
       . As soon as you turn the computer off, the data stored in RAM disappears.
       . RAM comes in variety of capacities (MB-GHz), speed (MHz-GHz) and architectures.
       . Many devices like desktops, laptops, mobiles, tablets etc make use of RAM.

   Types of RAM:

        . Static RAM:  Used in routers, printers, digital cameras
       
        . Dynamic RAM:  Used in system memory, video graphics memory.
    
        . Synchronous Dynamic RAM:  Used in computer memory and video game consoles.                                               

        . Single Data Rate Synchronous Dynamic RAM:  Used in computer memory and video game consoles.

        . Double Data Rate Synchronous Dynamic RAM:  Used in computers.
                                                                                      
        . Graphics Double Data Rate Synchronous Dynamic RAM:  Used in video graphics, tablets.
                             

       What is ROM?

         . Read Only Memory is a type of storage medium which permanently stores data.
         . Contains programming need to start a PC and computer to boot up.
         . Data in ROM is not lost even power is off.
         . It is found as chips on the motherboard and it mainly stores firmware data.
         . Example is BIOS which stores program to turn on the computer using ROM.
         . ROM is used not only in computer, but also in other types of devices like washing machine, microwave oven etc.

     Types of ROM:

         . Mask ROM: Data is written during manufacturing of chip.

         . Programmable ROM (PROM): Data is written after creation of chip. It is non changable.

         . Erasable PROM (EPROM): Data on this chip can be erased using uv light exposure. It takes 40 minutes to erase data.

         . Electrical EPROM (EEPROM): Data on this chip is erased using electric current. It takes 4-10 milliseconds to erase and program data.

     RAM Vs ROM:

DifferenceRAMROM
VolatalityVolatile memory. When computer is switched off, data is lost.Non-Volatile memory. When computer is switched off, data is retained.
Function Stores current active program and its data.Stores certain fixed routines like boot-up etc.
DataNot stored permanently but it can be altered number of times.Data in ROM is stored permanently, it can be altered in limited times.
Accessibility with CPUCPU can directly access the data stored in it.CPU cannot directly access data from ROM. Inorder to access, first data is copied into RAM and accessed.
SpeedIt is high speed memory.It is slower than RAM.
Size and CapacityLarge size with higher capacity.Small size with less capacity.
UsagePrimary memory, CPU Cache.Firmware start up programs like BIOS, electronic devices to start up.
CostIt is costlier compared to ROM.It is cheaper compared to RAM.