一台计算机只能用两个状态工作:开和关。你把这些写成 1 和 0。一个只用两个数字(digits)的系统叫二进制(binary,基数 2)。

每种数据(data)——数字、文本、声音和图像——在计算机能使用它之前都必须被变成二进制。计算机用逻辑门(logic gates)处理这个二进制,并把它存储在寄存器(registers,处理器(processor)内部的小的、快速的存储)中。

剑桥 IGCSE 计算机科学(0478)包含十个主题,分布在两份试卷中:数据表示、数据传输、硬件、 软件、互联网及其应用、自动化与新兴技术、算法设计与问题求解、编程、数据库、布尔逻辑。
卷一考理论,按精确术语评分——RAM 与 ROM 的区别、编译器与解释器的区别、validation 与 verification 的区别。这些是定义分,用自己的话改述通常拿不到。卷二考问题求解与编程,分数 给的是可行的方法:追踪表、伪代码,以及真正能运行的代码。
进制与二进制运算值得优先掌握——它们既独立成题,又出现在数据传输、逻辑与硬件之中。本站笔记 按考纲主题逐页编写,算法同时给出伪代码与 Python;本站 /code 课程可在浏览器中直接运行, 你可以真正执行一个想法,而不是希望它能跑通。
一台计算机只能用两个状态工作:开和关。你把这些写成 1 和 0。一个只用两个数字(digits)的系统叫二进制(binary,基数 2)。

每种数据(data)——数字、文本、声音和图像——在计算机能使用它之前都必须被变成二进制。计算机用逻辑门(logic gates)处理这个二进制,并把它存储在寄存器(registers,处理器(processor)内部的小的、快速的存储)中。

| 英文 | 中文 | 拼音 |
|---|---|---|
| digit | 数字 | shù zì |
| binary | 二进制 | èr jìn zhì |
| data | 数据 | shù jù |
| logic gate | 逻辑门 | luó jí mén |
| processor | 处理器 | chǔ lǐ qì |
| register | 寄存器 | jì cún qì |
| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 Understand how and why computers use binary to represent all forms of data | • Any form of data needs to be converted to binary to be processed by a computer • Data is processed using logic gates and stored in registers |
| 2 (a) Understand the denary, binary and hexadecimal number systems (b) Convert between (i) positive denary and positive binary (ii) positive denary and positive hexadecimal (iii) positive hexadecimal and positive binary | • Denary is a base 10 system • Binary is a base 2 system • Hexadecimal is a base 16 system • Values used will be integers only • Conversions in both directions, e.g. denary to binary or binary to denary • Maximum binary number length of 16-bit |
| 3 Understand how and why hexadecimal is used as a beneficial method of data representation | • Areas within computer science that hexadecimal is used should be identified • Hexadecimal is easier for humans to understand than binary, as it is a shorter representation of binary |
| 4 (a) Add two positive 8-bit binary integers (b) Understand the concept of overflow and why it occurs in binary addition | • An overflow error will occur if the value is greater than 255 in an 8-bit register • A computer or a device has a predefined limit that it can represent or store, for example 16-bit • An overflow error occurs when a value outside this limit should be returned |
| 5 Perform a logical binary shift on a positive 8-bit binary integer and understand the effect this has on the positive binary integer | • Perform logical left shifts • Perform logical right shifts • Perform multiple shifts • Bits shifted from the end of the register are lost and zeros are shifted in at the opposite end of the register • The positive binary integer is multiplied or divided according to the shift performed • The most significant bit(s) or least significant bit(s) are lost |
| 6 Use the two’s complement number system to represent positive and negative 8-bit binary integers | • Convert a positive binary or denary integer to a two’s complement 8-bit integer and vice versa • Convert a negative binary or denary integer to a two’s complement 8-bit integer and vice versa |
来源:剑桥国际大纲
一个数制(number system)是用一组固定的数字书写数字的方式。你需要其中三个。
| 系统 | 基数 | 使用的数字 |
|---|---|---|
| 十进制 | 10 | 0–9 |
| 二进制 | 2 | 0 和 1 |
| 十六进制 | 16 | 0–9 然后 A–F |
基数(base)告诉你一个系统用多少个不同的数字。
一个数中的每一列有一个位值(place value)。在二进制中位值从右到左翻倍。对一个 8 位数它们是:
128 64 32 16 8 4 2 1

一个位(bit)是一个单一的 0 或 1。八个位构成一个字节(byte)。四个位(半个字节)是一个半字节(nibble)。
十进制 → 二进制。 写出位值。在你需要的每个值下面放一个 1,使它们加起来为你的数;在其余的下面放 0。
例子:把十进制 150 变成二进制。$150 = 128 + 16 + 4 + 2$。
128 64 32 16 8 4 2 1
1 0 0 1 0 1 1 0
所以 $150$ = 10010110。
二进制 → 十进制。 加上有 1 的位值。10010110 $= 128 + 16 + 4 + 2 = 150$。
十六进制 → 二进制。 把每个十六进制数字变成它自己的 4 位组(一个半字节)。
例子:十六进制 F08。$F = 1111$,$0 = 0000$,$8 = 1000$,所以 F08 = 1111 0000 1000。

二进制 → 十六进制。 把位分成 4 个的半字节,从右边开始。把每个半字节变成一个十六进制数字。
十进制 → 十六进制。 简单的方式是先变成二进制,然后二进制变成十六进制。
这个表格帮助记十六进制字母:
| 十进制 | 二进制 | 十六进制 |
|---|---|---|
| 10 | 1010 | A |
| 11 | 1011 | B |
| 12 | 1100 | C |
| 13 | 1101 | D |
| 14 | 1110 | E |
| 15 | 1111 | F |
Cambridge 的题目用长达 16 位的二进制数。
例题。 把十进制 100 转换成 8 位二进制,然后转换成十六进制。
$100 = 64 + 32 + 4$,所以二进制是 01100100。分成半字节,0110 0100 $= 6$ 和 $4$,所以十六进制是 64。
十六进制比二进制更短,对人们更容易读和写。一个十六进制数字替换 4 个二进制数字,所以你犯更少的错误。值不改变——十六进制只是显示同样的二进制的一个更短的方式。
计算机科学家把十六进制用于:
#FF0000 是红色)Type a number and see it in binary, denary and hex — and how the place values build it.
| 英文 | 中文 | 拼音 |
|---|---|---|
| number system | 数制 | shù zhì |
| denary | 十进制 | shí jìn zhì |
| hexadecimal | 十六进制 | shí liù jìn zhì |
| base | 基数 | jī shù |
| place value | 位值 | wèi zhí |
| bit | 位 | wèi |
| byte | 字节 | zì jié |
| nibble | 半字节 | bàn zì jié |
| memory address | 内存地址 | nèi cún dì zhǐ |
你可以把两个 8 位二进制数相加,从右边逐列,就像十进制。一列的规则是:
| A | B | 结果位 | 进位 |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
当一个进位也进来时,$1 + 1 + 1 = 1$ 带一个 1 的进位。
例子:把 01110110(118)和 00110000(48)相加。
0 1 1 1 0 1 1 0 (118)
+ 0 0 1 1 0 0 0 0 (48)
-------------------
1 0 1 0 0 1 1 0 (166)

一个 8 位寄存器只能容纳 0 到 255 的十进制值。若一个加法给出一个 255 以上的结果,答案需要一个第 9 位。寄存器不能容纳这个额外的位,所以它丢失了。这叫溢出(overflow,一个溢出错误)。它在一个值超出寄存器能存储的极限时发生。
例子:11001000(200)$+$ 01001000(72)$= 272$。用二进制那是 1 00010000,它需要 9 位。前导的 1 在 8 位中放不下,所以存储的答案错误。

| 英文 | 中文 | 拼音 |
|---|---|---|
| overflow | 溢出 | yì chū |
一个逻辑二进制移位(logical binary shift)把所有的位左移或右移若干位。
一个左移每移一位把数乘以 2。一个右移每移一位把它除以 2;最右边的位(最低有效位(least significant bit(s)))丢失。
例子:把 00110101(53)左移 2 位。
start: 0 0 1 1 0 1 0 1
left shift 2: 1 1 0 1 0 1 0 0

