1. Introduction to Programming - A computer program (i)

1.1. A computer program






A computer program is a collection of instructions that performs a specific task when executed by a computer. A computer requires programs to function and typically executes the program's! instructions in a central processing unit.

In the modern computer that John von Neumann outlined in 1945, the program contains a one-at-a-time sequence of instructions that the computer follows. Typically, the program is put into a storage area accessible to the computer. The computer gets one instruction and performs it and then gets the next instruction. The storage area or memory also contain the data that the instruction operates on.
A computer program is usually written by a computer programmer in a programming language.


Apps vs. Programs

When Apple introduced the iPhone they popularized the term 'App,' but an app (application) and program are really the same thing. Today, most people think of an 'app' as an application on an Apple computer or a program on a smartphone or tablet and a program as something that runs on a computer. With all the different ways companies and people use these terms it is best to think of an application, app, and program as the same things.


Programs vs. Scripts

When a program is created, it is compiled to a language that the computer can understand. Once compiled the program does not need any other programs to run as long it as the computer has the required operating system and platform.

A script is not compiled but needs an interpreter to translate the script into something the computer understands. Without an interpreter, the script cannot run on the computer, but once installed a script can run on any platform without needing to be re-written.


Oldest