速查
二进制、十进制、十六进制:开发者速查表
提供高频进制转换模式、位组技巧与示例,帮助你快速完成二进制/十进制/十六进制互转。
2 分钟阅读
作者 Binary Code Translator#binary#decimal#hex#reference#developer-tools
提供高频进制转换模式、位组技巧与示例,帮助你快速完成二进制/十进制/十六进制互转。
When debugging bytes, logs, or packet data, speed matters. This is the cheat sheet I wish every dev had open.
Hex is compact and maps cleanly to binary:
| Binary | Hex |
|---|---|
| 0000 | 0 |
| 0001 | 1 |
| 0010 | 2 |
| 0011 | 3 |
| 0100 | 4 |
| 0101 | 5 |
| 0110 | 6 |
| 0111 | 7 |
| 1000 | 8 |
| 1001 | 9 |
| 1010 | A |
| 1011 | B |
| 1100 | C |
| 1101 | D |
| 1110 | E |
| 1111 | F |
11110000 -> split as 1111 0000 -> F0
2A -> 2 is 0010, A is 1010 -> 00101010
00101010 = 32 + 8 + 2 = 42
42 = 32 + 8 + 2 -> 00101010
0xFF as mask for one byte.0x0F and 0xF0 for low/high nibble operations.DE AD BE EF style).Try converting:
0x7F100000002550x2A01010101Use: