Random Access memory (RAM) is a type of computer memory that can be accessed randomly i.e. any byte of memory can be accessed without touching the previous bytes. RAM is can be found in computers and printers.
RAM is volatile memory, which means that the stored information is lost when there is no power. So RAM is used by the central processing unit (CPU) when a computer is running to store information that needs to be used immediately, however doesn’t store any information permanently.
Read-only memory (ROM) is a type of storage that permanently stores data on personal computers (PCs) and other devices. It contains the programming needed to start a PC or laptop, which is required for boot-up. ROM performs input/output tasks and holds programs and software instructions.
ROM is used to store the start-up instructions for a computer, also known as the firmware. Most modern computers use flash-based ROM. It is part of the BIOS chip, which is located on the motherboard.
Below table shares the difference between both RAM and ROM –