Source: http://www.juggling.ch/gisin/coursam_ref/coursam3os_2017_18/Exercices_bit_ou_byte.pdf