2 Text, sound and images | 文本、声音和图像

📚 2 Text, sound and images | 文本、声音和图像

In modern computing, text, sound and images are all stored and transmitted as sequences of binary digits. Understanding how this conversion works helps you choose appropriate file formats, estimate storage needs and explain differences in quality.

在现代计算中,文本、声音和图像都以二进制数字序列的形式存储和传输。理解这种转换方式有助于选择合适的文件格式、估算存储需求并解释质量差异。

1. Binary data: the common language | 二进制数据:通用语言

All data inside a computer – whether it is text, sound or an image – must be converted into binary digits (0 and 1) before it can be processed. This is because digital circuits have only two stable states: on and off.

计算机中的所有数据——无论是文本、声音还是图像——都必须先转换成二进制数字(0 和 1)才能被处理。这是因为数字电路只有两种稳定状态:开和关。


2. Representing text: character sets | 文本表示:字符集

Text is represented by assigning a unique binary code to each character. The complete set of these assignments is called a character set. When you press a key, the computer looks up the binary code in the character set and stores that code.

文本通过为每个字符分配唯一的二进制代码来表示。这些分配的完整集合称为字符集。当你按下一个键时,计算机在字符集中查找对应的二进制代码并存储该代码。


3. ASCII: the 7-bit standard | ASCII:7 位标准

ASCII (American Standard Code for Information Interchange) is one of the oldest character sets. It uses 7 bits, so it can represent 2⁷ = 128 different characters. These include upper-case and lower-case letters, the digits 0-9, common punctuation marks and some control codes such as newline.

ASCII(美国信息交换标准代码)是最早的字符集之一。它使用 7 位,因此可以表示 2⁷ = 128 个不同字符。其中包括大写字母和小写字母、数字 0-9、常见标点符号以及一些控制码,例如换行符。

  • Example: the letter ‘A’ has the ASCII binary code 1000001.

    示例:字母 ‘A’ 的 ASCII 二进制代码是 1000001。

  • Example: the digit ‘5’ has the ASCII binary code 0110101.

    示例:数字 ‘5’ 的 ASCII 二进制代码是 0110101。


4. Extended ASCII and limitations | 扩展 ASCII 及其局限性

Extended ASCII uses 8 bits, allowing 2⁸ = 256 characters. This gives enough room for some accented letters, line-drawing characters and symbols. However, different countries created their own extended sets, so the same code could mean different characters on different systems. Also, 256 characters are still far too few for languages such as Chinese, Japanese and Arabic.

扩展 ASCII 使用 8 位,可以表示 2⁸ = 256 个字符。这样就足够容纳一些带重音符号的字母、制表符和符号。然而,不同国家创建了自己的扩展字符集,因此同一个代码在不同系统上可能表示不同的字符。此外,对于中文、日文和阿拉伯文等语言来说,256 个字符仍然远远不够。


5. Unicode: one set for all languages | Unicode:适用于所有语言的一套编码

Unicode was developed to solve the limitations of ASCII and Extended ASCII. It assigns a unique code point to every character in all major writing systems, plus symbols and emoji. Unicode can be encoded with different numbers of bits; UTF-8 is the most common encoding on the web and is backward compatible with ASCII.

Unicode 的开发是为了解决 ASCII 和扩展 ASCII 的局限性。它为所有主要书写系统中的每个字符以及符号和表情符号分配了唯一的码点。Unicode 可以使用不同数量的位进行编码;UTF-8 是网络上最常见的编码,并且与 ASCII 向后兼容。

Feature | 特征 ASCII Unicode
Bits per character | 每字符位数 7 (or 8 extended) 更多咨询请联系16621398022(同微信)

Comments

屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from aleveler.com

Subscribe now to keep reading and get access to the full archive.

Continue reading