Representing text, sound and images · 表示文本、声音和图像
| English | 中文 | Pinyin · 拼音 |
|---|---|---|
| character set/ˈkærɪktə set/ | 字符集 | zì fú jí |
| ASCII/ˈæski/ | ASCII码 | ASCII mǎ |
| Unicode/ˈjuːnɪkəʊd/ | 统一码 | tǒng yī mǎ |
| sampling/ˈsæmplɪŋ/ | 采样 | cǎi yàng |
| sample rate/ˈsæmpl reɪt/ | 采样率 | cǎi yàng lǜ |
| sample resolution/ˈsæmpl ˌrezəˈluːʃn/ | 采样分辨率 | cǎi yàng fēn biàn lǜ |
| resolution/ˌrezəˈluːʃn/ | 分辨率 | fēn biàn lǜ |
| pixels/ˈpɪkslz/ | 像素 | xiàng sù |
| colour depth/ˈkʌlə depθ/ | 颜色深度 | yán sè shēn dù |
Text, sound and images in binary
- Numbers aren't the only data — text, sound and images all become binary too.
- Each has its own method.
- The trade-off everywhere: better quality means a bigger file.
二进制中的文本、声音和图像
- 数字不是唯一的数据——文本、声音和图像也都变成二进制。
- 每个都有它自己的方法。
- 到处都有的权衡:更好的质量意味着一个更大的文件。
Representing text
- Each character is given a number, stored in binary. The set of characters + their numbers is a character set 字符集.
- ASCII ASCII码 uses 7 bits → 128 characters (enough for English letters, digits, symbols).
- Unicode 统一码 uses more bits → far more characters (many languages, symbols, emoji) — but the same text takes more storage.
A left shift of 2 places: every bit moves 2 columns left, the left-most bits are lost and zeros enter on the right.
表示文本
- 每个字符被给予一个数字,以二进制存储。字符的集合 + 它们的数字是一个字符集(character set)。
- ASCII 使用 7 位 → 128 个字符(足够英文字母、数字、符号)。
- Unicode 使用更多的位 → 多得多的字符(许多语言、符号、表情符号)——但同样的文本占用更多的存储。

一个 2 位的左移:每个位向左移动 2 列,最左边的位丢失而零从右边进入。
Representing sound · 表示声音
y = a sin(bt + c)
Sound is a wave · 波; sampling records its height many times a second. · 声音是一个波;采样每秒多次记录它的高度。
How many different characters can 7-bit ASCII represent? · 7 位 ASCII 能表示多少个不同的字符?
7 bits give 2^7 = 128 characters. · 7 位给出 2^7 = 128 个字符。
Compared with ASCII, Unicode: · 与 ASCII 相比,Unicode:
Unicode covers many languages and emoji, needing more bits — so the same text is larger than in ASCII. · Unicode 涵盖许多语言和表情符号,需要更多的位——所以同样的文本比在 ASCII 中更大。
Match each idea to what it means. · 把每个概念匹配到它的含义。
More bits means more characters, more samples per second, or more colours. · 更多的位意味着更多的字符、每秒更多的采样,或更多的颜色。
Representing sound
- A sound wave is smooth; to store it the computer measures its height at regular moments — sampling 采样.
- Sample rate 采样率 = samples per second (Hz); sample resolution 采样分辨率 = bits per sample.
- Higher rate and resolution 分辨率 → a more accurate recording, but a larger file.
表示声音
- 一个声波是平滑的;为了存储它,计算机在规律的时刻测量它的高度——采样(sampling)。
- 采样率(sample rate)= 每秒的采样数(Hz);采样分辨率(sample resolution)= 每个采样的位数。
- 更高的采样率和分辨率 → 一个更准确的录音,但一个更大的文件。

The sample rate of a sound recording is: · 一个录音的采样率是:
Sample rate = samples per second (Hz); sample resolution = bits per sample. · 采样率 = 每秒采样数(Hz);采样分辨率 = 每个采样的位数。
Representing images
- A bitmap image is a grid of dots — pixels 像素.
- Resolution = the number of pixels (e.g. $1920 \times 1080$).
- Colour depth 颜色深度 = the number of bits per pixel.
- Higher resolution and colour depth → better quality, but a larger file.
Sampling measures the wave's height (amplitude) at regular moments; more samples per second follow the wave more closely.
表示图像
- 一个位图图像是一个点的网格——像素(pixels)。
- 分辨率(resolution)= 像素的数量(例如 $1920 \times 1080$)。
- 色彩深度(colour depth)= 每个像素的位数。
- 更高的分辨率和色彩深度 → 更好的质量,但一个更大的文件。

采样在规律的时刻测量波的高度(振幅);每秒更多的采样更紧密地跟随波。
The colour depth of an image is: · 一个图像的色彩深度是:
Colour depth is bits per pixel — more bits means more possible colours. · 色彩深度是每个像素的位数——更多的位意味着更多可能的颜色。
Increasing an image's resolution and colour depth will: · 增加一个图像的分辨率和色彩深度将:
More pixels and more bits per pixel mean better quality but a larger file. · 更多的像素和每个像素更多的位意味着更好的质量但一个更大的文件。
You've got it
- text: a character set maps characters to numbers; ASCII = 7 bits (128), Unicode = more (emoji), bigger files
- sound: sampling records the wave; sample rate (Hz) + sample resolution (bits)
- images: pixels; resolution (pixel count) + colour depth (bits/pixel)
- in all three: higher quality → bigger file
你掌握了
- 文本:一个字符集把字符映射到数字;ASCII = 7 位(128),Unicode = 更多(表情符号),更大的文件
- 声音:采样记录波;采样率(Hz)+ 采样分辨率(位)
- 图像:像素;分辨率(像素数)+ 色彩深度(位/像素)
- 在所有三者中:更高的质量 → 更大的文件