Storage is generally divided into two main categories:
- primary: main memory (usually RAM) - usually more expensive per byte,
volatile (loses contents when power is lost), available in smaller amounts
than secondary memory, and generally much faster than secondary storage -
used for short-term storage
- secondary: hard drives, memory sticks - usually less expensive per byte
than primary memory, non-volatile (retains contents when power is lost),
available in larger amounts, and generally much slower than primary
storage - used for long-term storage
Data is stored in computers as a sequence of 0s and 1s. It doesn't matter
whether that data is a picture, a video, a text document, or a program.
There are many ways of representing 0s and 1s in digital equipment. You can use
a high or low voltage, a hole or absence of a hole, oriented magnetization or
non-oriented magnetization, etc. However the hardware distinguishes between two
possibilities, it is presented to us humans as 0s and 1s. This representation is
called binary. The individual 0s and 1s are called bits. Modern
computers almost always group together eight bits to form a byte (because
dealing with bytes is easier than always dealing with bits). Bytes are further
grouped to form words. That's why processors are referred to as 16-bit, or 32-bit,
or 64-bit - it is convenient to double the word size when moving to the next level
of power. Most of the early personal computers such as the Apple ][ and IBM PC
contained eight-bit processors.