Desimali ni nini?
Mfumo wa nambari za desimali ndio unaotumiwa zaidi na mfumo wa kawaida katika maisha ya kila siku. Inatumia nambari 10 kama msingi wake (radix). Kwa hiyo, ina alama 10: Nambari kutoka 0 hadi 9; yaani 0, 1, 2, 3, 4, 5, 6, 7, 8 na 9.
hexadecimal ni nini?
Mfumo wa nambari za heksadesimali, mara nyingi hufupishwa kuwa "hex", ni mfumo wa nambari unaojumuisha alama 16 (msingi 16). Mfumo wa kawaida wa nambari huitwa decimal (msingi 10) na hutumia alama kumi: 0,1,2,3,4,5,6,7,8,9. Hexadecimal hutumia nambari za desimali na alama sita za ziada. Hakuna alama za nambari zinazowakilisha thamani kubwa kuliko tisa, kwa hivyo herufi zilizochukuliwa kutoka kwa alfabeti ya Kiingereza, haswa A, B, C, D, E na F. Hexadecimal A = desimali 10, na hexadecimal F = desimali 15.
Mfano wa decimal hadi hex
Badilisha 20201 10 kuwa hex:
Mgawanyiko kwa 16 | Quotient | Salio (desimali) | Salio (hex) | Nambari ya nambari |
---|---|---|---|---|
20201/16 | 1262 | 9 | 9 | 0 |
1262/16 | 78 | 14 | E | 1 |
78/16 | 4 | 14 | E | 2 |
8/16 | 0 | 4 | 4 | 3 |
Kwa hivyo 20201 10 = 4EE9 16
Jedwali la hloko la decimal hadi hex
Msingi wa decimal 10 | Hex msingi 16 |
---|---|
0 | 0 |
1 | 1 |
2 | 2 |
3 | 3 |
4 | 4 |
5 | 5 |
6 | 6 |
7 | 7 |
8 | 8 |
9 | 9 |
10 | A |
11 | B |
12 | C |
13 | D |
14 | E |
15 | F |
16 | 10 |
17 | 11 |
18 | 12 |
19 | 13 |
20 | 14 |
21 | 15 |
22 | 16 |
23 | 17 |
24 | 18 |
25 | 19 |
26 | 1A |
27 | 1B |
28 | 1C |
29 | 1D |
30 | 1E |
40 | 28 |
50 | 32 |
60 | 3C |
70 | 46 |
80 | 50 |
90 | 5A |
100 | 64 |
200 | C8 |
1000 | 3E8 |
2000 | 7D0 |