Conversion between binary, octal, decimal, and hexadecimal
1. [binary (0 ~ 1), octal (0 ~ 7), decimal (0 ~ 9)] → hexadecimal (0 ~ ~ 15→a ~ F)
101011 → 1*20 + 1*21 + 0*22 + 1*23 + 0*24 + 1*25 = 1 + 2 + 0 + 8 + 0 + 32 = 43
053 → 3*80 + 5*81 = 3 + 40 = 43
0x2B = B * 160 + 2*161 = 11 + 32 = 43
2. Decimal → [hexadecimal, decimal]
10 → 2
10 → 8 796 → 01434
10 → sixteen 796 → 0x31c
3. Binary → [hexadecimal]
II → 8 11010111. 0100111 → 327.234Three in one
A group of 0 1 1 0 1 0 1 1 1 1 1 → 3 2 7
A group of 0 0 0 1 1 0 0 0 0 0 0 2 3 4 after decimal point
Reads data from high to low, with the decimal point unchanged at 327.234.
Table of binary and octal Encoding |
Binary |
Octal |
000 |
0 |
001 |
1 |
010 |
2 |
011 |
3 |
100 |
4 |
101 |
5 |
110 |
6 |
111 |
7 |
8 → second 327 → 011010111Retrieve Region 3
II → 16th 1 1 0 1 0 1 1 1 → D 7Four in one
1101 → 13 (D)
0111 → 7
Read as D7 in sequence
16→2ndTake limit 4
4. octal → hexadecimal octal → binary → sixteen
327 → 011010111 → D7
5. hexadecimal →