Format

Nasza ocena:

3
Pobrań: 14
Wyświetleń: 1155
Komentarze: 0
Notatek.pl

Pobierz ten dokument za darmo

Podgląd dokumentu
Format - strona 1

Fragment notatki:


1.15 format 16-bit number, bit 15 ( left-most bit ) is sign-bit, binary point is between bit 15 and bit 14 (i.e. m = 15 ) X = S . x x x x x x x x x x x x x x x Resolution = 2 -15 V(X) min = -1    ( 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 )    ( 8000 Hex ) V(X) max = 1 - 2 -15    (0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 )    ( 7FFF Hex ) To convert a negative decimal number, say -0.242146, to 1.15 format: Multiply the positive, ie. 0.242146 by 2^15 and convert to HEX, which gives you 1EFE. Take the two's compliment of the number, which will give you correct value in 1.15 format, i.e. 0xE101 in this example.
... zobacz całą notatkę



Komentarze użytkowników (0)

Zaloguj się, aby dodać komentarz