Paper 1 · Computer Systems 试卷一 · 计算机系统

1.2 · Text, sound and images

1.2 · 文本、声音与图像

Representing text, sound and images

表示文本、声音与图像

A computer only stores bits, so text, sound and pictures all have to be turned into numbers. Two settings decide how faithful the result is, and how big the file becomes.

计算机只能存储位,因此文本、声音和图片都必须转换为数字。有两个设置决定了结果的逼真程度,以及文件的大小。

Core for all candidates 所有考生均需掌握的核心内容 Covers 1.2.1 to 1.2.3 涵盖 1.2.1 至 1.2.3 A regular Paper 1 question 试卷一的常规考题

Explainer · 1.2.1

讲解 · 1.2.1

Text: character sets

文本:字符集

To store text, every character is given a number. A character set is the agreed list of characters and the code that stands for each one. When a key is pressed, the computer looks up that character’s code and stores it in binary.

为了存储文本,每个字符都会被赋予一个数字。字符集是一份约定好的字符列表,以及代表每个字符的编码。当按下某个键时,计算机会查找该字符对应的编码,并以二进制形式将其存储。

Df

ASCII (American Standard Code for Information Interchange) is an old, small character set: the letters, digits and symbols on an English keyboard, each with a code that fits in one byte.

ASCII(美国信息交换标准代码)是一种历史悠久、规模较小的字符集:包含英文键盘上的字母、数字和符号,每个字符的编码都能容纳在一个字节内。

Unicode is a much larger character set. It uses more bits per character, which lets it cover a far greater range: the writing systems of many languages, plus symbols and emojis. The first 128 codes match ASCII.

Unicode是一种规模大得多的字符集。它每个字符使用更多的位,因此能够覆盖远为广泛的范围:许多语言的文字系统,以及各种符号和表情符号。它的前 128 个编码与 ASCII 完全相同。

!

When a question asks for the advantage of Unicode, “it uses more bits than ASCII” is only the difference, not the benefit. The benefit of those extra bits is that more characters can be represented, so more languages and symbols are supported. The trade-off is a larger file.

当题目要求说明 Unicode 的优点时,"它比 ASCII 使用更多的位"只是二者的区别,而不是优点本身。这些额外位数带来的好处是能够表示更多字符,从而支持更多语言和符号。其代价是文件会更大。

Try it yourself

动手试试

The ASCII explorer

ASCII 探索器

Type some text. Each character is shown with its ASCII code in denary and in 8-bit binary. Notice that A and a are 32 apart, and that the digit character 9 is code 57, not 9.

输入一些文本。每个字符都会显示其 ASCII 编码的十进制值和 8 位二进制值。请注意,A 和 a 相差 32,而数字字符 9 的编码是 57,而不是 9。

Explainer · 1.2.2

讲解 · 1.2.2

Sound: sampling

声音:采样

A sound wave is analogue: it varies smoothly and continuously. A computer cannot store that directly, so the wave is sampled: its height (amplitude) is measured at fixed moments, and each measurement is stored as a binary number.

声波是模拟的:它平滑而连续地变化。计算机无法直接存储这种波形,因此需要对波形进行采样:在固定的时刻测量其高度(振幅),并将每次测量值存储为一个二进制数。

Setting设置 What it means含义 More of it gives数值越大意味着
Sample rate采样率 the number of samples taken per second (measured in Hz) 每秒钟采集的样本数量(单位为 Hz) measurements closer together in time, so fast changes in the sound are captured 测量点在时间上更加密集,因此能够捕捉声音的快速变化
Sample resolution
(bit depth)
采样分辨率
(位深度)
the number of bits per sample 每个样本所使用的位数 a wider range of amplitude values, so each measurement is closer to the true height 可表示的振幅取值范围更宽,因此每次测量都更接近真实高度
!

Markers report these two swapped constantly. Rate is about time, resolution is about amplitude. And do not just say a higher setting “makes it more accurate”: say how, for example “more bits per sample means a wider range of amplitude values can be stored, so the samples land closer to the real wave”. Both settings also make the file larger.

考官报告显示,考生经常把这两者搞混。采样率关乎时间,采样分辨率关乎振幅。并且不要只说数值越高"更准确":要说明原因,例如"每个样本的位数越多,能存储的振幅取值范围就越宽,因此采样点更接近真实波形"。这两个设置同时也会使文件变大。

Try it yourself

动手试试

Sampling a wave

对波形采样

The grey curve is the real sound. The blue steps are what the computer stores. Move the sliders and watch the stored version get closer to the real wave, and the file size grow.

灰色曲线是真实的声音。蓝色阶梯是计算机实际存储的内容。拖动滑块,观察存储的版本如何更接近真实波形,以及文件大小如何增长。

Explainer · 1.2.3

讲解 · 1.2.3

Images: pixels, resolution and colour depth

图像:像素、分辨率与色深

A bitmap image is a grid of pixels. A pixel is the smallest element of the image, a single point of one colour. Each pixel’s colour is stored as a binary number.

位图图像是由像素组成的网格。像素是图像中最小的组成单元,即单一颜色的一个点。每个像素的颜色都以一个二进制数存储。

Setting设置 What it means含义 More of it gives数值越大意味着
Resolution分辨率 the number of pixels in the image (width × height) 图像中像素的数量(宽 × 高) more detail, so edges and fine features look sharper 更多细节,使边缘和细微特征看起来更清晰
Colour depth色深 the number of bits used per colour (equivalently, per pixel) 每种颜色(等同于每个像素)所使用的位数 more colours available: n bits gives 2n colours, so smooth shading has no banding 可用颜色更多:n 位可得到 2n 种颜色,因此平滑的渐变不会出现色带
!

