Exercicios mudança de base
Página ¬¬¬¬– 73
1. Conversão de base 10 para base 2.
a) 329 329/2 = 164 resto = 1 164/2 = 82 resto = 0 82/2 = 41 resto = 0 41/2 = 20 resto = 1 20/2 = 10 resto = 0 10/2 = 5 resto = 0 5/2 = 2 resto = 1 2/2 = 1 resto = 0 1/2 = 0 resto = 1
329 = 101001001
b) 284 284/2 = 142 resto = 0 142/2 = 71 resto = 0 71/2 = 35 resto = 1 35/2 = 17 resto = 1 17/2 = 8 resto = 1 8/2 = 4 resto = 0 4/2 = 2 resto = 0 2/2 = 1 resto = 0 1/2 = 0 resto = 1
284 = 100011100
c) 473 473/2 = 236 resto = 1 236/2 = 118 resto = 0 118/2 = 59 resto = 0 59/2 = 29 resto = 1 29/2 = 14 resto = 1 14/2 = 7 resto = 0 7/2 = 3 resto = 1 3/2 = 1 resto = 1 1/2 = 0 resto = 1
473 = 111011001
d) 69 69/2 = 34 resto = 1 34/2 = 17 resto = 0 17/2 = 8 resto = 1 8/2 = 4 resto = 0 4/2 = 2 resto = 0 2/2 = 1 resto = 0 1/2 = 0 resto = 1
69 = 1000101
e) 135
135/2 = 67 resto = 1 67/2 = 33 resto = 1 33/2 = 16 resto = 1 16/2 = 8 resto = 0 8/2 = 4 resto = 0 4/2 = 2 resto = 0 2/2 = 1 resto = 0 1/2 = 0 resto = 1
135 = 10000111
f) 215
215/2 = 107 resto = 1 107/2 = 53 resto = 1 53/2 = 26 resto = 1 26/2 = 13 resto = 0 13/2 = 6 resto = 1 6/2 = 3 resto = 0 3/2 = 1 resto = 1 1/2 = 0 resto = 1
215 = 11010111
g) 581
581/2 = 290 resto = 1 290/2 = 145 resto = 0 145/2 = 72 resto = 1 72/2 = 36 resto = 0 36/2 = 18 resto = 0 18/2 = 9 resto = 0 9/2 = 4 resto = 1 4/2 = 2 resto = 0 2/2 = 1 resto = 0 1/2 = 0 resto = 1
581 = 1001000101¬¬
h) 197
197/2 = 98 resto = 1 98/2 = 49 resto = 0 49/2 = 24 resto = 1 24/2 = 12 resto = 0 12/2 = 6 resto = 0 6/2 = 3 resto = 0 3/2 = 1 resto = 1 1/2 = 0 resto = 1
197 = 11000101¬¬¬¬¬¬
2. Conversão de base 2 para base 10.
a) 11011101010 1024 512 256 128 64 32 16 8 4 2 1
1 1 0 1 1 1 0 1 0 1 0
1024 + 512 + 128 + 64 + 32 + 8 + 2 = 1770
11011101010 = (1770)10