结果是 11010100(212),它是 $53 \times 4$。最左边的两位丢失,而两个零从右边进来。若一个 1 被推出末端,那个信息就永远消失了。
| 英文 | 中文 | 拼音 |
|---|---|---|
| logical binary shift | 逻辑二进制移位 | luó jí èr jìn zhì yí wèi |
| least significant bit | 最低有效位 | zuì dī yǒu xiào wèi |
到目前为止这些数是正的。补码(two's complement)让一个 8 位寄存器也容纳负数。
在补码中,最左边的位(最高有效位(most significant bit),或 MSB)有一个负的位值:
-128 64 32 16 8 4 2 1
要使一个正数变负: 写出正的二进制,翻转每个位(0↔1),然后加 1。
例子:制造 $-40$。
001010001101011111011000所以 $-40$ = 11011000。通过加上位值检查:$-128 + 64 + 16 + 8 = -40$。

要读一个负的补码数,只需加上位值(MSB 算作 $-128$)。一个 8 位补码数的范围是 $-128$ 到 $+127$。
| 英文 | 中文 | 拼音 |
|---|---|---|
| two's complement | 补码 | bǔ mǎ |
| most significant bit | 最高有效位 | zuì gāo yǒu xiào wèi |
| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 Understand how and why a computer represents text and the use of character sets, including American standard code for information interchange (ASCII) and Unicode | • Text is converted to binary to be processed by a computer • Unicode allows for a greater range of characters and symbols than ASCII, including different languages and emojis • Unicode requires more bits per character than ASCII |
| 2 Understand how and why a computer represents sound, including the effects of the sample rate and sample resolution | • A sound wave is sampled for sound to be converted to binary, which is processed by a computer • The sample rate is the number of samples taken in a second • The sample resolution is the number of bits per sample • The accuracy of the recording and the file size increases as the sample rate and resolution increase |
| 3 Understand how and why a computer represents an image, including the effects of the resolution and colour depth | • An image is a series of pixels that are converted to binary, which is processed by a computer • The resolution is the number of pixels in the image • The colour depth is the number of bits used to represent each colour • The file size and quality of the image increase as the resolution and colour depth increase |
来源:剑桥国际大纲
计算机通过给每个字符一个数字、然后把那个数字存储为二进制来存储文本。一台计算机能使用的字符集,连同它们的数字,是一个字符集(character set)。
因为 Unicode 有更多的字符,它每个字符需要比 ASCII 更多的位,所以同样的文本占用更多的存储(storage)。

| 英文 | 中文 | 拼音 |
|---|---|---|
| character set | 字符集 | zì fú jí |
| emoji | 表情符号 | biǎo qíng fú hào |
| storage | 存储 | cún chǔ |
一个声波(sound wave)平滑而一直在变。要存储它,计算机在规律的时刻测量波的高度。这叫采样(sampling),而每次测量是一个样本。

一个更高的采样率和一个更高的采样分辨率给一个更准确的录音,但一个更大的文件。
y = a sin(bt + c)
Sound is a wave; sampling records its height many times a second.
| 英文 | 中文 | 拼音 |
|---|---|---|
| sound wave | 声波 | shēng bō |
| sampling | 采样 | cǎi yàng |
| sample rate | 采样率 | cǎi yàng lǜ |
| sample resolution | 采样分辨率 | cǎi yàng fēn biàn lǜ |
| amplitude | 振幅 | zhèn fú |
| resolution | 分辨率 | fēn biàn lǜ |
一个计算机图像由叫像素(pixels)的小点的一个网格构成。

一个更高的分辨率和一个更高的颜色深度给一个更好质量的图像,但一个更大的文件。
| 英文 | 中文 | 拼音 |
|---|---|---|
| pixel | 像素 | xiàng sù |
| colour depth | 颜色深度 | yán sè shēn dù |
| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 Understand how data storage is measured | • Including: – bit – nibble – byte – kibibyte (KiB) – mebibyte (MiB) – gibibyte (GiB) – tebibyte (TiB) – pebibyte (PiB) – exbibyte (EiB) • The amount of the previous denomination present in the data storage size, e.g.: – 8 bits in a byte – 1024 mebibytes in a gibibyte |
| 2 Calculate the file size of an image file and a sound file, using information given | • Answers must be given in the units specified in the question. Calculations must use the measurement of 1024 and not 1000 • Information given may include: – image resolution and colour depth – sound sample rate, resolution and length of track |
| 3 Understand the purpose of and need for data compression | • Compression exists to reduce the size of the file • What the impact of this is, e.g.: – less bandwidth required – less storage space required – shorter transmission time |
| 4 Understand how files are compressed using lossy and lossless compression methods | • Lossy compression reduces the file size by permanently removing data, e.g. reducing resolution or colour depth, reducing sample rate or resolution • Lossless compression reduces the file size without permanent loss of data, e.g. run length encoding (RLE) |
来源:剑桥国际大纲
数据存储用下面的单位测量。一个半字节是 4 位,一个字节是 8 位;从千字节(KiB)往上,每个单位是它之前的那个的 1024 倍(因为 $1024 = 2^{10}$,它适合二进制)。
| 单位 | 等于 |
|---|---|
| bit | 一个单一的 0 或 1 |
| nibble | 4 位 |
| byte | 8 位 |
| kibibyte (KiB) | 1024 字节 |
| mebibyte (MiB) | 1024 KiB |
| gibibyte (GiB) | 1024 MiB |
| tebibyte (TiB) | 1024 GiB |
| pebibyte (PiB) | 1024 TiB |
| exbibyte (EiB) | 1024 PiB |

图像文件大小(以位计)$=$ 分辨率 $\times$ 颜色深度 $=$ 宽 $\times$ 高 $\times$ 颜色深度。
例子:一个图像是 $1024 \times 1024$ 像素,颜色深度为 2 字节($= 16$ 位)。
声音文件大小(以位计)$=$ 采样率 $\times$ 采样分辨率 $\times$ 以秒计的长度。
总是除以 1024(不是 1000)以变成 KiB、MiB 等等。以题目要求的单位给出你的答案。
例题。 一个声音以 8,000 Hz 的采样率、16 位的采样分辨率被录制 30 秒。求以千字节(KiB)计的文件大小。
压缩(compression)使一个文件更小。一个更小的文件:
有两种类型。
无损(lossless)压缩使文件更小而没有永久损失数据。原始文件能被精确地重建。
一种方法是行程编码(run-length encoding,RLE)。它用值的一个副本和它重复多少次的一个计数替换一个重复值的行程。例如 WWWWWWWW(8 个白)被存储为"8 W"。这在数据有许多重复时工作得好。

有损(lossy)压缩通过永久移除一些数据使文件小得多。移除的数据不能取回。例如:
当你必须保留每个细节时(文本和程序文件)用无损。对照片、音乐和视频用有损,那里一个小的质量损失换来一个小得多的文件是值得的。
Watch repeated symbols get squashed into a count — simple lossless compression.
| 英文 | 中文 | 拼音 |
|---|---|---|
| compression | 压缩 | yā suō |
| bandwidth | 带宽 | dài kuān |
| transmission | 传输 | chuán shū |
| lossless | 无损 | wú sǔn |
| run-length encoding | 行程编码 | xíng chéng biān mǎ |
| lossy | 有损 | yǒu sǔn |
数据传输(data transmission)意味着把数据从一个地方移到另一个——例如从你的计算机到一个网站,或从一部手机到一台打印机。
数据常常沿一根电缆行进。下面显示两种常见的。


在它被发送之前,数据被分解成叫数据包(packets)的小的、相等大小的片。每个数据包分别行进,而它们在另一端被重新组合。
用数据包有好处:
| 英文 | 中文 | 拼音 |
|---|---|---|
| data transmission | 数据传输 | shù jù chuán shū |
| packets | 数据包 | shù jù bāo |
| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 (a) Understand that data is broken down into packets to be transmitted | |
| (b) Describe the structure of a packet | • A packet of data contains a: – packet header – payload – trailer • The packet header includes the: – destination address – packet number – originator’s address |
| (c) Describe the process of packet switching | • Data is broken down into packets • Each packet could take a different route • A router controls the route a packet takes • Packets may arrive out of order • Once the last packet has arrived, packets are reordered |
| 2 (a) Describe how data is transmitted from one device to another using different methods of data transmission | • Including: – serial – parallel – simplex – half-duplex – full-duplex |
| (b) Explain the suitability of each method of data transmission, for a given scenario | • Including the advantages and disadvantages of each method |
| 3 Understand the universal serial bus (USB) interface and explain how it is used to transmit data | • Including the benefits and drawbacks of the interface |
来源:剑桥国际大纲
每个数据包有三部分。

| 部分 | 它容纳什么 |
|---|---|
| 包头(packet header) | 控制信息(见下面) |
| 有效载荷(payload) | 被携带的实际数据 |
| 尾部(trailer) | 显示数据包在哪里结束,加上一个错误检查 |
包头容纳:
| 英文 | 中文 | 拼音 |
|---|---|---|
| packet header | 包头 | bāo tóu |
| payload | 有效载荷 | yǒu xiào zài hè |
| trailer | 尾部 | wěi bù |
| address | 地址 | dì zhǐ |
数据包交换(packet switching)是数据包在一个网络上被发送的方式。

Step through packet switching. Splitting a file into addressed packets is why one lost packet only needs resending, and why many users can share the same line.
| 英文 | 中文 | 拼音 |
|---|---|---|
| packet switching | 数据包交换 | shù jù bāo jiāo huàn |
| routers | 路由器 | lù yóu qì |
| 串行(serial) | 并行(parallel) | |
|---|---|---|
| 如何 | 一次一位,沿一根导线 | 一次几位,沿几根导线 |
| 距离 | 长距离上好 | 只在短距离上好 |
| 成本 | 更便宜(更少的导线) | 更昂贵(更多的导线) |
| 错误 | 位保持顺序 | 位在长导线上能稍微不同的时间到达 |
串行沿一根单一的导线一个接一个地发送位。并行沿几根导线同时发送几位,所以它在短距离上更快。

这些描述数据能行进的方向。

| 方法 | 方向 |
|---|---|
| 单工(simplex) | 只一个方向(例如计算机 → 打印机) |
| 半双工(half-duplex) | 两个方向,但一次只一个(例如对讲机) |
| 全双工(full-duplex) | 同时两个方向(例如电话通话) |
选择取决于距离、需要的速度、成本,以及数据是否必须同时两个方向行进。
| 英文 | 中文 | 拼音 |
|---|---|---|
| serial | 串行 | chuàn xíng |
| parallel | 并行 | bìng xíng |
| simplex | 单工 | dān gōng |
| half-duplex | 半双工 | bàn shuāng gōng |
| full-duplex | 全双工 | quán shuāng gōng |
通用串行总线(universal serial bus,USB)是一个把设备连接到一台计算机的常见接口(interface,一个连接点)。
好处:
缺点:

| 英文 | 中文 | 拼音 |
|---|---|---|
| universal serial bus | 通用串行总线 | tōng yòng chuàn xíng zǒng xiàn |
| interface | 接口 | jiē kǒu |
| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 Understand the need to check for errors after data transmission and how these errors can occur | • Errors can occur during data transmission due to interference, e.g. data loss, data gain and data change |
| 2 Describe the processes involved in each of the following error detection methods for detecting errors in data after transmission: parity check (odd and even), checksum and echo check | • Including parity byte and parity block check |
| 3 Describe how a check digit is used to detect errors in data entry and identify examples of when a check digit is used, including international standard book numbers (ISBN) and bar codes | |
| 4 Describe how an automatic repeat query (ARQ) can be used to establish that data is received without error | • Including the use of: – positive/negative acknowledgements – timeout |
来源:剑桥国际大纲
当数据行进时,干扰(interference)能改变它。三件事能出错:
所以接收方检查数据是否正确地到达。
| 英文 | 中文 | 拼音 |
|---|---|---|
| interference | 干扰 | gān rǎo |
一个奇偶校验(parity check)给每个字节加一个额外的位,奇偶校验位(parity bit)。有两种类型:

例子(偶校验):数据 1011001 有四个 1,它已经是偶,所以奇偶校验位是 0:
parity bit + data
0 1011001
要找到一个错误:接收方数 1。若约定了偶校验但一个字节到达时带奇数目的 1,一个错误在传输期间发生了。
一个奇偶校验不能找到每个错误。若两位翻转,计数可能仍看起来正确。
例题。 一个单一的奇偶校验位告诉你一个错误发生了,但不告诉在哪里。一个奇偶校验块(parity block)能找到确切的位。几个字节一起被发送,每个带一个行奇偶校验位,而底部一个额外的奇偶校验字节(parity byte)为每一列容纳一个奇偶校验位。下面用了偶校验,而一位在传输期间被翻转。找到它。
b1 b2 b3 b4 b5 | parity
byte 1 1 0 1 1 0 | 1
byte 2 0 1 1 0 1 | 1
byte 3 1 1 1 1 0 | 1 <- row: odd number of 1s
byte 4 0 0 1 1 0 | 0
------------------------------
parity 0 0 1 1 1 | 1
^ column b3: odd number of 1s
行 byte 3 打破偶校验,而列 b3 打破偶校验。翻转的位是它们交叉的地方:byte 3, bit b3。把它从 1 改回 0 修复数据。一个单一的奇偶校验位只说一个错误发生了;一个奇偶校验块确切地说在哪里,所以接收方甚至能修复它。
一个校验和(checksum)是发送前从所有数据算出的一个值。接收方从它收到的数据再次算出校验和。若两个值不匹配,一个错误发生了,而数据被重新发送。
在一个回送校验(echo check)中,接收方把数据发送回发送方。发送方把它与原始比较。若它们不同,一个错误发生了。(这需要数据被发送两次,所以它慢。)
自动重传请求(Automatic Repeat reQuest,ARQ)用叫确认(acknowledgements)的消息。
一个校验码(check digit)是放在一个数末端的一个额外数字,从其他数字算出。它被用来在一个数被键入时找到错误。
当数被输入时,校验码被再次计算并比较。它能捕捉:
校验码被用于条形码(barcodes)和 ISBN(书号)。
Classify concrete examples by the computing idea they demonstrate.
| 英文 | 中文 | 拼音 |
|---|---|---|
| parity check | 奇偶校验 | jī ǒu jiào yàn |
| parity bit | 奇偶校验位 | jī ǒu jiào yàn wèi |
| parity block | 奇偶校验块 | jī ǒu jiào yàn kuài |
| parity byte | 奇偶校验字节 | jī ǒu jiào yàn zì jié |
| checksum | 校验和 | jiào yàn hé |
| echo check | 回送校验 | huí sòng jiào yàn |
| automatic repeat request | 自动重传请求 | zì dòng zhòng chuán qǐng qiú |
| acknowledgements | 确认 | què rèn |
| timeout | 超时 | chāo shí |
| check digit | 校验码 | jiào yàn mǎ |
| transposition error | 换位错误 | huàn wèi cuò wù |
| barcodes | 条形码 | tiáo xíng mǎ |
| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 Understand the need for and purpose of encryption when transmitting data | |
| 2 Understand how data is encrypted using symmetric and asymmetric encryption | • Asymmetric encryption includes the use of public and private keys |
来源:剑桥国际大纲
加密(encryption)打乱数据,使它在被错误的人拦截(intercepted,捕获)时不能被理解。可读的数据叫明文(plaintext);加密后它变成密文(ciphertext)。
加密不阻止数据被拦截。它只阻止数据被理解。
对称加密(symmetric encryption)用一个单一的密钥(key)来加密和解密数据两者。发送方和接收方必须共享这个同样的秘密密钥。风险是密钥本身可能在被共享时被偷。
非对称加密(asymmetric encryption)用两个不同的密钥:
用公钥加密的数据只能用匹配的私钥解密,所以密钥从不必被共享。这比共享一个秘密密钥更安全。

Shift each letter to encrypt a message — the simplest idea of a cipher and its key.
| 英文 | 中文 | 拼音 |
|---|---|---|
| encryption | 加密 | jiā mì |
| intercepted | 拦截 | lán jié |
| plaintext | 明文 | míng wén |
| ciphertext | 密文 | mì wén |
| symmetric encryption | 对称加密 | duì chèn jiā mì |
| key | 密钥 | mì yào |
| asymmetric encryption | 非对称加密 | fēi duì chèn jiā mì |
| public key | 公钥 | gōng yào |
| private key | 私钥 | sī yào |
| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 (a) Understand the role of the central processing unit (CPU) in a computer | • The CPU processes instructions and data that are input into the computer so that the result can be output |
| (b) Understand what is meant by a microprocessor | • A microprocessor is a type of integrated circuit on a single chip |
| 2 (a) Understand the purpose of the components in a CPU, in a computer that has a Von Neumann architecture | • Including: – units: arithmetic logic unit (ALU) and control unit (CU) – registers: program counter (PC), memory address register (MAR), memory data register (MDR), current instruction register (CIR) and accumulator (ACC) – buses: address bus, data bus and control bus |
| (b) Describe the process of the fetch–decode–execute (FDE) cycle, including the role of each component in the process | • How instructions and data are fetched from random access memory (RAM) into the CPU, how they are processed using each component and how they are then executed • Storing data and addresses into specific registers • Using buses to transmit data, addresses and signals • Using units to fetch, decode and execute data and instructions |
| 3 Understand what is meant by a core, cache and clock in a CPU and explain how they can affect the performance of a CPU | • The number of cores, size of the cache and speed of the clock can affect the performance of a CPU |
| 4 Understand the purpose and use of an instruction set for a CPU | • An instruction set is a list of all the commands that can be processed by a CPU, and the commands are machine code |
| 5 Describe the purpose and characteristics of an embedded system and identify devices in which they are commonly used | • An embedded system is used to perform a dedicated functions. For example in, domestic appliances, cars, security systems, lighting systems or vending machines. This is different to a general purpose computer that is used to perform many different functions. For example in, a personal computer (PC) or a laptop |
来源:剑桥国际大纲
中央处理器(central processing unit,CPU)是计算机处理数据并执行指令(instructions)的部分。它通过重复一个周期、每秒数百万次来运行程序。

| 部分 | 它做什么 |
|---|---|
| 算术逻辑单元(arithmetic logic unit,ALU) | 做计算(加、减)和逻辑操作(比较) |
| 控制单元(control unit,CU) | 发送控制信号以管理所有部分并告诉它们做什么 |
| 寄存器(registers) | 非常小、非常快的存储,一次容纳一份数据 |
各部分由总线(buses,携带信息的成组导线)连接:

这些寄存器在取指-执行周期期间被使用。
| 寄存器 | 目的 |
|---|---|
| 程序计数器(program counter,PC) | 容纳下一条指令的地址 |
| 内存地址寄存器(memory address register,MAR) | 容纳要读取或写入的地址 |
| 内存数据寄存器(memory data register,MDR) | 容纳刚取的数据或指令 |
| 当前指令寄存器(current instruction register,CIR) | 容纳现在正被执行的指令 |
| 累加器(accumulator,ACC) | 容纳 ALU 计算的结果 |
取指执行周期(fetch–execute cycle)有三个阶段,一遍又一遍地重复:

高速缓存(cache)是 CPU 内部或靠近它的少量非常快的内存。它存储 CPU 常用的数据和指令。CPU 从高速缓存读取比从主存快得多,所以计算机运行得更快。
| 特性 | 效果 |
|---|---|
| 核心(cores)的数目 | 每个核心能自己运行指令,所以更多的核心能同时做更多的工作 |
| 高速缓存大小 | 一个更大的高速缓存为 CPU 容纳更多准备好的数据,所以它等得更少 |
| 时钟速度(clock speed) | 每秒的周期数;一个更高的时钟速度每秒运行更多的指令 |
例题。 两台电脑除以下不同外完全相同:A 是 3.0 GHz 单核 CPU,带 2 MB 缓存;B 是 2.4 GHz 四核 CPU,带 8 MB 缓存。哪一台更适合视频剪辑?为什么?视频剪辑可以拆成许多能同时进行的任务,所以 B 的四个核心可以并行处理多路数据,而 A 一次只能处理一路。B 更大的缓存也把更多常用数据留在离 CPU 很近的地方,所以它需要从 RAM 取数的次数更少。尽管 A 的主频更高,B 仍是更好的选择。不要只凭主频作答:要把核心数、缓存和主频放在一起权衡,并把每一项都联系到具体要做的工作。
一个嵌入式系统(embedded system)是建在一个更大的设备内部做一件固定工作的一台小计算机。它专门用于那个任务,通常小而低成本,而且没有通用操作系统。例子:一台洗衣机、一个微波炉、一个机顶盒。
Tap round the loop the CPU repeats billions of times a second — fetch the instruction, decode what it means, execute it, then do it all again.
| 英文 | 中文 | 拼音 |
|---|---|---|
| central processing unit | 中央处理器 | zhōng yāng chǔ lǐ qì |
| instructions | 指令 | zhǐ lìng |
| arithmetic logic unit | 算术逻辑单元 | suàn shù luó jí dān yuán |
| control unit | 控制单元 | kòng zhì dān yuán |
| registers | 寄存器 | jì cún qì |
| buses | 总线 | zǒng xiàn |
| address bus | 地址总线 | dì zhǐ zǒng xiàn |
| data bus | 数据总线 | shù jù zǒng xiàn |
| control bus | 控制总线 | kòng zhì zǒng xiàn |
| program counter | 程序计数器 | chéng xù jì shù qì |
| memory address register | 内存地址寄存器 | nèi cún dì zhǐ jì cún qì |
| memory data register | 内存数据寄存器 | nèi cún shù jù jì cún qì |
| current instruction register | 当前指令寄存器 | dāng qián zhǐ lìng jì cún qì |
| accumulator | 累加器 | lěi jiā qì |
| fetch–execute cycle | 取指执行周期 | qǔ zhǐ zhí xíng zhōu qī |
| Cache | 高速缓存 | gāo sù huǎn cún |
| cores | 核心 | hé xīn |
| clock speed | 时钟速度 | shí zhōng sù dù |
| embedded system | 嵌入式系统 | qiàn rù shì xì tǒng |
| memory | 内存 | nèi cún |
| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 Understand what is meant by an input device and why it is required | • Including: – barcode scanner – digital camera – keyboard – microphone – optical mouse – QR code scanner – touch screen (resistive, capacitive and infra-red) – two-dimensional (2D) and three-dimensional (3D) scanners |
| 2 Understand what is meant by an output device and why it is required | • Including: – actuator – digital light processing (DLP) projector – inkjet printer – laser printer – light emitting diode (LED) screen – liquid crystal display (LCD) projector – liquid crystal display (LCD) screen – speaker – 3D printer |
| 3 (a) Understand what is meant by a sensor and the purposes of sensors | • Limited to: – acoustic – accelerometer – flow – gas – humidity – infra-red – level – light – magnetic field – moisture – pH – pressure – proximity – temperature |
| (b) Identify the type of data captured by each sensor and understand when each sensor would be used, including selecting the most suitable sensor for a given context |
来源:剑桥国际大纲
一个输入设备把数据发送进计算机。
| 设备 | 它如何工作 |
|---|---|
| 条形码扫描器(barcode scanner) | 向条照光并读取反射回来的图案 |
| 二维码扫描器(QR code scanner) | 一个摄像头读取黑白块的一个方形图案 |
| 键盘 | 按一个键发送那个字符的一个代码 |
| 光电鼠标(optical mouse) | 一个光和一个传感器跟踪跨一个表面的移动 |
| 麦克风 | 把声波变成一个电信号 |
| 数码相机 | 一个镜头把光聚焦到一个记录像素的传感器上 |
| 传感器(sensors) | 测量一个物理量(如温度或光)并把它作为数据发送 |
| 触摸屏(touch screen) | 检测你的手指触碰屏幕的地方 |







一个触摸屏能以三种方式工作:

Classify computing examples by what job they do in a system.
| 英文 | 中文 | 拼音 |
|---|---|---|
| barcode scanner | 条形码扫描器 | tiáo xíng mǎ sǎo miáo qì |
| QR code scanner | 二维码扫描器 | èr wéi mǎ sǎo miáo qì |
| sensors | 传感器 | chuán gǎn qì |
| touch screen | 触摸屏 | chù mō píng |
| resistive | 电阻式 | diàn zǔ shì |
| capacitive | 电容式 | diàn róng shì |
| infrared | 红外线 | hóng wài xiàn |
| optical mouse | 光电鼠标 | guāng diàn shǔ biāo |
一个输出设备把数据从计算机发送出到用户。
| 设备 | 它如何工作 |
|---|---|
| 执行器(actuator) | 把一个电信号变成运动(例如一个马达或阀门) |
| LCD/LED 屏幕 | 用一个微小彩色点的网格显示图像 |
| 投影仪(projector) | 把一个放大的图像照到一面墙或屏幕上 |
| 喷墨打印机(inkjet printer) | 向纸喷微小的墨滴 |
| 激光打印机(laser printer) | 用一个激光和被热固定到纸上的粉末(碳粉) |
| 3D 打印机 | 一层一层地构建一个固体物体 |
| 扬声器(speaker) | 把一个电信号变成声音 |







| 英文 | 中文 | 拼音 |
|---|---|---|
| actuator | 执行器 | zhí xíng qì |
| projector | 投影仪 | tóu yǐng yí |
| inkjet printer | 喷墨打印机 | pēn mò dǎ yìn jī |
| laser printer | 激光打印机 | jī guāng dǎ yìn jī |
| speaker | 扬声器 | yáng shēng qì |
| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 Understand what is meant by primary storage | • Primary storage is directly accessed by the CPU • Including the role of: – random access memory (RAM) – read only memory (ROM) • Including why a computer needs both RAM and ROM, and the difference between them |
| 2 Understand what is meant by secondary storage | • Secondary storage is not directly accessed by the CPU and is necessary for more permanent storage of data |
| 3 Describe the operation of magnetic, optical and solid-state (flash memory) storage and give examples of each | • Magnetic storage uses platters which are divided into tracks and sectors. Data is read and written using electromagnets. Including hard disk drive (HDD) • Optical storage uses lasers to create and read pits and lands. Including: CD, DVD and Blu-ray • Solid-state (flash memory) uses NAND or NOR technology. Transistors are used as control gates and floating gates. Including: solid-state drive (SSD), SD card and USB drive |
| 4 Describe what is meant by virtual memory, how it is created and used and why it is necessary | • Pages of data are transferred between RAM and virtual memory when needed |
| 5 Understand what is meant by cloud storage | • Cloud storage can be accessed remotely in comparison to storing data locally |
| 6 Explain the advantages and disadvantages of storing data on the cloud in comparison to storing it locally | • Physical servers and storage are needed to store data in cloud storage |
来源:剑桥国际大纲
主存储器(primary storage)是 CPU 能直接使用的内存。有两种。

| RAM | ROM | |
|---|---|---|
| 全名 | 随机存取存储器(random access memory) | 只读存储器(read only memory) |
| 读/写 | 读和写 | 只读 |
| 没有电时保留数据? | 否——它是易失性(volatile)的 | 是——它是非易失性(non-volatile)的 |
| 容纳 | 现在使用中的程序和数据 | 启动指令(如何引导计算机) |
两者都需要:ROM 告诉计算机如何启动,然后 RAM 容纳你运行的程序。

| 英文 | 中文 | 拼音 |
|---|---|---|
| Primary storage | 主存储器 | zhǔ cún chǔ qì |
| random access memory | 随机存取存储器 | suí jī cún qǔ cún chǔ qì |
| read only memory | 只读存储器 | zhī dú cún chǔ qì |
| volatile | 易失性 | yì shī xìng |
| non-volatile | 非易失性 | fēi yì shī xìng |
辅助存储器(secondary storage)永久地保留数据,即使电关了。它是非易失性的,被用于长期存储。有三种类型。
| 类型 | 它如何存储数据 | 例子 |
|---|---|---|
| 磁存储(magnetic storage) | 数据作为旋转磁盘上被磁化的斑点存储 | 硬盘驱动器(HDD)、磁带 |
| 光存储(optical storage) | 数据作为被一个激光读取的标记存储 | CD、DVD、蓝光 |
| 固态存储(solid state storage) | 数据存储在闪存(flash memory)中,没有移动部件 | SSD、USB 闪存盘、存储卡 |






Classify computing examples by what job they do in a system.
| 英文 | 中文 | 拼音 |
|---|---|---|
| Secondary storage | 辅助存储器 | fǔ zhù cún chǔ qì |
| magnetic storage | 磁存储 | cí cún chǔ |
| optical storage | 光存储 | guāng cún chǔ |
| solid state storage | 固态存储 | gù tài cún chǔ |
| flash memory | 闪存 | shǎn cún |
当 RAM 变满时,计算机能把辅助存储的一部分用作额外的、假装的 RAM。这叫虚拟内存(virtual memory)。
现在不需要的数据被从 RAM 移出到磁盘上,这为其他程序在 RAM 中腾出空间。这让你运行比单独的 RAM 能容纳的更多的程序。它更慢,因为辅助存储比 RAM 慢得多。

| 英文 | 中文 | 拼音 |
|---|---|---|
| virtual memory | 虚拟内存 | xū nǐ nèi cún |
| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 Understand what is meant by primary storage | • Primary storage is directly accessed by the CPU • Including the role of: – random access memory (RAM) – read only memory (ROM) • Including why a computer needs both RAM and ROM, and the difference between them |
| 2 Understand what is meant by secondary storage | • Secondary storage is not directly accessed by the CPU and is necessary for more permanent storage of data |
| 3 Describe the operation of magnetic, optical and solid-state (flash memory) storage and give examples of each | • Magnetic storage uses platters which are divided into tracks and sectors. Data is read and written using electromagnets. Including hard disk drive (HDD) • Optical storage uses lasers to create and read pits and lands. Including: CD, DVD and Blu-ray • Solid-state (flash memory) uses NAND or NOR technology. Transistors are used as control gates and floating gates. Including: solid-state drive (SSD), SD card and USB drive |
| 4 Describe what is meant by virtual memory, how it is created and used and why it is necessary | • Pages of data are transferred between RAM and virtual memory when needed |
| 5 Understand what is meant by cloud storage | • Cloud storage can be accessed remotely in comparison to storing data locally |
| 6 Explain the advantages and disadvantages of storing data on the cloud in comparison to storing it locally | • Physical servers and storage are needed to store data in cloud storage |
来源:剑桥国际大纲
云存储(cloud storage)把你的数据保存在通过互联网访问的远程物理服务器上,而不是在你自己的设备上。

| 英文 | 中文 | 拼音 |
|---|---|---|
| Cloud storage | 云存储 | yún cún chǔ |
| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 Understand that a computer needs a network interface card (NIC) to access a network | |
| 2 Understand what is meant by, and the purpose of, a media access control (MAC) address, including its structure | • A network interface card is given a MAC address at the point of manufacture • MAC addresses are usually written as hexadecimal • MAC addresses are created using the manufacturer code and the serial code |
| 3 (a) Understand what is meant by, and the purpose of, an internet protocol (IP) address (b) Understand that there are different types of IP address | • An IP address is allocated by the network and it can be static or dynamic • Including the characteristics of, and differences between, IPv4 and IPv6 |
| 4 Describe the role of a router in a network | • A router sends data to a specific destination on a network • A router can assign IP addresses • A router can connect a local network to the internet |
来源:剑桥国际大纲
一个网络接口卡(network interface card,NIC)是让一个设备加入一个网络并发送和接收数据的硬件。每个 NIC 有一个内建的 MAC 地址。
所以一个 MAC 地址随设备,而一个 IP 地址取决于设备正在使用的网络。
IP 地址有两个版本。IPv4 是 32 位的,写成四个 0–255 的十进制数(例如 192.168.0.1);较新的 IPv6 是 128 位的,写成用冒号分隔的八组十六进制数,提供多得多的地址。一个地址还要么是静态(static)的(固定、手动设置、从不改变),要么是动态(dynamic)的(每次设备连接时由路由器/网络分发,所以能改变)。
一个路由器(router)把不同的网络连接在一起——例如,你的家庭网络连到互联网。它读每个数据包中的 IP 地址并把它转发向正确的网络。

Follow data from a device through network hardware and protocols.
| 英文 | 中文 | 拼音 |
|---|---|---|
| network interface card | 网络接口卡 | wǎng luò jiē kǒu kǎ |
| static | 静态 | jìng tài |
| dynamic | 动态 | dòng tài |
| router | 路由器 | lù yóu qì |
| fetch-execute cycle | 取指执行周期 | qǔ zhǐ zhí xíng zhōu qī |
| media access control | 介质访问控制 | jiè zhì fǎng wèn kòng zhì |
| internet protocol | 网际协议 | wǎng jì xié yì |
一个计算机系统由一起工作的两部分构成。

硬件自己不能做任何有用的事。软件需要硬件来运行。两者都需要。


| 英文 | 中文 | 拼音 |
|---|---|---|
| Hardware | 硬件 | yìng jiàn |
| physical | 物理的 | wù lǐ de |
| Software | 软件 | ruǎn jiàn |
| programs | 程序 | chéng xù |
| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 Describe the difference between system software and application software and provide examples of each | • System software provides the services that the computer requires, including operating system and utility software • Application software provides the services that the user requires |
| 2 Describe the role and basic functions of an operating system | • Including: – managing files – handling interrupts – providing an interface – managing peripherals and drivers – managing memory – managing multitasking – providing a platform for running applications – providing system security – managing user accounts |
| 3 Understand how hardware, firmware and an operating system are required to run applications software | • Applications are run on the operating system • The operating system is run on the firmware • The bootloader (firmware) is run on the hardware |
| 4 Describe the role and operation of interrupts | • Including: – how an interrupt is generated – how it is handled using an interrupt service routine – what happens as a result of the interrupts • Software interrupts include division by zero and two processes trying to access the same memory location • Hardware interrupts include pressing a key on the keyboard and moving the mouse |
来源:剑桥国际大纲
软件分成两种类型。

系统软件(system software)控制计算机本身并给其他程序一个运行的基础。例子:
操作系统之下是固件(firmware)——永久存储在 ROM 或闪存上、计算机一开机就运行的软件。BIOS 和引导程序(bootloader)就是固件:它们测试硬件然后加载操作系统。所以各层堆叠成硬件 → 固件 → 操作系统 → 应用软件,每一层都在它下面的层上运行。
应用软件(application software)让用户做一个有用的任务。例子:
| 系统软件 | 应用软件 | |
|---|---|---|
| 工作 | 运行和管理计算机 | 帮助用户做一个任务 |
| 被谁使用 | 计算机(在后台) | 用户(直接) |
| 例子 | 操作系统、驱动、实用程序 | 文字处理器、浏览器、游戏 |
| 英文 | 中文 | 拼音 |
|---|---|---|
| System software | 系统软件 | xì tǒng ruǎn jiàn |
| operating system | 操作系统 | cāo zuò xì tǒng |
| linker | 链接器 | liàn jiē qì |
| device driver | 设备驱动程序 | shè bèi qū dòng chéng xù |
| utility software | 实用程序 | shí yòng chéng xù |
| firmware | 固件 | gù jiàn |
| bootloader | 引导程序 | yǐn dǎo chéng xù |
| Application software | 应用软件 | yìng yòng ruǎn jiàn |
| word processing | 文字处理 | wén zì chǔ lǐ |
| spreadsheet | 电子表格 | diàn zi biǎo gé |
| database management system | 数据库管理系统 | shù jù kù guǎn lǐ xì tǒng |
| web browser | 网页浏览器 | wǎng yè liú lǎn qì |
| providing a user interface | 用户界面 | yòng hù jiè miàn |
| managing peripherals | 外围设备 | wài wéi shè bèi |
| managing multitasking | 多任务处理 | duō rèn wù chǔ lǐ |
| providing a platform | 平台 | píng tái |
一个操作系统(OS)是主要的系统软件。它控制整个计算机并让硬件、应用软件和用户一起工作。没有一个 OS,计算机很难使用。

OS 有许多作用:
| 英文 | 中文 | 拼音 |
|---|---|---|
| user interface | 用户界面 | yòng hù jiè miàn |
| peripherals | 外围设备 | wài wéi shè bèi |
| multitasking | 多任务处理 | duō rèn wù chǔ lǐ |
| platform | 平台 | píng tái |
一个中断(interrupt)是发送给处理器(processor)的一个信号,告诉它某样东西现在需要注意。
一个中断能来自三个来源:
当一个中断到达时,处理器停止它正在做的事、保存它的位置,并服务(处理)中断。当那完成时,它回到它之前正在做的事。这让计算机对重要的事件快速反应。

Step through an interrupt. The CPU pauses what it's doing, deals with the urgent event, then carries on exactly where it left off — which is how one processor juggles the keyboard, printer and timer at once.
| 英文 | 中文 | 拼音 |
|---|---|---|
| interrupt | 中断 | zhōng duàn |
| processor | 处理器 | chǔ lǐ qì |
| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 Explain what is meant by a high-level language and a low-level language, including the advantages and disadvantages of each | • Advantages and disadvantages include: – ease of reading and writing code, e.g. low-level is hard to read – ease of debugging code – machine independence – direct manipulation of hardware |
| 2 Understand that assembly language is a form of low-level language that uses mnemonics, and that an assembler is needed to translate an assembly language program into machine code | |
| 3 Describe the operation of a compiler and an interpreter, including how high-level language is translated by each and how errors are reported | • A compiler translates the whole code at once before executing it, producing an executable file • An interpreter translates and executes the code line-by-line • A compiler provides an error report for the whole code if errors are detected • An interpreter stops execution when an error is found |
| 4 Explain the advantages and disadvantages of a compiler and an interpreter | • Including an understanding that an interpreter is mostly used when developing a program and a compiler is used to translate the final program |
| 5 Explain the role of an IDE in writing program code and the common functions IDEs provide | • Including: – code editors – run-time environment – translators – error diagnostics – auto-completion – auto-correction – prettyprint |
来源:剑桥国际大纲
所有计算机用中央处理器(central processing unit,CPU)处理数据。要使 CPU 做工作,人们用一门编程语言(programming language)写程序。有两种。
一门高级语言(high-level language)用看起来有点像英语的词书写(例如 Python)。它是:
一门低级语言(low-level language)接近硬件实际使用的。它包括:
一门低级语言与特定的(specific)类型的 CPU 相关,所以为一个 CPU 写的程序可能不在另一个上运行。它在程序员需要对硬件的完全控制或非常快、小的代码时使用。

Classify concrete examples by the computing idea they demonstrate.
| 英文 | 中文 | 拼音 |
|---|---|---|
| central processing unit | 中央处理器 | zhōng yāng chǔ lǐ qì |
| programming language | 编程语言 | biān chéng yǔ yán |
| high-level language | 高级语言 | gāo jí yǔ yán |
| low-level language | 低级语言 | dī jí yǔ yán |
| machine code | 机器码 | jī qì mǎ |
| assembly language | 汇编语言 | huì biān yǔ yán |
| specific | 特定的 | tè dìng de |
CPU 只能运行机器码。一个高级程序必须先被变成机器码。做这个的软件是一个翻译程序(translator)。有三种类型:编译器和解释器(用于高级代码),以及汇编器(用于低级代码)。
一个编译器在程序被运行之前把整个程序翻译成机器码。翻译之后,机器码能被运行许多次而不再翻译。
一个解释器(interpreter)一次一行地翻译并运行程序。
| 编译器 | 解释器 | |
|---|---|---|
| 翻译 | 整个程序一次 | 一次一行 |
| 错误 | 全部在结束时报告 | 在第一个错误停止 |
| 完成程序的速度 | 更快 | 更慢 |
| 以后运行需要? | 否 | 是 |
当你想分享一个快速的、完成的程序时用一个编译器。当你在写和测试一个程序、想容易地找到错误时用一个解释器。
一个汇编器(assembler)把一个低级汇编语言程序(用像 LDA、ADD 这样的助记符写成)翻译成机器码。每个助记符变成一条机器指令——一个直接的一对一翻译,不像处理高级代码的编译器或解释器。

例题。 一个团队正在编写程序。开发期间他们希望快速找到并修复错误;发布时他们希望客户运行得快,并且看不到源代码。每个阶段各适合哪种翻译器?开发时用解释器:它一次翻译并运行一行,遇到第一个错误就停下,所以错误很容易定位。发布时用编译器:它把整个程序一次性翻译成机器码,之后无需翻译器就能快速运行,而且客户拿到的只是可执行文件,不是源代码。两者不是对手 - 要说出阶段并给出理由,因为只写"编译器更快"是得不到分的。
| 英文 | 中文 | 拼音 |
|---|---|---|
| compiler | 编译器 | biān yì qì |
| translator | 翻译程序 | fān yì chéng xù |
| interpreter | 解释器 | jiě shì qì |
| assembler | 汇编器 | huì biān qì |
一个集成开发环境(integrated development environment,IDE)是帮助你写程序的软件。它把许多有用的工具放在一个地方:

| 英文 | 中文 | 拼音 |
|---|---|---|
| integrated development environment | 集成开发环境 | jí chéng kāi fā huán jìng |
| code editor | 代码编辑器 | dài mǎ biān jí qì |
| run time environment | 运行时环境 | yùn xíng shí huán jìng |
| error diagnostics | 错误诊断 | cuò wù zhěn duàn |
| auto-completion | 自动补全 | zì dòng bǔ quán |
| auto-correction | 自动纠错 | zì dòng jiū cuò |
| prettyprinting | 美化打印 | měi huà dǎ yìn |
| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 Understand the difference between the internet and the world wide web | • The internet is the infrastructure • The world wide web is the collection of websites and web pages accessed using the internet |
| 2 Understand what is meant by a uniform resource locator (URL) | • A URL is a text-based address for a web page; it can contain the protocol, the domain name and the web page/file name |
| 3 Describe the purpose and operation of hypertext transfer protocol (HTTP) and hypertext transfer protocol secure (HTTPS) | |
| 4 Explain the purpose and functions of a web browser | • The main purpose of a web browser is to render hypertext markup language (HTML) and display web pages • Functions include: – storing bookmarks and favourites – recording user history – allowing use of multiple tabs – storing cookies – providing navigation tools – providing an address bar |
| 5 Describe how web pages are located, retrieved and displayed on a device when a user enters a URL | • Including the role of: – the web browser – IP addresses – the domain name server (DNS) – the web server – HTML |
| 6 Explain what is meant by cookies and how they are used, including session cookies and persistent cookies | • Cookies are used for functions, including: – saving personal details – tracking user preferences – holding items in an online shopping cart – storing login details |
来源:剑桥国际大纲
人们常常混淆这两个术语,但它们不相同。
所以互联网是网络;网是你在那个网络上使用的东西之一。


| 英文 | 中文 | 拼音 |
|---|---|---|
| internet | 互联网 | hù lián wǎng |
| infrastructure | 基础设施 | jī chǔ shè shī |
| world wide web | 万维网 | wàn wéi wǎng |
| websites | 网站 | wǎng zhàn |
一个统一资源定位符(uniform resource locator,URL)是一个网页的一个基于文本的地址。你把它键入一个网页浏览器(web browser)以访问一个页面,例如 https://www.example.com/index.html。

| 英文 | 中文 | 拼音 |
|---|---|---|
| uniform resource locator | 统一资源定位符 | tǒng yī zī yuán dìng wèi fú |
| web browser | 网页浏览器 | wǎng yè liú lǎn qì |
一个网页浏览器是你用来查看网页的程序。它的作用包括:
| 英文 | 中文 | 拼音 |
|---|---|---|
| rendering | 渲染 | xuàn rǎn |
| hypertext markup language | 超文本标记语言 | chāo wén běn biāo jì yǔ yán |
| IP address | 网际协议地址 | wǎng jì xié yì dì zhǐ |
当你键入一个 URL 并按回车时,几个步骤发生:

若 DNS 没有这个地址,它询问另一个 DNS 服务器,直到地址被找到。

例题。 分解网址 https://www.example.com/books/index.html。https 是协议,即传输该网页所用的一套规则(其中的 s 表示传输是加密的)。www.example.com 是域名,它标识这台网页服务器,并由 DNS 服务器把它转换成 IP 地址。/books/index.html 是该服务器上所存资源的文件路径和文件名。要把每一部分连同它的作用一起说出来:只答"第一段"和"最后一段"是在描述网址,而不是在解释它。
Step through it. The web address is just a name — DNS turns it into an IP address before the browser can ask the right server for the page.
| 英文 | 中文 | 拼音 |
|---|---|---|
| domain name service | 域名服务 | yù míng fú wù |
| web server | 网页服务器 | wǎng yè fú wù qì |
一个 cookie 是一个网站存储在你设备上的一个小文本文件。它让网站记住关于你的东西。有两种类型。

| 类型 | 你关闭浏览器时保留? | 用于 |
|---|---|---|
| 会话(session)cookie | 否——你关闭浏览器时被删除 | 短期数据,例如一个购物篮中的物品 |
| 持久(persistent)cookie | 是——保存在设备上 | 在访问之间记住你 |
Cookie 被用来:
| 英文 | 中文 | 拼音 |
|---|---|---|
| session | 会话 | huì huà |
| persistent | 持久 | chí jiǔ |
| user preferences | 用户偏好 | yòng hù piān hǎo |
| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 Understand the concept of a digital currency and how digital currencies are used | • A digital currency is one that only exists electronically |
| 2 Understand the process of blockchain and how it is used to track digital currency transactions | • Blockchain, in its basic form, is a digital ledger, that is a time-stamped series of records that cannot be altered |
来源:剑桥国际大纲
一个数字货币(digital currency)是只以电子形式(electronic form)存在的钱。没有硬币或纸币。它用计算机在人们之间存储和移动,并能被用来在线为东西付款。
数字钱的一个问题是信任:你如何阻止某人把同样的钱花两次,或改变记录?区块链解决这个。
| 英文 | 中文 | 拼音 |
|---|---|---|
| digital currency | 数字货币 | shù zì huò bì |
| electronic form | 电子形式 | diàn zi xíng shì |
一个区块链(blockchain)是一个数字账本(digital ledger)——每个交易(transaction)的一个共享记录。这个记录被复制到许多计算机上,所以没有单个人控制它,而且它很难改变。
交易被保存在连接成一条链的块中。每个块容纳:
每个块也存储它之前的块的哈希。若某人改变一个旧块,它的哈希改变,所以它不再匹配下一个块。这打破链,而改变立即被发现。这就是区块链如何安全地跟踪交易。

A hash is one-way and a tiny change to the input flips much of the output — a blockchain chains these hashes so any tamper is obvious.
| 英文 | 中文 | 拼音 |
|---|---|---|
| blockchain | 区块链 | qū kuài liàn |
| digital ledger | 数字账本 | shù zì zhàng běn |
| transaction | 交易 | jiāo yì |
| timestamp | 时间戳 | shí jiān chuō |
| hash value | 哈希值 | hā xī zhí |
| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 Describe the processes involved in, and the aim of carrying out, a range of cyber security threats | • Including: – brute-force attack – data interception – distributed denial of service (DDoS) attack – hacking – malware (virus, worm, Trojan horse, spyware, adware, ransomware) – pharming – phishing – social engineering |
| 2 Explain how a range of solutions are used to help keep data safe from security threats | • Including: – access levels – anti-malware, including anti-virus and anti-spyware – authentication (username and password, biometrics, two-step verification) – automating software updates – checking the spelling and tone of communications – checking the URL attached to a link – firewalls – privacy settings – proxy-servers – secure socket layer (SSL) security protocol |
来源:剑桥国际大纲
网络安全(cyber security)意味着保持计算机、网络和数据免于攻击。你必须知道这些威胁。
| 威胁 | 它是什么 |
|---|---|
| 暴力破解(brute force attack) | 非常快地尝试许多密码直到正确的被找到 |
| 数据拦截(data interception) | 在数据跨一个网络行进时"偷听"以窃取数据 |
| 分布式拒绝服务(distributed denial of service,DDoS)攻击 | 用如此多的请求淹没一个服务器,使它不能响应,所以网站宕机 |
| 黑客攻击(hacking) | 未经许可获得对一个计算机系统的访问 |
| 恶意软件(malware) | 有害的软件(见下面的表格) |
| 域名欺骗(pharming) | 秘密代码即使在你键入正确的地址时也把你送到一个假网站 |
| 网络钓鱼(phishing) | 欺骗你交出私密详细信息的假邮件或消息 |
| 社会工程(social engineering) | 欺骗一个人(而不是一台计算机)去破坏安全,例如假装是老板 |
恶意软件是任何制造来伤害一台计算机的软件。主要的类型是:
| 恶意软件 | 它做什么 |
|---|---|
| 病毒(virus) | 附着到一个文件并在文件被打开时复制自己;能删除或损坏数据 |
| 蠕虫(worm) | 自己跨一个网络复制自己,而不需要一个文件被打开 |
| 特洛伊木马(Trojan horse) | 假装是有用的软件,但一旦安装就伤害计算机 |
| 间谍软件(spyware) | 秘密地记录你做什么,如你按的键 |
| 广告软件(adware) | 用不需要的广告淹没你 |
| 勒索软件(ransomware) | 锁住你的文件并要求付款来解锁它们 |
这些攻击能窃取个人数据、删除或改变文件、阻止一个服务工作、花钱,并使用户失去对一个公司的信任。例如,一个 DDoS 攻击能使一个在线商店不可用,所以它失去销售。

| 英文 | 中文 | 拼音 |
|---|---|---|
| cyber security | 网络安全 | wǎng luò ān quán |
| brute force attack | 暴力破解 | bào lì pò jiě |
| data interception | 数据拦截 | shù jù lán jié |
| distributed denial of service | 分布式拒绝服务 | fēn bù shì jù jué fú wù |
| hacking | 黑客攻击 | hēi kè gōng jī |
| malware | 恶意软件 | è yì ruǎn jiàn |
| pharming | 域名欺骗 | yù míng qī piàn |
| phishing | 网络钓鱼 | wǎng luò diào yú |
| social engineering | 社会工程 | shè huì gōng chéng |
| virus | 病毒 | bìng dú |
| worm | 蠕虫 | rú chóng |
| Trojan horse | 特洛伊木马 | tè luò yī mù mǎ |
| spyware | 间谍软件 | jiàn dié ruǎn jiàn |
| adware | 广告软件 | guǎng gào ruǎn jiàn |
| ransomware | 勒索软件 | lè suǒ ruǎn jiàn |
你可以用这些方法保护数据。

Change the shift — that is the key. Each letter slides that many places to make ciphertext, and the same key slides it back. That is symmetric encryption.
| 英文 | 中文 | 拼音 |
|---|---|---|
| access levels | 访问权限 | fǎng wèn quán xiàn |
| anti-malware | 反恶意软件 | fǎn è yì ruǎn jiàn |
| anti-virus | 杀毒软件 | shā dú ruǎn jiàn |
| anti-spyware | 反间谍软件 | fǎn jiàn dié ruǎn jiàn |
| authentication | 身份验证 | shēn fèn yàn zhèng |
| biometrics | 生物识别 | shēng wù shí bié |
| password | 密码 | mì mǎ |
| two-step verification | 两步验证 | liǎng bù yàn zhèng |
| firewall | 防火墙 | fáng huǒ qiáng |
| privacy settings | 隐私设置 | yǐn sī shè zhì |
| proxy server | 代理服务器 | dài lǐ fú wù qì |
| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 Describe how sensors, microprocessors and actuators can be used in collaboration to create automated systems | |
| 2 Describe the advantages and disadvantages of an automated system used for a given scenario | • Including scenarios from: – industry – transport – agriculture – weather – gaming – lighting – science |
来源:剑桥国际大纲
一个自动化系统(automated system)是软件和硬件的一个混合,它感知并响应它环境(environment)中的数据,不需要人工干预(human intervention)。换句话说,它自己工作。
自动化系统的例子:
三个部分在一个自动化系统中一起工作。
| 部分 | 工作 |
|---|---|
| 传感器(sensor) | 测量一个物理量(如温度或光)并发送数据 |
| 微处理器(microprocessor) | 把数据与存储值比较并做决定 |
| 执行器(actuator) | 接收一个信号并引起运动或动作(如打开一个阀门) |
循环像这样工作:
例如,在一个温室里:一个温度传感器读取热;微处理器把它与想要的值比较;若太热,微处理器给一个执行器发信号以打开一扇窗。

考纲点名许多传感器类型(sensor types),每个读一个物理量——例如一个加速度计(accelerometer)(运动或倾斜)、一个湿度(humidity)传感器(空气中的水),和一个接近(proximity)传感器(附近的物体):
| Sensor | Measures | Typical use |
|---|---|---|
| temperature | heat | ovens, greenhouses, heating |
| light | brightness | automatic lights, cameras |
| pressure | force on a surface | alarm floor mats, touchscreens |
| infra-red / proximity | a nearby object | automatic doors, parking sensors |
| acoustic (sound) | sound level | noise monitors |
| humidity / moisture | water in air or soil | greenhouses, irrigation |
| gas | a gas being present | smoke and CO alarms |
| pH | acidity | pools, fish tanks |
| accelerometer | movement or tilt | phones, airbag triggers |
| magnetic field | magnetism | door contacts, compasses |
| flow / level | fluid flow or depth | pipes, tanks |
给一个场景挑传感器,选读正确物理量的那个:一个鱼缸需要 pH 和温度传感器;一扇自动门需要一个红外/接近传感器。
自动化系统被用于许多情况,如工业、运输、农业(agriculture,种田)、天气(收集数据)、游戏和照明。


| 优点 | 缺点 |
|---|---|
| 全天全夜工作,不休息 | 购买和建立花费很多 |
| 比人更快、更一致(consistent) | 能出故障并需要专家修理 |
| 能在对人不安全的地方工作 | 可能替换人们的工作 |
| 更少的人为错误 | 不能容易地对一个它们不是为之建造的情况作出反应 |
例题。 描述一个自动温室如何把温度保持在 25 °C。温度传感器持续测量温度,读数经模数转换器转成数字后送给微处理器。微处理器把读数与存储的 25 °C 这个值进行比较。如果温度高于它,微处理器就给执行器发信号,打开窗户或启动风扇;如果低于它,就打开加热器。然后整个回路不断重复。有两分几乎总是落在"与存储的(预设的)值比较"和"该过程重复进行"这两句话上 - 只写到"传感器告诉计算机"就停下的描述会丢掉它们。
Tap round the loop. An automated system senses, compares against a target, then acts — and because the action changes what it senses, it keeps correcting itself with no human needed.
| 英文 | 中文 | 拼音 |
|---|---|---|
| automated system | 自动化系统 | zì dòng huà xì tǒng |
| environment | 环境 | huán jìng |
| human intervention | 人工干预 | rén gōng gān yù |
| greenhouse | 温室 | wēn shì |
| car park barrier | 停车场道闸 | tíng chē chǎng dào zhá |
| sensor | 传感器 | chuán gǎn qì |
| microprocessor | 微处理器 | wēi chǔ lǐ qì |
| actuator | 执行器 | zhí xíng qì |
| stored values | 存储值 | cún chǔ zhí |
| sensor types | 传感器类型 | chuán gǎn qì lèi xíng |
| accelerometer | 加速度计 | jiā sù dù jì |
| humidity | 湿度 | shī dù |
| proximity | 接近 | jiē jìn |
| consistent | 一致的 | yí zhì de |
| central heating | 中央供暖 | zhōng yāng gōng nuǎn |
| chemical process | 化学过程 | huà xué guò chéng |
| agriculture | 农业 | nóng yè |
| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 Understand what is meant by robotics | • Robotics is a branch of computer science that incorporates the design, construction and operation of robots • Examples include factory equipment, domestic robots and drones |
| 2 Describe the characteristics of a robot | • Including: – a mechanical structure or framework – electrical components, such as sensors, microprocessors and actuators – programmable |
| 3 Understand the roles that robots can perform and describe the advantages and disadvantages of their use | • Robots can be used in areas including: – industry – transport – agriculture – medicine – domestic settings – entertainment |
来源:剑桥国际大纲
机器人技术(robotics)是处理机器人(robots)的设计、建造和操作的技术分支。
一个机器人有这些特征:
机器人能执行许多作用,例如:


| 优点 | 缺点 |
|---|---|
| 做无聊或危险的工作 | 购买和维护昂贵 |
| 快速而准确地工作 | 能替换人类工人 |
| 不疲倦或无聊 | 一个机器人有缺乏独立决策(lack of independent decision-making)——它只做它被编程去做的 |
一个机器人的一个关键限制是它不能自己思考。当某样意外的事发生时它不能做它自己的选择。
Classify concrete examples by the computing idea they demonstrate.
| 英文 | 中文 | 拼音 |
|---|---|---|
| Robotics | 机器人技术 | jī qì rén jì shù |
| robots | 机器人 | jī qì rén |
| physical structure | 物理结构 | wù lǐ jié gòu |
| electrical components | 电子元件 | diàn zi yuán jiàn |
| programmable instructions | 可编程指令 | kě biān chéng zhǐ lìng |
| factory equipment | 工厂设备 | gōng chǎng shè bèi |
| domestic appliances | 家用电器 | jiā yòng diàn qì |
| vacuum cleaner | 吸尘器 | xī chén qì |
| lack of independent decision-making | 缺乏独立决策 | quē fá dú lì jué cè |
| mechanical | 机械的 | jī xiè de |
| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 Understand what is meant by artificial intelligence (AI) | • AI is a branch of computer science dealing with the simulation of intelligent behaviours by computers |
| 2 Describe the main characteristics of AI as the collection of data and the rules for using that data, the ability to reason, and it can include the ability to learn and adapt | |
| 3 Explain the basic operation and components of AI systems to simulate intelligent behaviour | • Limited to: – expert systems – machine learning • Expert systems have a knowledge base, a rule base, an inference engine and an interface • Machine learning is when a program has the ability to automatically adapt its own processes and/or data |
来源:剑桥国际大纲
人工智能(artificial intelligence,AI)是计算机系统对人类智能的模拟(simulation)。这意味着一台计算机做通常需要人类思考的任务。
AI 系统通常有这些特征:


一个专家系统存储人类专长并从中推理。它有四个部分:
界面从用户收集事实;推理引擎把规则库对知识库运行;而系统输出一个诊断或一个概率——就像用来帮助一名医生诊断疾病或找出一个汽车故障。
机器学习(machine learning)是一个从经验改进自己表现、无需被显式重新编程的程序。它在数据里找模式并适应:一个搜索引擎在排名结果上变得更好、一个语音助手更准确地识别口语命令,而一个扫地机器人逐渐学会一个房间的布局。

| 类型 | 它意味着什么 |
|---|---|
| 弱人工智能(narrow AI) | 只能做一个任务或一小组任务(例如,一个象棋程序)。今天所有的 AI 都是弱人工智能。 |
| 通用人工智能(general AI) | 能做一个人类能做的任何任务,在许多不同的任务之间切换。 |
| 强人工智能(strong AI) | 会像一个真实的人类心智一样思考并有意识。这还不存在。 |
Classify concrete examples by the computing idea they demonstrate.
| 英文 | 中文 | 拼音 |
|---|---|---|
| Artificial intelligence | 人工智能 | rén gōng zhì néng |
| simulation | 模拟 | mó nǐ |
| rules | 规则 | guī zé |
| reason | 推理 | tuī lǐ |
| draw conclusions | 得出结论 | dé chū jié lùn |
| approximate | 近似的 | jìn sì de |
| definite | 确定的 | què dìng de |
| learn | 学习 | xué xí |
| adapt | 适应 | shì yìng |
| expert systems | 专家系统 | zhuān jiā xì tǒng |
| natural language processing | 自然语言处理 | zì rán yǔ yán chǔ lǐ |
| self-driving cars | 自动驾驶汽车 | zì dòng jià shǐ qì chē |
| knowledge base | 知识库 | zhī shí kù |
| rule base | 规则库 | guī zé kù |
| inference engine | 推理引擎 | tuī lǐ yǐn qíng |
| user interface | 用户界面 | yòng hù jiè miàn |
| Machine learning | 机器学习 | jī qì xué xí |
| narrow AI | 弱人工智能 | ruò rén gōng zhì néng |
| general AI | 通用人工智能 | tōng yòng rén gōng zhì néng |
| strong AI | 强人工智能 | qiǎng rén gōng zhì néng |
| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 Understand the program development life cycle, limited to: analysis, design, coding and testing | • Including identifying each stage and performing these tasks for each stage: – analysis: abstraction, decomposition of the problem, identification of the problem and requirements – design: decomposition, structure diagrams, flowcharts, pseudocode – coding: writing program code and iterative testing – testing: testing program code with the use of test data |
| 2 (a) Understand that every computer system is made up of sub-systems, which are made up of further sub-systems (b) Understand how a problem can be decomposed into its component parts | • Including: – inputs – processes – outputs – storage |
| (c) Use different methods to design and construct a solution to a problem | • Including: – structure diagrams – flowcharts – pseudocode |
| 3 Explain the purpose of a given algorithm | • Including: – stating the purpose of an algorithm – describing the processes involved in an algorithm |
| 4 Understand standard methods of solution | • Limited to: – linear search – bubble sort – totalling – counting – finding maximum, minimum and average values |
| 5 (a) Understand the need for validation checks to be made on input data and the different types of validation check | • Including: – range check – length check – type check – presence check – format check – check digit |
| (b) Understand the need for verification checks to be made on input data and the different types of verification check | • Including: – visual check – double entry check |
| 6 Suggest and apply suitable test data | • Limited to: – normal – abnormal – extreme – boundary • Extreme data is the largest/smallest acceptable value • Boundary data is the largest/smallest acceptable value and the corresponding smallest/largest rejected value |
| 7 Complete a trace table to document a dry-run of an algorithm | • Including, at each step in an algorithm: – variables – outputs – user prompts |
| 8 Identify errors in given algorithms and suggest ways of correcting these errors | |
| 9 Write and amend algorithms for given problems or scenarios, using: pseudocode, program code and flowcharts | • Precision is required when writing algorithms, e.g. x > y is acceptable but x is greater than y is not acceptable • See section 4 for flowchart symbols • See section 4 for pseudocode |
来源:剑桥国际大纲
程序开发生命周期(program development life cycle)是用来制作一个程序的一套阶段。有四个阶段。

| 阶段 | 你做什么 |
|---|---|
| 分析(analysis) | 研究问题并算出需要什么 |
| 设计(design) | 规划程序将如何工作 |
| 编码(coding) | 编写程序代码并随手测试它 |
| 测试(testing) | 用测试数据运行完成的程序以找到错误 |


在分析中你理解问题。两个关键技能有帮助:
在设计中你规划解决方案,常常用分解。你可以把各部分显示为一个结构图(structure diagram,一个把一个系统分成更小的框的图)中的子系统(sub-systems)。
在编码中你编写程序代码。你用迭代测试(iterative testing)——在你构建小部分时一遍又一遍地测试它们。在测试中你用测试数据(test data)运行整个程序以检查它工作。
| 英文 | 中文 | 拼音 |
|---|---|---|
| program development life cycle | 程序开发生命周期 | chéng xù kāi fā shēng mìng zhōu qī |
| analysis | 分析 | fēn xī |
| design | 设计 | shè jì |
| coding | 编码 | biān mǎ |
| testing | 测试 | cè shì |
| abstraction | 抽象 | chōu xiàng |
| decomposition | 分解 | fēn jiě |
| sub-systems | 子系统 | zi xì tǒng |
| structure diagram | 结构图 | jié gòu tú |
| iterative testing | 迭代测试 | dié dài cè shì |
| test data | 测试数据 | cè shì shù jù |
| flowchart | 流程图 | liú chéng tú |
你可以用三种主要方式规划一个解决方案。

| 英文 | 中文 | 拼音 |
|---|---|---|
| pseudocode | 伪代码 | wěi dài mǎ |
一个算法(algorithm)是解决一个问题的一套步骤,以正确的顺序。每个算法能被分成三部分:
这叫分解成输入、处理和输出。例如,对于"求三个分数的平均值":输入是三个分数;处理是把它们相加并除以 3;输出是平均值。

| 英文 | 中文 | 拼音 |
|---|---|---|
| algorithm | 算法 | suàn fǎ |
| input | 输入 | shū rù |
| processing | 处理 | chǔ lǐ |
| output | 输出 | shū chū |
当数据被输入时,你检查它以减少错误。
验证(validation)检查数据是合理的并遵循规则。它不能检查数据是真的,只能检查它是被允许的。
| 验证检查 | 它检查什么 |
|---|---|
| 范围检查(range check) | 值在一个最低和最高允许值之间 |
| 长度检查(length check) | 字符的数目被允许(例如一个密码 ≥ 8) |
| 类型检查(type check) | 数据是正确的类型(例如一个数,而不是字母) |
| 存在性检查(presence check) | 某样东西实际被输入(没有留空) |
| 格式检查(format check) | 数据在正确的模式中(例如一个日期作为 dd/mm/yyyy) |
| 校验码(check digit) | 一个额外的数字确认一个数被正确地输入 |
核实(verification)检查数据被正确地复制或输入(键入它时没有错误)。两种方法:
| 英文 | 中文 | 拼音 |
|---|---|---|
| validation | 验证 | yàn zhèng |
| range check | 范围检查 | fàn wéi jiǎn chá |
| length check | 长度检查 | cháng dù jiǎn chá |
| type check | 类型检查 | lèi xíng jiǎn chá |
| presence check | 存在性检查 | cún zài xìng jiǎn chá |
| format check | 格式检查 | gé shì jiǎn chá |
| check digit | 校验码 | jiào yàn mǎ |
| verification | 核实 | hé shí |
| visual check | 目视检查 | mù shì jiǎn chá |
| double entry | 双重输入 | shuāng chóng shū rù |
一个追踪表(trace table)一步步地记录一个算法运行时每个变量的值。它帮助你:

例子:用输入 5 追踪这个算法。
INPUT n
total ← 0
FOR i ← 1 TO n
total ← total + i
NEXT i
OUTPUT total
| i | total | OUTPUT |
|---|---|---|
| 1 | 1 | |
| 2 | 3 | |
| 3 | 6 | |
| 4 | 10 | |
| 5 | 15 | 15 |
追踪显示算法把 1 到 n 相加。用输入 5,输出是 15。
例题。 追踪这个算法并给出输出。
x ← 20
count ← 0
WHILE x > 1
x ← x DIV 2
count ← count + 1
ENDWHILE
OUTPUT count
DIV 只取除法的整数部分。每循环一次写一行:x 变成 10(count 为 1),然后 5(count 为 2),然后 2(count 为 3),然后 1(count 为 4)。此时 x > 1 为假,所以循环结束,输出是 4。有两个习惯能保住这些分:在每次循环之前而不是之后检验条件;以及每一次循环都新写一行 - 想把这些值记在脑子里,正是追踪出错的原因。
Step through the loop and fill in the trace table, one row per pass.
| 英文 | 中文 | 拼音 |
|---|---|---|
| trace table | 追踪表 | zhuī zōng biǎo |
测试数据(test data)是你用来测试一个程序的数据。有四种你必须知道的类型。
| 类型 | 意义 | 例子(年龄 0–120 允许) |
|---|---|---|
| 正常数据(normal) | 应当被接受的合理数据 | 25 |
| 异常数据(abnormal) | 应当被拒绝的错误数据 | -4 或 "cat" |
| 极端数据(extreme) | 仍被允许的最大和最小值 | 0 和 120 |
| 边界数据(boundary) | 一个限制每一侧的值(一个允许,一个不) | 120 和 121 |
| 英文 | 中文 | 拼音 |
|---|---|---|
| normal | 正常数据 | zhèng cháng shù jù |
| abnormal | 异常数据 | yì cháng shù jù |
| extreme | 极端数据 | jí duān shù jù |
| boundary | 边界数据 | biān jiè shù jù |
你必须知道这些常见的算法。
一个线性查找(linear search)逐个检查一个列表中的每个项,直到它找到它想要的值或到达末端。
found ← FALSE
FOR i ← 0 TO 9
IF list[i] = searchValue THEN
found ← TRUE
ENDIF
NEXT i
OUTPUT found

一个冒泡排序(bubble sort)把一个列表排序。它比较每对并排的项,若它们顺序错误就交换它们。它重复这个直到不再需要交换。
FOR i ← 0 TO 8
IF list[i] > list[i + 1] THEN
temp ← list[i]
list[i] ← list[i + 1]
list[i + 1] ← temp
ENDIF
NEXT i

total ← total + value)。count ← count + 1)。total ← 0
FOR i ← 0 TO 9
total ← total + list[i]
NEXT i
average ← total / 10
OUTPUT average
| 英文 | 中文 | 拼音 |
|---|---|---|
| linear search | 线性查找 | xiàn xìng chá zhǎo |
| bubble sort | 冒泡排序 | mào pào pái xù |
| totalling | 求和 | qiú hé |
| counting | 计数 | jì shù |
| maximum | 最大值 | zuì dà zhí |
| minimum | 最小值 | zuì xiǎo zhí |
| average | 平均值 | píng jūn zhí |
| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 Declare and use variables and constants | |
| 2 Understand and use basic data types | • Including: – integer – real – char – string – Boolean |
| 3 Understand and use input and output | |
| 4 (a) Understand and use the concept of sequence | |
| (b) Understand and use the concept of selection | • Including: – IF statements – CASE statements |
| (c) Understand and use the concept of iteration | • Including: – count-controlled loops – pre-condition loops – post-condition loops |
| (d) Understand and use the concepts of totalling and counting | |
| (e) Understand and use the concept of string handling | • Including: – length – substring – upper – lower • The first character of the string can be position zero or one |
| (f) Understand and use arithmetic, relational and logical operators | • Arithmetic, limited to: – + – – – / – * – ^ (raised to power of) – MOD – DIV • Relational, limited to: – = – < – <= – > – >= – <> (not equal to) • Logical, limited to: – AND – OR – NOT |
| 5 Understand and use nested statements | • Including nested selection and iteration • Candidates will not be required to write more than three levels of nested statements |
| 6 (a) Understand what is meant by procedures, functions and parameters (b) Define and use procedures and functions, with or without parameters (c) Understand and use local and global variables | • Procedures and functions may have up to three parameters |
| 7 Understand and use library routines | • Including: – MOD – DIV – ROUND – RANDOM |
| 8 Understand how to create a maintainable program | • Including appropriate use of: – meaningful identifiers – the commenting feature provided by the programming language – procedures and functions – relevant and appropriate commenting of syntax • Use meaningful identifiers for: – variables – constants – arrays – procedures and functions |
来源:剑桥国际大纲
一个变量(variable)是一个有名字的存储,容纳一个在程序运行时能改变的值。一个常量(constant)是一个有名字的存储,它的值是固定的、不改变。


你应当在使用前声明(declare)它们(说它们的名称和类型):
DECLARE score : INTEGER
DECLARE name : STRING
CONSTANT Pi = 3.142

对一个从不改变的值(如 Pi)用一个常量,所以它在一处被设定,而且容易阅读。
Step through the lines and watch each variable take its new value.
| 英文 | 中文 | 拼音 |
|---|---|---|
| variable | 变量 | biàn liàng |
| constant | 常量 | cháng liàng |
| declare | 声明 | shēng míng |
| integer | 整数 | zhěng shù |
| string | 字符串 | zì fú chuàn |
一个数据类型(data type)说明一个变量容纳什么种类的值。你必须知道五种基本类型。

| 类型 | 容纳 | 例子 |
|---|---|---|
| 整数(integer) | 一个整数 | 42、-7 |
| 实数(real) | 一个带小数点的数 | 3.14、-0.5 |
| 字符(char) | 一个单一字符 | 'A'、'?' |
| 字符串(string) | 一个字符序列 | "Hello" |
| 布尔值(Boolean) | 两个值之一 | TRUE 或 FALSE |
| 英文 | 中文 | 拼音 |
|---|---|---|
| data type | 数据类型 | shù jù lèi xíng |
| real | 实数 | shí shù |
| char | 字符 | zì fú |
| Boolean | 布尔值 | bù ěr zhí |
输入(input)从用户读一个值。输出(output)在屏幕上显示一个值。
OUTPUT "What is your name?"
INPUT name
OUTPUT "Hello ", name
| 英文 | 中文 | 拼音 |
|---|---|---|
| input | 输入 | shū rù |
| output | 输出 | shū chū |
每个程序从三个控制结构构建。

顺序(sequence)意味着步骤一个接一个地运行,按顺序,从上到下。
INPUT length
INPUT width
area ← length * width
OUTPUT area
选择(selection)基于一个条件选择哪些步骤运行。用一个 IF 语句,或当有许多选择时用一个 CASE 语句。
IF score >= 50 THEN
OUTPUT "Pass"
ELSE
OUTPUT "Fail"
ENDIF
CASE OF grade
'A' : OUTPUT "Excellent"
'B' : OUTPUT "Good"
OTHERWISE : OUTPUT "Keep trying"
ENDCASE
迭代(iteration,一个循环(loop))重复步骤。有三种。
一个计数循环(count-controlled loop)重复一个固定的次数:
FOR i ← 1 TO 5
OUTPUT "Hello"
NEXT i
一个前测循环(pre-condition loop)在每次重复之前检查条件,所以它可能运行零次:
WHILE answer <> "stop" DO
INPUT answer
ENDWHILE
一个后测循环(post-condition loop)在每次重复之后检查条件,所以它总是运行至少一次:
REPEAT
INPUT password
UNTIL password = "secret"

The conditions are tested top to bottom; the FIRST one that is true runs and the rest are skipped. Slide the score and watch which branch lights up.
Change the value and watch which branch runs — selection in action.
| 英文 | 中文 | 拼音 |
|---|---|---|
| sequence | 顺序 | shùn xù |
| selection | 选择 | xuǎn zé |
| iteration | 迭代 | dié dài |
| loop | 循环 | xún huán |
| count-controlled loop | 计数循环 | jì shù xún huán |
| pre-condition loop | 前测循环 | qián cè xún huán |
| post-condition loop | 后测循环 | hòu cè xún huán |
| length | 长度 | cháng dù |
total ← total + value。count ← count + 1。

total ← 0
FOR i ← 1 TO 10
INPUT mark
total ← total + mark
NEXT i
OUTPUT total
例题。 一个程序要读入 5 个分数,然后输出总分和平均分。
total ← 0
FOR i ← 1 TO 5
INPUT mark
total ← total + mark
NEXT i
average ← total / 5
OUTPUT total, average
有两行是得分点。total ← 0 必须放在循环之前:放进循环里,总和每次都会被清零,程序最后只会输出最后一个分数。而 average ← total / 5 必须放在循环之后,因为在所有分数都加完之前,总和还不完整。先初始化,后计算 - 这个先后顺序才是题目真正考的东西。
| 英文 | 中文 | 拼音 |
|---|---|---|
| totalling | 求和 | qiú hé |
| counting | 计数 | jì shù |
| 运算符 | 意义 |
|---|---|
+ - * / |
加、减、乘、除 |
^ |
提升到……次幂 |
MOD |
除法后的余数(remainder) |
DIV |
一个除法的整数部分 |
例如,17 MOD 5 是 2,而 17 DIV 5 是 3。
这些比较两个值并给出一个布尔结果:=、<、<=、>、>=,以及 <>(不等于)。
这些连接条件:AND(两者都必须为真)、OR(至少一个必须为真)、NOT(反转真/假)。

