Software and Programs

⏱ 5 min read

In one sentence: Software means the programs that run on a computer: a program usually waits in storage as a file of instructions, and when you open it, it is copied into memory (RAM) and the CPU carries it out.

Why should I care?

You use software all day. The web browser you are reading this in is a program. So are the camera, the calculator and the map on a phone. A Stanford computer course gives a short definition: software is "the general category of code which runs on the hardware". (Hardware is the physical parts of a computer, the parts you can touch.)

In Programming Languages, you saw how people write source code. This lesson shows what a finished program is, where it lives, and what happens when you open it. As a programmer, you will make software.

Analogy

Think of a piano and sheet music (printed music that tells a pianist which notes to play). Stanford's course uses a similar picture, with a piano as the hardware and music as the software.

  • The piano is the hardware. The sheet music is the software.
  • A pianist can play a different piece on the same piano at any time.
  • To play new music, you do not need a new piano. To do a new job, a computer usually does not need new hardware. It needs a new program.

Where the analogy breaks down: a pianist reads the music and can add feeling or fix a small mistake. A computer has no pianist. The CPU follows each instruction exactly, and understands nothing. Also, music is played from start to end. A program often stops and waits for you. Stanford's course describes Firefox's window appearing, then its menus, then: "The cursor blinks waiting for you to type".

How it actually works

Software, programs and apps

  • A program is one piece of software that does a particular job. Stanford's example is Firefox, a web browser.
  • Software is the general word for all programs together.
  • An app is another word for a program. "App" is short for "application". The word became popular after Apple opened its App Store in 2008.

Two main kinds of software

  • Application software (apps) is made for people to use for their tasks. Examples are web browsers, word processors (programs for writing documents) and media players (programs that play music and video).
  • The operating system is the main software that manages the computer. Stanford's course calls it a "set of supervisory programs", and gives these examples: Windows, Linux, Android and iOS. It begins running when the computer starts up, and it starts and stops your other programs.

(There are other kinds too, such as compilers.)

A program is a file

A program usually waits in Storage: HDD and SSD as a file: a named block of information. On Windows, the name of a program file often ends in .exe. Stanford's course says the Firefox.exe file is mostly machine code instructions: about 20 million of them, by its estimate.

Other files are not programs. A photo or a letter is data: information that a program reads or changes. A photo app is a program; your photos are its data.

What happens when you open a program

The life of a programFrom top to bottom. A programmer writes source code. A compiler turns it into a program file of machine code, which waits in storage, where it is kept when the power is off. When you open the program, its instructions are copied into RAM, the memory. The CPU then carries them out, one by one.

compiler

you open the program

Source code,
written by a programmer

Program file of
machine code,
waits in storage
(kept when power is off)

Copy of the instructions
in RAM (memory)

The CPU carries out
the instructions, one by one

(Programs can also be run by an interpreter. See below.)

Stanford's course describes what happens. When you open a program, for example by double-clicking its file, its instructions are copied from storage into RAM. Then the CPU starts carrying them out. "Each program gets its own area of RAM", and a computer "can run multiple programs at the same time".

Programs that run inside programs

Not every program arrives as a file of machine code. When you open a web page, it can bring JavaScript code with it. MDN Web Docs says the page's code is "downloaded, then run and displayed by the browser". So the browser is a program, and it runs programs from web pages inside itself.

How it came to be

In January 1958, John W. Tukey published an article in a mathematics journal, the American Mathematical Monthly. Tukey was a statistician (an expert in working with data) at Princeton University. In the article, he used the word "software" for programs such as compilers. He wrote that this software was "at least as important" to a computer as its "hardware".

Later, a librarian named Fred R. Shapiro found Tukey's article. Science News says that, until then, the Oxford English Dictionary dated the word "software" to 1960. So Tukey's article is the oldest known use of "software" for computer programs.

In 2000, a New York Times article about Tukey's life called him the man who "Coined the Word 'Software'". To coin a word means to create it.

🧪 Try it in your browser

You will watch your browser, a program, running on your computer. A task manager is a window or page that lists the parts of a program that are running right now.

Safety rule: only look. Do not click End process or Kill process: that could close one or more tabs.

  1. Open two or three tabs with different web pages.
  2. Open your browser's task manager:
    • Chrome: click the menu with three dots, then More tools, then Task manager.
    • Edge: click the menu with three dots, then More tools, then Browser task manager.
    • Firefox: open a new tab. In its address bar, type about:processes and press Enter.
  3. Look at the list.

What you should see: a list. Some rows are your tabs. Other rows have technical names. You can ignore them. Next to each row, you see a number for memory: how much RAM that part is using right now. The units (such as K or MB) are explained in KB, MB, GB: Measuring Data. Your browser may also show a CPU column. The numbers may change while you watch.

What happened: the browser is one program, but it is running as several parts. Every part uses some of your computer's RAM, as the memory column shows.

  1. Close the task manager window, or the about:processes tab.

On a phone: you cannot open a task manager this way. Instead, look at your home screen. Each app icon opens a different program, and they all run on the same hardware.

Common misunderstandings

  • "Software is the same as a computer." No. Hardware is the machine. Software is the programs. One computer can run many different programs.
  • "When a program is closed, it is gone." No. The program file stays in storage. Opening it copies its instructions into memory again.

Recap

  • Software is the general name for all the programs that run on a computer's hardware. "App" is another word for a program.
  • A program usually waits in storage as a file, often of machine code. Opening it copies its instructions into RAM, and the CPU carries them out.
  • The operating system is the main software that manages the computer and starts your other programs.

Sources

Written with AI · Reviewed by AI · Not yet checked by a human

Found a mistake, or something you did not understand? Report a problem.