2025-01-02 10:46:09 +08:00

8 lines
467 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

计算机中只能存储二进制数据,那该怎么存储字符串呢?将一个字符映射成一个二进制数据的过程也叫做编码,将一个二进制数据映射到一个字符的过程叫做解码。人们抽象出一个字符集的概念来描述某个字符范围的编码规则。比如
```
'a' -> 00000001 (十六进制0x01)
'b' -> 00000010 (十六进制0x02)
'A' -> 00000011 (十六进制0x03)
'B' -> 00000100 (十六进制0x04)
```