IF age >= 13 AND age <= 19 THEN
OUTPUT "Teenager"
ENDIF
| 英文 | 中文 | 拼音 |
|---|---|---|
| remainder | 余数 | yú shù |
一个字符串由字符构成。有用的操作:
name ← "Computer"
OUTPUT LENGTH(name) // 8
OUTPUT SUBSTRING(name, 1, 4) // "Comp"
OUTPUT UCASE(name) // "COMPUTER"
OUTPUT LCASE(name) // "computer"
(第一个字符可能被数为位置 0 或位置 1,取决于语言。)
Every character has a position (index). A slice takes the characters from the start index up to — but not including — the end index, just like SUBSTRING does.
| 英文 | 中文 | 拼音 |
|---|---|---|
| substring | 子串 | zi chuàn |
| upper case | 大写 | dà xiě |
| lower case | 小写 | xiǎo xiě |
一个嵌套语句(nested statement)是放在另一个里面的一个控制结构。你可以嵌套选择和迭代。
FOR i ← 1 TO 3
IF i MOD 2 = 0 THEN
OUTPUT i, " is even"
ELSE
OUTPUT i, " is odd"
ENDIF
NEXT i
你不会必须写多于三层的嵌套。
| 英文 | 中文 | 拼音 |
|---|---|---|
| nested statement | 嵌套语句 | qiàn tào yǔ jù |
为了避免重复代码,你可以把一个程序分成有名字的块。
CALL 运行它。一个参数(parameter)是一个传入一个过程或函数的值(最多三个参数)。
PROCEDURE Greet(personName : STRING)
OUTPUT "Hello ", personName
ENDPROCEDURE
CALL Greet("Sam")
FUNCTION Square(n : INTEGER) RETURNS INTEGER
RETURN n * n
ENDFUNCTION
answer ← Square(5) // answer is 25
局部变量更安全,因为它们不能被程序另一部分错误地改变。
| 英文 | 中文 | 拼音 |
|---|---|---|
| procedure | 过程 | guò chéng |
| function | 函数 | hán shù |
| parameter | 参数 | cān shù |
| local variable | 局部变量 | jú bù biàn liàng |
| global variable | 全局变量 | quán jú biàn liàng |
一个库程序(library routine)是你能使用的一段现成的代码。你必须知道这些:
| 程序 | 它做什么 |
|---|---|
MOD |
给一个除法的余数 |
DIV |
给一个除法的整数部分 |
ROUND |
把一个实数舍入到若干小数位 |
RANDOM |
给一个随机数 |
| 英文 | 中文 | 拼音 |
|---|---|---|
| library routine | 库程序 | kù chéng xù |
一个可维护的(maintainable)程序对其他人来说以后容易阅读和改变。要制作一个:
totalScore,不是 x);| 英文 | 中文 | 拼音 |
|---|---|---|
| maintainable | 可维护的 | kě wéi hù de |
| meaningful identifiers | 有意义的标识符 | yǒu yì yì de biāo shí fú |
| comments | 注释 | zhù shì |
| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 Declare and use one-dimensional (1D) and two-dimensional (2D) arrays | |
| 2 Understand the use of arrays | • Including the use of variables as indexes in arrays |
| 3 Write values into, and read values from, an array using iteration | • The first index can be zero or one • Including nested iteration |
来源:剑桥国际大纲
一个数组(array)是一个单一变量,容纳同一类型的许多值,由一个索引(index,一个位置号)找到。
一个一维(1D)数组(one-dimensional array)像一个单一的列表。
DECLARE scores : ARRAY[1:5] OF INTEGER
scores[1] ← 90
scores[2] ← 75
OUTPUT scores[1]

