14.08.2013 Views

Lucidi in formato PDF - Dipartimento di Matematica e Informatica

Lucidi in formato PDF - Dipartimento di Matematica e Informatica

Lucidi in formato PDF - Dipartimento di Matematica e Informatica

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Il sistema esadecimale<br />

• Siccome non c’erano simboli conosciuti per rappresentare i numeri da<br />

<strong>di</strong>eci a qu<strong>in</strong><strong>di</strong>ci con una s<strong>in</strong>gola cifra, si scelse <strong>di</strong> utilizzare le prime sei<br />

lettere dell’alfabeto:<br />

A<br />

B C D E F<br />

10<br />

11<br />

• Esempio: il numero 229 10 <strong>in</strong> base se<strong>di</strong>ci si scrive E5 poiché vale<br />

quanto segue:<br />

E5 16 = E × 16 1 + 5 × 16 0<br />

= 14 × 16 + 5 × 1<br />

= 224 + 5<br />

= 229 10<br />

• Le rappresentazioni esadecimali vengono spesso denotate con il<br />

prefisso 0x oppure \x. Qu<strong>in</strong><strong>di</strong> E5 16 = 0xE5 = \xE5<br />

12<br />

13<br />

14<br />

15

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

Saved successfully!

Ooh no, something went wrong!