Solution Exercice 1 / Série 1

(35)10 = ( 100011 )2 car:

35 |2          
  --          
1 17 |2        
    --        
  1 8 |2      
      --      
    0 4 |2    
        --    
      0 2 |2  
          --  
        0 1 |2
            --
          1 0

(35)10 = ( 23 )16

35 |16  
  --  
3 2 |16
    --
  2 0

Autre méthode : puisque nous avons le code binaire, donc on regroupe les bits 4 par 4 :

(35)10 = ( 0010 0011 )2 = ( 23 )16 car:

( 0010 )2 = 0x20 + 1x21 + 0x22 + 0x23 = 0 + 2 + 0 + 0 = 2

( 0011 )2 = 1x20 + 1x21 + 0x22 + 0x23 = 1 + 2 + 0 + 0 = 3


(35)10 = ( 0011 0101 )BCD car :

3 |2      
  --      
1 1 |2    
    --    
  1 0 |2  
      --  
    0 0 |2
        --
      0 0

5 |2      
  --      
1 2 |2    
    --    
  0 1 |2  
      --  
    1 0 |2
        --
      0 0

(35)10 = ( 43 )8

35 |8  
  --  
3 4 |8
    --
  4 0

Autre méthode : puisque nous avons le code binaire, donc on regroupe les bits 3 par 3 :

(35)10 = ( 100 011 )2 = ( 43 )8 car:

( 100 )2 = 0x20 + 0x21 + 1x22 = 0 + 0 + 4 = 4

( 011 )2 = 1x20 + 1x21 + 0x22 = 1 + 2 + 0 = 3


( 1101001 )2 = ( 69 )16

On regroupe les bits 4 par 4 (en ajoutant des 0 non significatifs) :

( 1001 )2 = 1x20 + 0x21 + 0x22 + 1x23 = 1 + 0 + 0 + 8 = 9

( 0110 )2 = 0x20 + 1x21 + 1x22 + 0x23 = 0 + 2 + 4 + 0 = 6


( 1101001 )2 = ( 151 )8

On regroupe les bits 3 par 3 (en ajoutant des 0 non significatifs) :

( 001 )2 = 1x20 + 0x21 + 0x22 = 1

( 101 )2 = 0x20 + 1x21 + 1x22 = 1 + 0 + 4 = 5

( 001 )2 = 1x20 + 0x21 + 0x22 = 1


( 1101001 )2 = ( 69 )16 = ( 105 )10

Puisque nous avons le code hexadecimal, il est plus rapide de l'utiliser dans les conversions que le binaire:

( 69 )16 = 9x160 + 6x161 = 9 + 96 = 105


( 1101001 )2 = ( 105 )10 = ( 0001 0000 0101 )BCD

On regroupe les bits 4 par 4 (en ajoutant des 0 non significatifs) :

1 |2      
  --      
1 0 |2    
    --    
  0 0 |2  
      --  
    0 0 |2
        --
      0 0

0 |2      
  --      
0 0 |2    
    --    
  0 0 |2  
      --  
    0 0 |2
        --
      0 0

5 |2      
  --      
1 2 |2    
    --    
  0 1 |2  
      --  
    1 0 |2
        --
      0 0

 


( 543 )8 = ( 101100011 )2

On convertit chaque chiffre en une séquence de 3 bits :

5 |2    
  --    
1 2 |2  
    --  
  0 1 |2
      --
    1 0

4 |2    
  --    
0 2 |2  
    --  
  0 1 |2
      --
    1 0

3 |2    
  --    
1 1 |2  
    --  
  1 0 |2
      --
    0 0

( 543 )8 = ( 101100011 )2 = ( 163 )16

Puisque nous avons le code binaire, on regroupe les bits 4 par 4:

( 0011 )2 = 1x20 + 1x21 + 0x22 + 0x23 = 1 + 2 + 0 + 0 = 3

( 0110 )2 = 0x20 + 1x21 + 1x22 + 0x23 = 0 + 2 + 4 + 0 = 6

( 0001 )2 = 1x20 + 0x21 + 0x22 + 0x23 = 1


( 543 )8 = ( 163 )16 = ( 355 )10

( 163 )16 = 3x160 + 6x161 + 1x162 = 3 + 96 + 256 = 355


( 543 )8 = ( 355 )10 = ( 0011 0101 0101 )BCD

5 |2      
  --      
1 2 |2    
    --    
  0 1 |2  
      --  
    1 0 |2
        --
      0 0

3 |2      
  --      
1 1 |2    
    --    
  1 0 |2  
      --  
    0 0 |2
        --
      0 0

( 3E.F )16 = ( 62.9375 )10

( 3E.F )16 = Ex160 + 3x161 + Fx16-1 = 14 + 48 + 0.9375 = 62.9375


( 3E.F )16 = ( 62.9375 )10 = ( 111110.11110)2

62 |2          
  --          
0 31 |2        
    --        
  1 15 |2      
      --      
    1 7 |2    
        --    
      1 3 |2  
          --  
        1 1 |2
            --
          1 0

    .9375
    x 2
1   = .875
    x 2
1   = .75
    x 2
1   = .5
    x 2
1   = .0
    x 2
0   = .0 (0 non significatif)

On aurait pu convertir directement du code hexadecimal en convertissant chaque chiffre en 4 bits:

( 3E.F )16 = ( 00111110.1111)2


( 3E.F )16 = ( 62.9375 )10 = ( 76.74)8

62 |8  
  --  
6 7 |8
    --
  7 0

    .9375
    x 8
7   = .5
    x 8
4   = .0
    x 8
0   = .0 (0 non significatif)

On aurait pu convertir directement du code binaire en regroupant les bits 3 par 3:

( 3E.F )16 = ( 111110.111100)2 = ( 76.74)8


( 3E.F )16 = ( 62.9375 )10 = ( 0110 0010 . 1001 0011 0111 0101 )BCD

6 |2      
  --      
0 3 |2    
    --    
  1 1 |2  
      --  
    1 0 |2
        --
      0 0

2 |2      
  --      
0 1 |2    
    --    
  1 0 |2  
      --  
    0 0 |2
        --
      0 0

9 |2      
  --      
1 4 |2    
    --    
  0 2 |2  
      --  
    0 1 |2
        --
      1 0

3 |2      
  --      
1 1 |2    
    --    
  1 0 |2  
      --  
    0 0 |2
        --
      0 0

7 |2      
  --      
1 3 |2    
    --    
  1 1 |2  
      --  
    1 0 |2
        --
      0 0

5 |2      
  --      
1 2 |2    
    --    
  0 1 |2  
      --  
    1 0 |2
        --
      0 0

Décimal Binaire Hexadécimal BCD Octal
35 100011 23 0011 0101 43
105 1101001 69 0001 0000 0101 151
355 101100011 163 0011 0101 0101 543
62.9375 111110.1111 3E. F 0110 0010 . 1001 0011 0111 0101 76.74
85 1010101 55 1000 0101 125
243.25 1101111.01 6F.4 0010 0100 0011.0010 0101 157.2
85.75

1010101.11

55.C 1000 0101.0111 0101 125.6
719 1011001111 2CF 0111 0001 1001 1317
26.625 11010.101 1A.A 0010 0111.0110 0010 0101 32.5
36.4 100100.0110 0110 0110.. 24.666... 11 0110.01 44.3146..