Motorola M68000 Betriebsanweisung Seite 22

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 256
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 21
8 Assembly Language Programming for the 68000 Family
Hexadecimal
Hexadecimal, or base 16, uses positional values that are powers of 16.
Each hex digit can take on 16 values. Since the decimal digits 0 through
9 only represent 10 values, 6 additional symbols are needed. The letters
A through F are used to represent these additional values. Thus the hex
digits are represented by 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F,
corresponding to the values from 010 to 1510. The positional values are:
(16)° l
(16)* * 16
(16)2 * 256
(16)3 = 4096
etc.
As you can see, these values increase rapidly. A hex number is usually
larger than it looks. For example, 32BF10 is
3(16)3+2 (16)2+ll(16)1+15(16)0
- 12,288+512+176+15 = 12,99110
We can convert from decimal to hexadecimal by either method dis
cussed above. For example, to convert 38710 to hex, we perform the
following:
387/16 « 24 R 3
24/16 » 1 R 8
1/16 >0R1 (finished)
The result in hex is 183ie. Remember to list the hex digits in reverse order.
A nice property of hexadecimal numbers is that they can be converted
to binary almost by inspection. Since 24=16, there is a simple relationship
present. Four binary digits grouped together can represent one hexadeci
mal digit. The binary values 0000 through 1111 represent the hexadecimal
digits 0 through F.
HEX
BINARY HEX
BINARY
0 0000
8
1000
1
0001
9 1001
2
0010
A
1010
3
0011 B
1011
4
0100
C
1100
5
0101
D
1101
6
0110 E
1110
7
0111
P 1111
Seitenansicht 21
1 2 ... 17 18 19 20 21 22 23 24 25 26 27 ... 255 256

Kommentare zu diesen Handbüchern

Keine Kommentare