Computer program

a computer program is a consequence of instructions, which can be brought on a computer to the execution, over thereby a certain functionality (z. B. To manage text processing). The computer program lies mostly on a data medium as executable program tape (in the so-called. Machine code) one loads forwards and for the execution into the main memory of the computer. The program becomes as succession of machine i.e. Processes and with it to the execution brought to processor instructions of the processor of the computer (also CCU called).

Detail:A program tape, outMachine code exists, contains instructions from the vocabulary of the processor, i.e. Instructions, which are understandably” and thus executable for the Prozessores (CCU) “. One generally calls the production of such a program programming. In the beginnings of programming became - toto the development of so-called.High-level languages - exclusive in machine code programs. A program tape, those in a high-level language consist of a succession of (mostly the English language taken) instructions, those are drawn up for the programmer (i. A.) are more understandable than the machine code(z. B. : WHILE, UNTIL, DO, price = quantity * price per unit,…).

Both as the source text written in a high-level language and the machine code executable of a computer are designated program. Thus the program of the high-level language on a processor forExecution to be brought can do must it into machine code be translated. An instruction of a high-level language is translated into 1 to generally several machine instructions. One calls the translation process compiling. ... In order to generate from the source text the machine code, becomes Assembler, compiler or interpreter need. These translate the instructions of the programming language, which should be for human users understandable and machinable, into the semantically corresponding instructions of the machine language of the used computer.

The development of a proceeding within programming in one Implementation related to a concrete solution method is called (algorithm).

In the linguistic usage computer program is usually shortened to program or the English. Software ( for in and majority) understood synonymously used.

Table of contents


the first computer program of Ada Lovelace

as world-wide the first computer program applies a regulation to the computation of Bernoulli numbers, the Ada Lovelace inengines of Charles Babbage to the years 1842/ 1843 for the mechanical Analytical provided. This program could be implemented at its time only by hand, because because of manufacturing problems there were in 19. Century no functional machine.

firstIn the years

1936 to 1941 Konrad Zuse the computers Z1 and Z3, which processed long instruction sequences on a paper tape, sketched programs on paper tapes the first computer programs, which could be implemented on material machines. The computers controlled the fourIn each case an arithmetic operation and a storage address contained basic operations of arithmetic and square root computations on binary floating-point numbers, the paper tape.

On Zuse also the first higher programming language, decreases/goes back plan calculation. Thus problems can be formulated system-independently and later into a machine-readable formtransfer.

programs in the main memory

of the EDVAC - computer, which was based on a draft of John von Neumann from the year 1945, had a mercury delay memory for 1024 firm or floating-point numbers with in each case 44 bits. Each memory cell could instead of oneNumber also an instruction take up. With this computer concept it was possible to transfer the instructions of a computer program before the execution for the first time into the main memory. This is this very day usual. EDVAC was however only finished in the year 1951 partly. The demonstration computerManchester SSE and the EDSAC developing on the EDVAC - computers had expenditure-led programs from the main memory already before.

higher programming languages and compiler

end of the 1950er years became computers so efficiently that special programs, compiler, source texts (English:SOURCE code) into higher programming languages automatically into machine instructions, thus executable programs, to translate knew. Executable programs can be loaded and processed then, as with the EDVAC, into the memory.

With FORTRAN, COBOL, ALGOL and LISP developed into the late 1950erYears higher programming languages standardized first. Programs in these languages run by an appropriate compiler translated on different computers. They can be used partly also still on modern computers.

from the algorithm to the program

computationthe largest common divisor

a program for the determination of the largest common divisor (ggT) of two numbers is to be prepared. First a suitable algorithm must be found.

The Euclidean algorithm, already around 300 v. Chr. one described, determined that largest common divisor (ggT) of two natural numbers of A and B:

  1. A is the larger of the two numbers of A and B (gegenenfalls exchange).
  2. Set for A = A - B.
  3. If A and B are unequal, then with step 1continue, if they are alike, then the algorithm terminate: This number is the largest common divisor.

use of a programming language

as soon as a formal description of an algorithm, thus an exactly defined process specification, is present, can the algorithm converted (implemented) become. In addition a suitable programming language is selected.

For the conversion today usually a higher programming language used, which cannot be implemented by a computer possibly directly, but will be first compiled or be interpreted must. In languages such as Pascal variables serve,Expressions, comparisons, assignments and control structures to the conversion of the ggT algorithm:

(* Schritt3: *) WHILE A  <> B DO (* so long A unequally B *) BEGIN (* Schritt1: *) IF B  > A THEN (* case B more largely than A *) BEGINH = A; A = B; B = H; Exchange (* A and B *) END; (* Schritt2: *) A = A-B; Replace (* A by A-B *) END;

consideration of all special cases

during the conversion becomes alsothe examination of step 3 begun. The original algorithm does not consider the case that A and B can be alike at the beginning already. If the task would be to find the largest divisor from 103 and 103 to humans became immediately thatCall result 103, would not endeavor he the algorithm at all. The original algorithm was resulted in however zero. The conversion on a computer must consider also all special cases. By preferring step 3 the special case is correctly treated here.

elementary steps

Pascal and other programming languages possess an operation for exchanging numbers. This must be converted therefore into more elementary steps. An additional variable H, an artificial variable in such a way specified, permits the permutation by three assignments:

H: = A; Save (* value of A in the artificial variables H *) A: = B; Overwrite (* A with the value of B *) B: = H; Overwrite (* B with the value of H (=A) *)

this is alsoa small algorithm.

a complete program

thereby from this a correct program becomes, must the algorithm still around in and/or. Output instructions, often however also around variables and a program structure to be supplemented. These are not part of the actual algorithm:

PROGRAM Ggt (input, output); (* program header *) VAR A, B, H: Integer; (* variable definition *) BEGIN ReadLn (A, B); (* input of A and B *) WHILE A  <> B DO (* Euclidean algorithm *) BEGIN IF B  > A THEN BEGIN H: = A; A: = B; B: = H; END; A: = A-B; END; WriteLn (A); (* expenditure of A *) END. (* program end *)

translation and execution

only this program can be written with a text editor into a file, thento be translated and implemented can. For this a compiler is necessary, which translates the code in the programming language into machine language and which result writes into an executable file. This can be started then over an operating system. The program must thereby onlyonce to be translated. It can arbitrarily often be started thereafter. (See also compiling).

Some programming languages do not need a compiler, but instead of its an interpreter, that can implement programs without previous translation. The interpreter is then an executable programin machine language.

A further possibility exists in the use of intermediate code (byte code), which is generated by the compiler in place of the machine code. An example of it is Java: The Java compiler produces byte code, which then on the so-called virtual machineone implements. The virtual machine interprets or translates then the byte code for the underlying operating system.

By means of special programs, Decompiler so mentioned, is possible it to produce from the machine code again a source text readable in high-level language.

See also

Wiktionary: Computer program - word origin, synonyms and translations



  > German to English > (Machine translated into English)