Conversion

tonynova Messages postés 10 Date d'inscription mercredi 27 novembre 2013 Statut Membre Dernière intervention 3 janvier 2014 - 27 nov. 2013 à 20:54
Whismeril Messages postés 19019 Date d'inscription mardi 11 mars 2003 Statut Contributeur Dernière intervention 14 avril 2024 - 28 nov. 2013 à 20:58
Bonjour,
Quelle formule dois-je implementer pour convertir un nombre hexadecimal,un nombre binaire en decimal ?

3 réponses

Whismeril Messages postés 19019 Date d'inscription mardi 11 mars 2003 Statut Contributeur Dernière intervention 14 avril 2024 655
28 nov. 2013 à 06:23
Bonjour, grâce mon ami Google:
http://stackoverflow.com/questions/74148/how-to-convert-numbers-between-hexadecimal-and-decimal-in-c

Et pour le binaire standard, http://stackoverflow.com/questions/9742777/binary-to-decimal-conversion-formula la réponse qui a 6 votes est valable quelque soit la base (en base 4 tu remplaces puissance 2 par puissance 4).
La réponse qui a 5 vote ne marche qu'avec du binaire.


Attention si ton binaire est code en BCD, ou en code Gray, c'est autre chose.
1
tonynova Messages postés 10 Date d'inscription mercredi 27 novembre 2013 Statut Membre Dernière intervention 3 janvier 2014
28 nov. 2013 à 18:02
Merci de votre reponse
0
Whismeril Messages postés 19019 Date d'inscription mardi 11 mars 2003 Statut Contributeur Dernière intervention 14 avril 2024 655
28 nov. 2013 à 20:58
De rien, si cela convient, merci d'indiquer que la discussion est résolue
0
tonynova Messages postés 10 Date d'inscription mercredi 27 novembre 2013 Statut Membre Dernière intervention 3 janvier 2014
28 nov. 2013 à 18:04
merci,je vais essayer
0
Rejoignez-nous