Computer memory is used to temporarily store data and instructions for processing by the CPU. There are two main types of computer memory: primary and secondary. Primary memory, also called main memory or internal memory, is located directly on the motherboard and includes RAM and ROM. RAM is volatile and used for temporary storage, while ROM is non-volatile and contains the computer's basic input/output system. Secondary memory, also called external storage, is used for permanent storage and includes hard drives, solid state drives, CDs, DVDs, floppy disks, and flash drives. Memory is measured in bits, bytes, kilobytes, megabytes, gigabytes, and terabytes, with the largest units able to store