Primary
Program ○꠹|Definition|1st|20251119205401-00-⌔
Computer program
A computer program is a sequence or set1 of instructions in a programming language for a computer to execute. It is one component of software, which also includes documentation and other intangible components.2
A computer program in its human-readable form is called source code. Source code needs another computer program to execute because computers can only execute their native machine instructions. Therefore, source code may be translated to machine instructions using a compiler written for the language. (Assembly language programs are translated using an assembler.) The resulting file is called an executable. Alternatively, source code may execute within an interpreter written for the language.3
If the executable is requested for execution,4 then the operating system loads it into memory5 and starts a process.6 The central processing unit will soon switch to this process so it can fetch, decode, and then execute each machine instruction.7
If the source code is requested for execution, then the operating system loads the corresponding interpreter into memory and starts a process. The interpreter then loads the source code into memory to translate and execute each statement. Running the source code is slower than running an executable.89 Moreover, the interpreter must be installed on the computer.
Printed 2026-06-28.
(echo:: @ ᯤ)
Link to original Footnotes
The Prolog language allows for a database of facts and rules to be entered in any order. However, a question about a database must be at the very end. ↩
“ISO/IEC 2382:2015”. ISO. 2020-09-03. Archived from the original on 2016-06-17. Retrieved 2022-05-26. [Software includes] all or part of the programs, procedures, rules, and associated documentation of an information processing system. ↩
Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 7. ISBN 0-201-71012-9. An alternative to compiling a source program is to use an interpreter. An interpreter can directly execute a source program[.] ↩
Either the user or another program makes the request. ↩
Kerrisk, Michael (2010). The Linux Programming Interface. No Starch Press. p. 22. ISBN 978-1-59327-220-3. The kernel can load a new program into memory[.] ↩
Silberschatz, Abraham (1994). Operating System Concepts, Fourth Edition. Addison-Wesley. p. 98. ISBN 978-0-201-50480-4. Informally, a process is a program in execution. ↩
Tanenbaum, Andrew S. (1990). Structured Computer Organization, Third Edition. Prentice Hall. p. 32. ISBN 978-0-13-854662-5. ↩
Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 7. ISBN 0-201-71012-9. ↩
An executable has each machine instruction ready for the CPU. ↩
Secondary
• • •