We’ve now gotten acquainted with operating systems. They are responsible for starting and running computer programs. The programs solve the user’s application tasks. For example, a text editor allows users to work with text.

A program is a set of elementary steps, called instructions. The computer performs these steps sequentially. It follows a strict order of actions and copes with complex tasks. Let’s consider how the computer launches and executes a program in detail.

Computer memory

A hard disk stores all the program’s instructions. If the program is relatively small and simple, it fits in a single file. Complex applications, meanwhile, occupy several files.

Let’s suppose that we have a single file program. When we launch it, the OS loads the file into the computer memory, or the random-access memory (RAM). Then, the OS allocates a part of the processor’s time for the new task. This way, the processor performs the program’s instructions at specified intervals.

Let’s see how the OS loads the program into the RAM. We’ll start with how computer memory works.

Introduction to bytes and bits

The single unit of the computer memory is a byte. The byte is the minimum amount of information that the processor can reference and load into its memory.

The CPU can handle smaller amounts of data if we apply special techniques. We operate on bits, in this case. A bit is the smallest amount of information we cannot divide. We can imagine the bit as a single logical state that has one of two possible values. There are several ways to interpret them:

  • 0 or 1
  • True or False
  • Yes or No
  • + or -
  • On or Off

Another way to imagine one bit is to compare it to a lamp switch. It has two possible states:

  • The switch closes the circuit. Then, the lamp is on.
  • The switch opens the circuit. Then, the lamp is off.

Eight bits make up a memory block of one byte.

Get hands-on with 1200+ tech skills courses.