For more information on computer program, visit Britannica.com.
On this page
Britannica Concise Encyclopedia:
computer program |
For more information on computer program, visit Britannica.com.
|
Featured Videos:
|
TechEncyclopedia:
program |
(1) To write the lines of code in a program.
(2) A collection of instructions that tell the computer what to do. A program is generically known as "software." The programs users work with, such as word processors and spreadsheets, are called "applications" or "application programs" or simply "apps." Thus, the terms software, application, program and instruction are synonymous in the sense that they all tell the computer what to do.
A program is 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."
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 comprise 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 then turns control back to the application program.
The Illustration Below
Following is a highly conceptual illustration of a program residing in memory being executed. In the physical reality of memory, everything is binary 0s and 1s.
Although represented as uniform, black blocks in the diagram, machine instructions can be variable in length. They reside in the program in some logical order with some instructions pointing back to the beginning of routines or to other parts of the program. When they erroneously point to the wrong places, the program crashes (see abend).
For an understanding of what the computer does to process data, read about The 3 C's: calculate, compare and copy (see computer).
Download Computer Desktop Encyclopedia to your PC, iPhone or Android.
Barron's Marketing Dictionary:
computer program |
Set of instructions in a logical sequence interpreted and executed by a computer enabling the computer to perform a required function; also called software. Programs are the "thought processes" of computers, without which they cannot operate. Programs are written in various languages, to conform with the operating system of particular computers.
Columbia Encyclopedia:
computer program |
Systems programs are those that control the operation of the computer. Chief among these is the operating system-also called the control program, executive, or supervisor-which schedules the execution of other programs, allocates system resources, and controls input and output operations. Processing programs are those whose execution is controlled by the operating system. Language translators decode source programs, written in a programming language, and produce object programs, which are in machine language and can be understood by the computer. These include assemblers, which translate symbolic languages that have a one-to-one relationship with machine language; compilers, which translate an algorithmic- or procedural-language program into a machine-language program to be executed at a later time; and interpreters, which translate source-language statements into object-language statements for immediate execution. Other processing programs are service or utility programs, such as those that "dump" computer memory to external storage for safekeeping and those that enable the programmer to "trace" program execution, and application programs, which perform business and scientific functions, such as payroll processing, accounts payable and receivable posting, word processing, and simulation of environmental conditions.
Bibliography
See F. Maddix and G. Morgan, Systems Software: An Introduction to Language Processors and Operating Systems (1989).
Bradford's Crossword Solver's Dictionary:
computer program |
Wikipedia on Answers.com:
Computer program |
A computer program (also software, or just a program) is a sequence of instructions written to perform a specified task with a computer.[1] A computer requires programs to function, typically executing the program's instructions in a central processor.[2] The program has an executable form that the computer can use directly to execute the instructions. The same program in its human-readable source code form, from which executable programs are derived (e.g., compiled), enables a programmer to study and develop its algorithms.
Computer source code is often written by computer programmers. Source code is written in a programming language that usually follows one of two main paradigms: imperative or declarative programming. Source code may be converted into an executable file (sometimes called an executable program or a binary) by a compiler and later executed by a central processing unit. Alternatively, computer programs may be executed with the aid of an interpreter, or may be embedded directly into hardware.
Computer programs may be categorized along functional lines: system software and application software. Two or more computer programs may run simultaneously on one computer, a process known as multitasking.
|
Contents
|
#include <stdio.h>
int main()
{
printf("Hello world!\n");
return 0;
}
Source code of a program written in the C programming language
Computer programming is the iterative process of writing or editing source code. Editing source code involves testing, analyzing, and refining, and sometimes coordinating with other programmers on a jointly developed program. A person who practices this skill is referred to as a computer programmer, software developer or coder. The sometimes lengthy process of computer programming is usually referred to as software development. The term software engineering is becoming popular as the process is seen as an engineering discipline.
Computer programs can be categorized by the programming language paradigm used to produce them. Two of the main paradigms are imperative and declarative.
Programs written using an imperative language specify an algorithm using declarations, expressions, and statements.[3] A declaration couples a variable name to a datatype. For example: var x: integer; . An expression yields a value. For example: 2 + 2 yields 4. Finally, a statement might assign an expression to a variable or use the value of a variable to alter the program's control flow. For example: x := 2 + 2; if x = 4 then do_something(); One criticism of imperative languages is the side effect of an assignment statement on a class of variables called non-local variables.[4]
Programs written using a declarative language specify the properties that have to be met by the output. They do not specify details expressed in terms of the control flow of the executing machine but of the mathematical relations between the declared objects and their properties. Two broad categories of declarative languages are functional languages and logical languages. The principle behind functional languages (like Haskell) is to not allow side effects, which makes it easier to reason about programs like mathematical functions.[4] The principle behind logical languages (like Prolog) is to define the problem to be solved — the goal — and leave the detailed solution to the Prolog system itself.[5] The goal is defined by providing a list of subgoals. Then each subgoal is defined by further providing a list of its subgoals, etc. If a path of subgoals fails to find a solution, then that subgoal is backtracked and another path is systematically attempted.
The form in which a program is created may be textual or visual. In a visual language program, elements are graphically manipulated rather than textually specified.
A computer program in the form of a human-readable, computer programming language is called source code. Source code may be converted into an executable image by a compiler or executed immediately with the aid of an interpreter.
Either compiled or interpreted programs might be executed in a batch process without human interaction, but interpreted programs allow a user to type commands in an interactive session. In this case the programs are the separate commands, whose execution occurs sequentially, and thus together. When a language is used to give commands to a software application (such as a shell) it is called a scripting language.
Compilers are used to translate source code from a programming language into either object code or machine code. Object code needs further processing to become machine code, and machine code is the central processing unit's native code, ready for execution.Compiled computer programs are commonly referred to as executables, binary images, or simply as binaries — a reference to the binary file format used to store the executable code.
Interpreted computer programs -in a batch or interactive session- are either decoded and then immediately executed or are decoded into some efficient intermediate representation for future execution. BASIC, Perl, and Python are examples of immediately executed computer programs. Alternatively, Java computer programs are compiled ahead of time and stored as a machine independent code called bytecode. Bytecode is then executed on request by an interpreter called a virtual machine.
The main disadvantage of interpreters is that computer programs run slower than when compiled. Interpreting code is slower than running the compiled version because the interpreter must decode each statement each time it is loaded and then perform the desired action. However, software development may be faster using an interpreter because testing is immediate when the compiling step is omitted. Another disadvantage of interpreters is that at least one must be present on the computer during computer program execution. By contrast, compiled computer programs need no compiler present during execution.
No properties of a programming language require it to be exclusively compiled or exclusively interpreted. The categorization usually reflects the most popular method of language execution. For example, BASIC is thought of as an interpreted language and C a compiled language, despite the existence of BASIC compilers and C interpreters. Some systems use just-in-time compilation (JIT) whereby sections of the source are compiled 'on the fly' and stored for subsequent executions.
A computer program in execution is normally treated as being different from the data the program operates on. However, in some cases this distinction is blurred when a computer program modifies itself. The modified computer program is subsequently executed as part of the same program. Self-modifying code is possible for programs written in machine code, assembly language, Lisp, C, COBOL, PL/1, Prolog and JavaScript (the eval feature) among others.
Typically, computer programs are stored in non-volatile memory until requested either directly or indirectly to be executed by the computer user. Upon such a request, the program is loaded into random access memory, by a computer program called an operating system, where it can be accessed directly by the central processor. The central processor then executes ("runs") the program, instruction by instruction, until termination. A program in execution is called a process.[6] Termination is either by normal self-termination or by error — software or hardware error.
Some computer programs are embedded into hardware. A stored-program computer requires an initial computer program stored in its read-only memory to boot. The boot process is to identify and initialize all aspects of the system, from processor registers to device controllers to memory contents.[7] Following the initialization process, this initial computer program loads the operating system and sets the program counter to begin normal operations. Independent of the host computer, a hardware device might have embedded firmware to control its operation. Firmware is used when the computer program is rarely or never expected to change, or when the program must not be lost when the power is off.[8]
Computer programs historically were manually input to the central processor via switches. An instruction was represented by a configuration of on/off settings. After setting the configuration, an execute button was pressed. This process was then repeated. Computer programs also historically were manually input via paper tape or punched cards. After the medium was loaded, the starting address was set via switches and the execute button pressed.[9]
Generative programming is a style of computer programming that creates source code through generic classes, prototypes, templates, aspects, and code generators to improve programmer productivity. Source code is generated with programming tools such as a template processor or an integrated development environment. The simplest form of source code generator is a macro processor, such as the C preprocessor, which replaces patterns in source code according to relatively simple rules.
Software engines output source code or markup code that simultaneously become the input to another computer process. Application servers are software engines that deliver applications to client computers. For example, a Wiki is an application server that lets users build dynamic content assembled from articles. Wikis generate HTML, CSS, Java, and JavaScript which are then interpreted by a web browser.
Many operating systems support multitasking which enables many computer programs to appear to run simultaneously on one computer. Operating systems may run multiple programs through process scheduling — a software mechanism to switch the CPU among processes often so users can interact with each program while it runs.[10] Within hardware, modern day multiprocessor computers or computers with multicore processors may run multiple programs.[11]
One computer program can calculate simultaneously more than one operation using threads or separate processes. Multithreading processors are optimized to execute multiple threads efficiently.
Computer programs may be categorized along functional lines. The main functional categories are system software and application software. System software includes the operating system which couples computer hardware with application software.[12] The purpose of the operating system is to provide an environment in which application software executes in a convenient and efficient manner.[12] In addition to the operating system, system software includes utility programs that help manage and tune the computer. If a computer program is not system software then it is application software. Application software includes middleware, which couples the system software with the user interface. Application software also includes utility programs that help users solve application problems, like the need for sorting.
Sometimes development environments for software development are seen as a functional category on its own, especially in the context of human-computer interaction and programming language design. Development environments gather system software (such as compilers and system's batch processing scripting languages) and application software (such as IDEs) for the specific purpose of helping programmers create new programs.
This entry is from Wikipedia, the leading user-contributed encyclopedia. It may not have been reviewed by professional editors (see full disclaimer)
| bug | |
| Canned Program (business term) | |
| software (in marketing) |
| What is a program or computer that is serviced by another program or computer called? | |
| How do you spell programs as in computer programs? | |
| What computers can program? |
Copyrights:
![]() | Britannica Concise Encyclopedia. Britannica Concise Encyclopedia. © 1994-2012 Encyclopædia Britannica, Inc. All rights reserved. Read more | |
![]() |
![]() | TechEncyclopedia. THIS DEFINITION IS FOR PERSONAL USE ONLY. All other reproduction is strictly prohibited without permission from the publisher. © 1981-2012 The Computer Language Company Inc. All rights reserved. Read more |
![]() | Barron's Marketing Dictionary. Dictionary of Marketing Terms. Copyright © 2000 by Barron's Educational Series, Inc. All rights reserved. Read more | |
![]() |
![]() | Columbia Encyclopedia. The Columbia Electronic Encyclopedia, Sixth Edition Copyright © 2012, Columbia University Press. Licensed from Columbia University Press. All rights reserved. www.cc.columbia.edu/cu/cup/. Read more |
![]() |
![]() | Bradford's Crossword Solver's Dictionary. Collins Bradford's Crossword Solver's Dictionary © Anne Bradford, 1986, 1993, 1997, 2000, 2003, 2005, 2008 HarperCollins Publishers All rights reserved. Read more |
![]() |
![]() | Wikipedia on Answers.com. This article is licensed under the Creative Commons Attribution/Share-Alike License. It uses material from the Wikipedia article Computer program. Read more |
Mentioned in