Primary storage in a computer system is provided by main memory, or random access memory, while secondary storage is typically provided by hard disk. Both types of storage are measured in megabytes and gigabytes, but a typical computer could have 100 times more hard disk space than RAM and there are significant physical and operational differences between them.
Video of the Day
Physically, RAM consists of a series of memory chips -- thin slices of a semiconductor material, such as silicon, etched with integrated circuits -- that plug into the motherboard of the computer. A hard disk, on the other hand, consists of a sealed unit containing a number of rigid disks, or platters, arranged in a stack. Electromagnetic devices, known as read/write heads are positioned above and below each platter and move, mechanically, to read and write data from and to the disk.
RAM consists of a series of electrical switches, which can be switched on to represent a 1 bit and switched off to represent a 0 bit. RAM stores the essential components of the operating system, program instructions and data in electronic circuitry, in locations where they can be accessed very quickly by the central processing unit. The fact that RAM is electrical, however, means that its contents are erased when the power is switched off. In other words, RAM is volatile, temporary storage.
Secondary storage, in the form of a hard disk, is non-volatile, permanent storage. The read/write heads require electricity to convert electrical impulses from the CPU into magnetic patterns recorded on the disk, but once recorded the data is preserved, even if the power is switched off, until explicitly deleted or overwritten. Data is represented by a series of magnetized spots, arranged into thin, concentric bands, known as tracks. A magnetized spot represents a 1 bit, while the absence of such a spot represents a 0 bit.
Secondary storage is mechanical, rather than electrical, so is significantly slower for both reading and writing than RAM. A CPU can only process data as quickly as the data is supplied to it, so a computer requires RAM if its CPU is to run anywhere near its rated speed. However, a computer with RAM but no secondary storage would be incapable of storing data permanently -- unless it was never switched off -- so both RAM and secondary storage are necessary.