Term of the Moment

asynchronous


Look Up Another Term


Definition: program


(1) (noun) A common word that refers to entertainment. For example, a "TV program" is a show on television. In an auditorium, a program is a paper handout that describes the event.

(2) (verb) To configure. For example, thermostats are programmed to raise and lower temperature based on time of day. Coffee makers are programmed to start brewing in the morning. In the past, people programmed their VCRs to start and end recording TV shows.

(3) (verb) To write the lines of code in a program. See source code.

(4) (noun) A collection of instructions that tell the computer what to do. All programs are "software," while the programs users work with (Web browser, word processor, etc.) are called "applications," "application programs" or simply "apps." The programs that control the computer (operating system, driver, etc.) are "system software." See application software and system software.

All programs are written in a programming language, such as C, C++ or Java, and the statements and commands written by the programmer are converted into the computer's machine language by software called "assemblers," "compilers" and "interpreters." See assembly language, compiler and interpreter.

Instructions, Buffers, Constants and Counters
A program contains machine instructions, buffers, constants and counters. The instructions are the directions that the computer follows, and they embody the program's logic. Buffers are reserved input/output areas that accept and hold the data while being processed.

Constants are fixed values used for comparison, such as minimums, maximums and dates. Menu titles and error messages are another type of constant. Counters, also called "variables," are reserved space for summing money amounts, quantities, virtually any calculations, including those necessary to keep track of internal operations, such as how many times a function is repeated.

Input-Process-Output
The program calls for data in an input-process-output sequence. After the data have been input into one of the program's buffers from a peripheral device (keyboard, disk, etc.), they are processed. The results are output to a peripheral device (screen, printer, etc.). Permanent changes are written back to the disk.

The Application Talks to the OS
The application program, which does the actual data processing, does not instruct the computer to do everything. When it is ready for input or needs to output data, it sends a request to the operating system (OS), which performs those services and returns control to the application.

The Illustration Below
Following is a highly conceptual illustration of a program residing in memory being executed. In the physical reality of memory (RAM chips), everything is binary 0s and 1s.

Although represented as uniform black lines in the diagram, machine instructions can be variable in length. They reside in the program in a logical order with some instructions pointing back to the beginning of routines or to other parts of the program. When an instruction erroneously points to the wrong place, the program may crashe (see abend). To understand what the computer does to process data (see 3 C's).




Anatomy of a Program
A program is made up of "data" and "processing." Buffers hold incoming and outgoing data, counters accumulate totals, and constants are values used for comparison. The instructions are executed in a logical order (the flow chart) to process the data.