Advertisement
d72000

Hexadécimale en binaire

Oct 18th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. Lbl 0
  2. Input Chaîne1
  3. longueur(Chaîne1)->A
  4. " "->Chaîne3
  5. While A≠0
  6. sous-Chaîne(Chaîne1,A,1)->Chaîne2
  7. A-1->A
  8. If Chaîne2="0"
  9. Then
  10. "0000"+Chaîne3->Chaîne3
  11. End
  12. If Chaîne2="1"
  13. Then
  14. "0001"+Chaîne3->Chaîne3
  15. End
  16. If Chaîne2="2"
  17. Then
  18. "0010"+Chaîne3->Chaîne3
  19. End
  20. If Chaîne2="3"
  21. Then
  22. "0011"+Chaîne3->Chaîne3
  23. End
  24. If Chaîne2="4"
  25. Then
  26. "0100"+Chaîne3->Chaîne3
  27. End
  28. If Chaîne2="5"
  29. Then
  30. "0101"+Chaîne3->Chaîne3
  31. End
  32. If Chaîne2="6"
  33. Then
  34. "0110"+Chaîne3->Chaîne3
  35. End
  36. If Chaîne2="7"
  37. Then
  38. "0111"+Chaîne3->Chaîne3
  39. End
  40. If Chaîne2="8"
  41. Then
  42. "1000"+Chaîne3->Chaîne3
  43. End
  44. If Chaîne2="9"
  45. Then
  46. "1001"+Chaîne3->Chaîne3
  47. End
  48. If Chaîne2="A"
  49. Then
  50. "1010"+Chaîne3->Chaîne3
  51. End
  52. If Chaîne2="B"
  53. Then
  54. "1011"+Chaîne3->Chaîne3
  55. End
  56. If Chaîne2="C"
  57. Then
  58. "1100"+Chaîne3->Chaîne3
  59. End
  60. If Chaîne2="D"
  61. Then
  62. "1101"+Chaîne3->Chaîne3
  63. End
  64. If Chaîne2="E"
  65. Then
  66. "1110"+Chaîne3->Chaîne3
  67. End
  68. If Chaîne2="F"
  69. Then
  70. "1111"+Chaîne3->Chaîne3
  71. End
  72. End
  73. Disp Chaîne3
  74. Goto 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement