Source: https://www.uvt.rnu.tn/resources-uvt/cours/Automatismes/chapitre4_rdp.pdf