你可以用一个循环填充或读取一个数组:
FOR i ← 1 TO 5
INPUT scores[i]
NEXT i
一个二维(2D)数组(two-dimensional array)像一个带行和列的表。它用两个索引。
DECLARE grid : ARRAY[1:3, 1:3] OF INTEGER
grid[1, 1] ← 5
grid[2, 3] ← 8

你用一个循环里面的一个循环(嵌套迭代)读一个 2D 数组。
Pick a position to read one element — how a list (array) is indexed.
| 英文 | 中文 | 拼音 |
|---|---|---|
| array | 数组 | shù zǔ |
| index | 索引 | suǒ yǐn |
| one-dimensional (1D) array | 一维数组 | yī wéi shù zǔ |
| two-dimensional (2D) array | 二维数组 | èr wéi shù zǔ |
| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 Understand the purpose of storing data in a file to be used by a program | |
| 2 Open, close and use a file for reading and writing | • Including: – read and write single items of data – read and write a line of text |
来源:剑桥国际大纲
一个程序可以把数据存储在一个文件(file)中,所以它在程序停止后被保留。你必须打开文件、使用它,然后关闭它。
OPENFILE "data.txt" FOR WRITE
WRITEFILE "data.txt", "Hello"
CLOSEFILE "data.txt"
OPENFILE "data.txt" FOR READ
READFILE "data.txt", line
CLOSEFILE "data.txt"
你可以读和写单个数据项或一整行文本。当你完成使用一个文件时总是关闭它。
| 英文 | 中文 | 拼音 |
|---|---|---|
| file | 文件 | wén jiàn |
MOD 给余数,而 DIV 给一个除法的整数部分:17 MOD 5 是 2,17 DIV 5 是 3。| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 Define a single-table database from given data storage requirements | • Including: – fields – records – validation |
| 2 Suggest suitable basic data types | • Including: – text/alphanumeric – character – Boolean – integer – real – date/time |
| 3 Understand the purpose of a primary key and identify a suitable primary key for a given database table | |
| 4 Read, understand and complete structured query language (SQL) scripts to query data stored in a single database table | • Limited to: – SELECT – FROM – WHERE – ORDER BY DESCENDING – ORDER BY ASCENDING – SUM – COUNT – AND – OR • Identifying the output given by an SQL statement that will query the given contents of a database table |
来源:剑桥国际大纲
一个数据库(database)是一个有组织的数据存储,被保存得容易搜索、排序和更新。在 IGCSE 你用一个单表数据库(single-table database)——所有的数据都容纳在一个表中。


