20.05.2013 Views

Codifica dell'informazione

Codifica dell'informazione

Codifica dell'informazione

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Conversioni di base<br />

Problema: convertire un numero senza segno da base B a<br />

base 10.<br />

Soluzione:<br />

dato il numero senza segno in base B (cn-1 cn-2 ... cn-1 c1 c0)B il<br />

corrispondente valore in base 10 si calcola con la seguente formula:<br />

cn-1*B n-1 + cn-2*B n-2 + ... + c1*B 1 + c0*B 0<br />

Esempio: (101011)2 corrisponde a (43)10, infatti<br />

1*2 5 +0*2 4 +1*2 3 +0*2 2 +1*2 1 +1*2 0 = 32+0+8+0+2+1 = 43

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!