Hvad er Decimal?
Decimal er vores dagligdags talsystem. Det bruger ti cifre: 0 til 9.
Hvad er Hexadecimal?
Hexadecimal (hex) er et base-16 talsystem. Det bruger 16 symboler: 0-9 og A-F (A=10, B=11, C=12, D=13, E=14, F=15).
Sådan Konverterer Du Decimal til Hexadecimal
- Del decimaltallet med 16
- Noter resten (0-15)
- Del resultatet med 16 igen
- Gentag indtil resultatet er 0
- Læs resterne fra bunden og op, og brug A-F for 10-15
Sådan Konverteres 2748 til Hex
| Division | Resultat | Rest | Hex-ciffer |
|---|---|---|---|
| 2748 ÷ 16 = 171 | 171 | 12 | C |
| 171 ÷ 16 = 10 | 10 | 11 | B |
| 10 ÷ 16 = 0 | 0 | 10 | A |
Læs fra bunden og op: 2748 i decimal = ABC i hexadecimal
Endnu et Eksempel: 3855 til Hex
3855 ÷ 16 = 240 rest 15 (F)
240 ÷ 16 = 15 rest 0
15 ÷ 16 = 0 rest 15 (F)
Læs fra bunden og op: 3855 i decimal = F0F i hexadecimal
Konverteringstabel
| Decimal | Hexadecimal | Binær |
|---|---|---|
| 0 | 0 | 0000 |
| 1 | 1 | 0001 |
| 2 | 2 | 0010 |
| 3 | 3 | 0011 |
| 4 | 4 | 0100 |
| 5 | 5 | 0101 |
| 6 | 6 | 0110 |
| 7 | 7 | 0111 |
| 8 | 8 | 1000 |
| 9 | 9 | 1001 |
| 10 | A | 1010 |
| 11 | B | 1011 |
| 12 | C | 1100 |
| 13 | D | 1101 |
| 14 | E | 1110 |
| 15 | F | 1111 |