| 英文 | 中文 | 拼音 |
|---|---|---|
| database | 数据库 | shù jù kù |
| single-table database | 单表数据库 | dān biǎo shù jù kù |
一个数据库表由记录和字段构成。
| StudentID | FirstName | DateOfBirth | FormClass | FeesPaid |
|---|---|---|---|---|
| 1 | Amy | 14/03/2009 | 10A | TRUE |
| 2 | Ben | 02/11/2008 | 10B | FALSE |
这里每一行是一个记录,而每一列是一个字段。

| 英文 | 中文 | 拼音 |
|---|---|---|
| record | 记录 | jì lù |
| field | 字段 | zì duàn |
每个字段存储一个数据类型(data type)。你选择最适合数据的类型。

| 数据类型 | 用于 | 例子 |
|---|---|---|
| 文本/字母数字(text/alphanumeric) | 字母、数字和符号 | "10A"、"Amy" |
| 字符(character) | 一个单一字符 | 'M' |
| 布尔值(Boolean) | 两个值之一 | TRUE / FALSE |
| 整数(integer) | 一个整数 | 42 |
| 实数(real) | 一个带小数点的数 | 3.5 |
| 日期时间(date/time) | 一个日期或一个时间 | 14/03/2009 |
| 英文 | 中文 | 拼音 |
|---|---|---|
| data type | 数据类型 | shù jù lèi xíng |
| text/alphanumeric | 文本 | wén běn |
| character | 字符 | zì fú |
| Boolean | 布尔值 | bù ěr zhí |
| integer | 整数 | zhěng shù |
| real | 实数 | shí shù |
| date/time | 日期时间 | rì qī shí jiān |
一个主键(primary key)是一个为每个记录容纳一个唯一的(unique)值的字段。没有两个记录能有同样的主键,所以它让你精确地挑出一个记录。
在上面的表中,StudentID 是一个好的主键,因为每个学生有一个不同的数。一个像 FormClass 的字段会是一个糟糕的主键,因为许多学生共享同一个班。
| 英文 | 中文 | 拼音 |
|---|---|---|
| primary key | 主键 | zhǔ jiàn |
| unique | 唯一的 | wéi yī de |
当数据被放入一个数据库时,验证(validation)检查确保它是合理的——例如对一个年龄字段的一个范围检查,或一个存在性检查使一个字段不被留空。(你在主题 7 中看到过这些检查。)

| 英文 | 中文 | 拼音 |
|---|---|---|
| validation | 验证 | yàn zhèng |
结构化查询语言(Structured Query Language,SQL)是一种用来查询(query)一个数据库——挑出你想要的记录——的语言。你必须理解并完成 SQL 脚本。
SELECT 说明显示哪些字段。FROM 说明用哪个表。WHERE 给一个条件(condition),所以只显示匹配的记录。
SELECT FirstName, FormClass
FROM Student
WHERE FeesPaid = TRUE;
这显示每个已付费的学生的名字和班级。
用 * 选择所有字段:
SELECT *
FROM Student
WHERE FormClass = '10A';
ORDER BY 排序结果。用 ASC 表示升序(ascending,最小的先,A→Z)或用 DESC 表示降序(descending,最大的先,Z→A)。
SELECT FirstName, DateOfBirth
FROM Student
ORDER BY DateOfBirth ASC;
用 AND(两者都必须为真)或 OR(至少一个必须为真)连接条件。
SELECT FirstName
FROM Student
WHERE FormClass = '10A' AND FeesPaid = FALSE;
SUM 把一个数字字段中的值加起来。COUNT 数有多少记录匹配。SELECT COUNT(StudentID)
FROM Student
WHERE FeesPaid = FALSE;
这数有多少学生还没付费。SUM 以同样的方式工作,但加一个数字字段而不是数行。
要找到一个 SQL 脚本的输出,按这个顺序读它:
FROM——哪个表;WHERE——只保留匹配条件的记录;SELECT——只显示选定的字段;ORDER BY——把结果排序。
遵循这些步骤,你可以精确地写下查询返回哪些行和列。
例题。 一个 Book 表有字段 Title、Author、Price 和 InStock。写一个查询,显示 Orwell 所著且有库存的每本书的书名和价格,最便宜的排在前面。
SELECT Title, Price
FROM Book
WHERE Author = 'Orwell' AND InStock = TRUE
ORDER BY Price ASC;
按阅读顺序来构建:FROM 指出是哪个表;WHERE 只保留匹配的记录,因为有两个条件,所以要用 AND;SELECT 只显示题目要求的那两个字段;ORDER BY … ASC 把它们排序。文本值要加引号,而且只有题目要求的字段才应出现在 SELECT 中 - 仅仅因为你按 Author 筛选过就把它也加进去,是这里最常见的丢分方式。
Step through a query: WHERE filters rows, SELECT picks columns.
| 英文 | 中文 | 拼音 |
|---|---|---|
| structured query language | 结构化查询语言 | jié gòu huà chá xún yǔ yán |
| query | 查询 | chá xún |
| condition | 条件 | tiáo jiàn |
| ascending | 升序 | shēng xù |
| descending | 降序 | jiàng xù |
SELECT(哪些字段)、FROM(哪个表)、WHERE(条件)、ORDER BY(排序,ASC 或 DESC)。COUNT 数匹配的记录;SUM 加起来一个数字字段。| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 Identify and use the standard symbols for logic gates | • See section 4 for logic gate symbols |
| 2 Define and understand the functions of logic gates | • Including: – NOT – AND – OR – NAND – NOR – XOR (EOR) – the binary output produced from all the possible binary inputs • NOT is a single input gate • All other gates are limited to two inputs |
| 3 (a) Use logic gates to create given logic circuits from a: (i) problem statement (ii) logic expression (iii) truth table (b) Complete a truth table from a: (i) problem statement (ii) logic expression (iii) logic circuit | • Circuits must be drawn for the statement given, without simplification • Logic circuits will be limited to a maximum of three inputs and one output • An example truth table with three inputs, for completion: A B C Output | 0 0 0 | 0 0 1 | 0 1 0 | 0 1 1 | 1 0 0 | 1 0 1 | 1 1 0 | 1 1 1 |
| (c) Write a logic expression from a: (i) problem statement (ii) logic circuit (iii) truth table |
来源:剑桥国际大纲
布尔逻辑(Boolean logic)用真或假的值工作。在电子学中这些被显示为 1(真)和 0(假)。一个逻辑门(logic gate)取一个或多个这些输入并给一个输出,遵循一个固定的规则。
一个真值表(truth table)列出每一个可能的输入集及每个的输出。你通过写出所有的输入组合来构建它。

| 英文 | 中文 | 拼音 |
|---|---|---|
| Boolean logic | 布尔逻辑 | bù ěr luó jí |
| logic gate | 逻辑门 | luó jí mén |
| truth table | 真值表 | zhēn zhí biǎo |
你必须知道六个门。NOT 有一个输入;其他所有的有两个输入(A 和 B)。


非门(NOT gate)反转输入。当输入是 0 时输出是 1。
| A | Output |
|---|---|
| 0 | 1 |
| 1 | 0 |
与门(AND gate)只在两个输入都是 1 时给输出 1。

| A | B | Output |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
或门(OR gate)在至少一个输入是 1 时给输出 1。

| A | B | Output |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
与非门(NAND gate)是 AND 后跟 NOT。输出是 AND 的相反。
| A | B | Output |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
或非门(NOR gate)是 OR 后跟 NOT。输出是 OR 的相反。
| A | B | Output |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
异或门(XOR gate,异或)在输入不同时给输出 1。
| A | B | Output |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Switch the inputs and pick a gate to see its output — AND, OR, NOT, NAND, NOR, XOR.
| 英文 | 中文 | 拼音 |
|---|---|---|
| NOT gate | 非门 | fēi mén |
| AND gate | 与门 | yǔ mén |
| OR gate | 或门 | huò mén |
| NAND gate | 与非门 | yǔ fēi mén |
| NOR gate | 或非门 | huò fēi mén |
| XOR gate | 异或门 | yì huò mén |
一个逻辑表达式(logic expression)用字母和门的词书写一个电路。书写门的通常方式:
| 门 | 用词 |
|---|---|
| NOT A | NOT A |
| A AND B | A AND B |
| A OR B | A OR B |
例如,表达式 (A AND B) OR (NOT C) 意味着:做 A AND B、做 NOT C,然后把两个结果 OR 在一起。

Build the truth table for AND, OR, XOR and NOT — the logic behind every expression.
| 英文 | 中文 | 拼音 |
|---|---|---|
| logic expression | 逻辑表达式 | luó jí biǎo dá shì |
一个逻辑电路(logic circuit)把门连接在一起以执行一个任务。一个门的输出能变成另一个的输入。在 IGCSE,一个电路有多达三个输入和一个输出。

你必须能在四种形式之间移动:
读陈述并挑出条件和逻辑词(and、or、not)。例如:
一个警报(X)在门开着(A)AND 系统被打开(B)时响起。
这是 X = A AND B,所以你画一个 AND 门,带输入 A 和 B。
要填一个真值表:

| A | B | C | A AND B | (A AND B) OR C |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 1 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 | 1 |
为每个门加一个中间的"工作"列使最终输出容易填。总是精确地按陈述所说画电路,不简化它。
例题。 对 X = (A AND B) OR (NOT C),完成 A = 1、B = 0、C = 0 这一行的真值表。从括号往外做,一次算一个门。首先 A AND B = 1 AND 0 = 0,因为 AND 要求两个输入都是 1。接着 NOT C = NOT 0 = 1。最后把两个结果做 OR:0 OR 1 = 1。所以 X = 1。要给每个中间的门单独一列,而不是想一步算完整个表达式:三个输入意味着有 $2^3 = 8$ 行,而这些中间列正是即使最终答案算错也能拿到方法分的地方。
| 英文 | 中文 | 拼音 |
|---|---|---|
| logic circuit | 逻辑电路 | luó jí diàn lù |
| problem statement | 问题陈述 | wèn tí chén shù |
输入关键词,搜索所有科目的笔记、课程、编程、词汇和历年真题。