How does computer programming work 1

How does programming a computer work? [Armin, 10 years]

A computer program is usually written as text, it is also called a source program. This describes what should happen in which order, e.g. all possible game sequences of a computer game or, in the case of a ticket program, the control of entries, payment and ticket printing. The source program consists of a sequence of instructions. The instructions are written in a programming language such as Java or C. However, the computer cannot directly understand and execute the source program. He needs the instructions in the form of machine code. That is the language of its processor. Therefore, the source program still has to be translated into machine code - similar to how sentences are translated from German into French. The compiler takes care of that. It breaks the program down into its individual parts and checks whether it adheres to the grammar of the programming language or not, as well as other properties. If everything is OK, the compiler generates the target program in machine language from the decomposed source program. The computer can now understand and do this. The mathematician Ada Lovelace wrote the first computer program in 1842/43, long before computers existed.


Prof. Dr. Hofstedt heads the programming languages ​​and compiler construction group at the Brandenburg University of Technology Cottbus-Senftenberg. She develops new programming languages ​​and translation methods.

www.b-tu.de

<zurück zu den Fragen>