Algo1ING_Ch0
Algo1ING_Ch0
ch0 : Generalities
ch1 : Basic concepts
ch2 : Control Structures
ch3 : Unidimensional arrays
ch4 : Bidimensional arrays
ch5 : Strings
ch6 : Parametrized actions
References
1
Chapter 0
GENERALITIES
DVD reader
RAM
Screen
CPU
Interfaces
of
connexion keyboard
These components form the hardware part of a computer which can be schematised by the diagram:
Peripherals
Main
CPU memory
2
0.2 SOFTWARE AND HARDWARE
The entire set of hardware components is of no use (the first meaning of the word "hardware" was tools or
equipment). To become useful, it must be associated with another part known as software. Indeed, a
computer user essentially requests two types of services:
1. Creating and naming files; storing these files on storage media (e.g., flash drive); transferring information
between files and input/output devices (screen, keyboard, printer).
2. Executing existing programs or those introduced to the computer; data is entered via the keyboard or
taken from a file; results are displayed on the screen, printed out, or copied into a file.
None of these processes are possible without software. Generally, software is divided into two parts: the
operating system and application software.
An operating system, such as Linux or Windows, allows for the following two functions:
Application software enables users to perform specific tasks such as word processing (WinWord, Libre
Office Writer), programming (CodeBlocks, PyCharm), web browsing (Firefox, Internet Explorer), etc.
3
0.4 HANDLING PROGRAMS
Applications are programs originally written in high-level programming languages close to human language,
such as Pascal and C. To be executed, these programs are transformed by software tools. These tools, which
can be separate or integrated, are described as follows:
0.4.2 Compiler
This is a program that translates the source code written in an advanced language into a binary program
understood by the machine. The resulting binary program is called the object program.
Example: gcc, which includes the C compiler from the GNU project under UNIX.
0.4.3 Linker
This is a program that assembles the object code of the user program along with predefined procedures and
functions into a single executable program. Once this step is completed, the user program is ready to be
handled by the operating system.