Source: http://www.fresnel.fr/perso/marot/Documents/Enseignements/Informatique_Industrielle/Exercices_Micropro_L2.pdf