binary(base 2)
hexadecimal [ˌheksəˈdesɪml] (base 16)
decimal(base 10)
echo “obase=输出进制数;ibase=输入进制数;输入的数字” | bc
binary | decimal | hexadecimal |
---|---|---|
0 | 0 | 0 |
1 | 1 | 1 |
10 | 2 | 2 |
11 | 3 | 3 |
100 | 4 | 4 |
101 | 5 | 5 |
110 | 6 | 6 |
111 | 7 | 7 |
1000 | 8 | 8 |
1001 | 9 | 9 |
1010 | 10 | A |
1011 | 11 | B |
1100 | 12 | C |
1101 | 13 | D |
1110 | 14 | A |
1111 | 15 | B |
10000 | 16 | C |
10001 | 17 | D |
… | … | … |
11111111 | 255 | FF |