Colour depth is bits per colour or per pixel, not “pixels per bit”, not “pixels in the image”, and not “the number of colours the image uses” (it is the number available, which may not all be used). Both settings increase the file size as well as the quality.

色深是每种颜色或每个像素所使用的位数,而不是"每位的像素数",不是"图像中的像素数",也不是"图像使用的颜色数量"(它指的是可用的颜色数量,不一定全部用到)。这两个设置都会同时提升质量和增大文件大小。

Try it yourself

动手试试

Resolution and colour depth

分辨率与色深

Drop the resolution and the image turns blocky. Drop the colour depth and the smooth sky breaks into bands. Both cuts shrink the file.

降低分辨率,图像会变得块状化。降低色深,原本平滑的天空会出现明显的色带。这两种降低都会缩小文件体积。

Check your understanding

检验你的理解

Which statement describes sample resolution?

下列哪一项描述的是采样分辨率?

Check your understanding

检验你的理解

The ASCII code for the character 'A' is 65. What is the ASCII code for the character '5'?

字符 'A' 的 ASCII 编码是 65。字符 '5' 的 ASCII 编码是多少?

Check your understanding

检验你的理解

An image has a colour depth of 4 bits. Which statement is correct?

一张图像的色深为 4 位。下列哪一项陈述是正确的?

Common mistakes

常见错误

Markers reported these patterns for 1.2.1 / 1.2.2 / 1.2.3 考官针对 1.2.1 / 1.2.2 / 1.2.3 报告了以下模式

RecurringOn sound, markers report sample rate and sample resolution swapped, and resolution wrongly described “in relation to an image”. Rate is samples per second; resolution is bits per sample.

反复出现在声音方面,考官报告考生经常把采样率和采样分辨率搞混,并且把分辨率错误地"与图像联系起来"描述。采样率是每秒钟的样本数;采样分辨率是每个样本的位数。

Also on sound: candidates repeat the question, saying a higher resolution “makes it more accurate” without saying how. The how: more bits per sample means a wider range of amplitude values can be recorded, so each sample is closer to the real wave.

同样在声音方面:考生常常重复题目本身,只说较高的分辨率"更准确"而不说明原因。原因是:每个样本的位数越多,可记录的振幅取值范围就越宽,因此每个样本更接近真实波形。

On images, colour depth is given as “pixels per bit” or “pixels in the image” or “the colours the image uses”. A pixel is defined as “all the colours” or “the squares in the image”. And on text, an asked-for advantage of Unicode is answered with a bare difference.

在图像方面,色深被答成"每位的像素数"、"图像中的像素数"或"图像使用的颜色";像素被定义为"所有的颜色"或"图像中的方格"。而在文本方面,题目要求 Unicode 的优点时,考生只回答了一个单纯的区别。

✕

Difference, not advantage: “An advantage of Unicode is that it uses more bits than ASCII.”

只是区别,不是优点:"Unicode 的一个优点是它比 ASCII 使用更多的位。"

✓

The benefit spelled out: “Unicode uses more bits per character, so it can represent many more characters, covering languages and symbols that ASCII cannot.”

明确说明好处:"Unicode 每个字符使用更多的位,因此能够表示更多的字符,涵盖 ASCII 无法覆盖的语言和符号。"

✕

Colour depth misdefined: “the number of colours in the image” or “the number of pixels”.

色深定义错误:"图像中的颜色数量"或"像素数量"。

✓

Precise: “the number of bits used to represent the colour of each pixel; n bits allows 2n colours”.

精确表述:"用于表示每个像素颜色的位数;n 位可表示 2n 种颜色。"

Revision questions

复习题

Past-paper style. Write an answer, then reveal the marking points and mark yourself.

采用历年真题风格。写下答案,然后展开评分要点给自己打分。

Question 1 · 2 marks 第 1 题 · 2 分

[2]State what is meant by the term resolution of an image, and what is meant by colour depth.

[2]陈述图像中分辨率一词的含义,以及色深一词的含义。

Question 2 · 1 mark 第 2 题 · 1 分

[1]Give one difference between the ASCII and Unicode character sets.

[1]给出 ASCII 和 Unicode 字符集之间的一个区别。

Question 3 · 4 marks 第 3 题 · 4 分

[4]Explain how increasing the sample resolution improves the accuracy of a recorded sound.

[4]解释提高采样分辨率如何改善所录制声音的准确度。

Question 4 · 3 marks 第 4 题 · 3 分

[3]A photograph is edited so that its resolution and colour depth are both reduced. Describe the effect on the image and on the file size.

[3]一张照片经过编辑,其分辨率和色深都被降低。描述这对图像和文件大小的影响。

Question 5 · 2 marks 第 5 题 · 2 分

[2]Give one advantage and one disadvantage of a computer using Unicode instead of ASCII.

[2]给出计算机使用 Unicode 而非 ASCII 的一个优点和一个缺点。

Flashcards

记忆卡片

Active recall for this subtopic’s key terms.

针对本子主题关键术语的主动回忆练习。

Prototype render · content grounded in the Cambridge IGCSE 0478 syllabus and real 0478 examiner-report data for 1.2 · not yet wired to live routes