Jinsi ya kubadilisha decimal kuwa binary
Hatua za uongofu:
- Gawanya nambari kwa 2.
- Pata mgawo kamili kwa marudio yanayofuata.
- Pata salio kwa tarakimu ya jozi.
- Rudia hatua hadi mgawo uwe sawa na 0.
Mfano #1
Badilisha 41 10 kuwa binary:
Mgawanyiko kwa 2 | Quotient | Salio | kidogo # |
---|---|---|---|
41/2 | 20 | 1 | 0 |
20/2 | 10 | 0 | 1 |
10/2 | 5 | 0 | 2 |
5/2 | 2 | 1 | 3 |
2/2 | 1 | 0 | 4 |
1/2 | 0 | 1 | 5 |
Kwa hivyo 41 10 = 101001 2
Jedwali la ubadilishaji wa decimal hadi binary
Nambari ya decimal | Nambari ya binary | Nambari ya Hex |
---|---|---|
0 | 0 | 0 |
1 | 1 | 1 |
2 | 10 | 2 |
3 | 11 | 3 |
4 | 100 | 4 |
5 | 101 | 5 |
6 | 110 | 6 |
7 | 111 | 7 |
8 | 1000 | 8 |
9 | 1001 | 9 |
10 | 1010 | A |
11 | 1011 | B |
12 | 1100 | C |
13 | 1101 | D |
14 | 1110 | E |
15 | 1111 | F |
16 | 10000 | 10 |
17 | 10001 | 11 |
18 | 10010 | 12 |
19 | 10011 | 13 |
20 | 10100 | 14 |
21 | 10101 | 15 |
22 | 10110 | 16 |
23 | 10111 | 17 |
24 | 11000 | 18 |
25 | 11001 | 19 |
26 | 11010 | 1A |
27 | 11011 | 1B |
28 | 11100 | 1C |
29 | 11101 | 1D |
30 | 11110 | 1E |
31 | 11111 | 1F |
32 | 100000 | 20 |
64 | 1000000 | 40 |
128 | 10000000 | 80 |
256 | 100000000 | 100 |
Mfumo wa decimal
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.
Mfumo wa binary
Mfumo wa nambari mbili hutumia nambari 2 kama msingi wake (radix). Kama mfumo wa nambari za msingi-2, ina nambari mbili tu: 0 na 1.