Source: http://www.est-usmba.ac.ma/AUTOMATISME/res/TD_systeme Numeration (Correction).pdf