← 返回资讯屏轩教育 · 行业资讯

Cambridge IGCSE Computer Science: Formula & Theorem Quick Reference | 剑桥IGCSE计算机科学:公式定理速查手册

2026-07-22 04:06 · 本文部分内容由AI辅助创作

📚 Cambridge IGCSE Computer Science: Formula & Theorem Quick Reference | 剑桥IGCSE计算机科学:公式定理速查手册

This quick-reference handbook brings together every essential formula, theorem, and calculation you need for the Cambridge IGCSE Computer Science (0478) examination. From file size to Boolean algebra, each topic is broken into a clear English explanation followed by its Chinese counterpart, with worked examples and ready-to-use tables. Use it alongside your revision notes to lock in the numeracy skills that underpin high marks in Paper 1.

这本速查手册汇总了剑桥 IGCSE 计算机科学 (0478) 考试中所有必要的公式、定理和计算方法。从文件大小到布尔代数,每个主题先给出清晰的英文解释,再附上对应的中文说明,同时提供典型范例和现成可用的表格。配合你的复习笔记使用,可以牢牢巩固支撑试卷一高分的关键计算能力。

1. Data Storage Units & File Size Calculation | 数据存储单位与文件大小计算

for kilo, mega, etc. The Cambridge syllabus typically uses binary meanings: 1 KiB = 1024 bytes, 1 MiB = 1024 KiB. To convert a file size given in bits to bytes, divide by 8. For larger units, multiply or divide by the appropriate power of 1024.

计算机存储以字节为单位,1 字节 = 8 比特。更大的单位遵循 2 的幂次,尽管某些考试情境会使用 10 的幂次,但剑桥大纲通常采用二进制含义:1 KiB = 1024 B,1 MiB = 1024 KiB。将以比特为单位的文件大小转换为字节,需要除以 8。转换为更大单位时,需乘以或除以相应的 1024 的幂。

Unit / 单位Symbol / 符号Equivalent in bytes / 字节等值
1 kilobyteKiB / kB1024 bytes (2¹⁰)
1 megabyteMiB / MB1024² bytes (2²⁰)
1 gigabyteGiB / GB1024³ bytes (2³⁰)
1 terabyteTiB / TB1024⁴ bytes (2⁴⁰)

For any file: File size (bytes) = Number of items × Size per item (bytes). Keep all units consistent – if you start with bits, stay in bits until the final conversion.

对于任何文件:文件大小(字节)= 项目数量 × 每项大小(字节)。注意保持单位一致——如果一开始使用比特,在最终转换之前应始终使用比特。


2. Image File Size Calculation | 图像文件大小计算

its resolution (width × height in pixels) and colour depth (bits used to store each pixel's colour). The basic formula is:

Image file size (bits) = Width (px) × Height (px) × Colour depth (bits per pixel)

位图图像的大小取决于它的分辨率(宽度 × 高度,以像素为单位)以及色深(存储每个像素颜色所用的比特数)。基本公式为:

图像文件大小(比特)= 宽度(px) × 高度(px) × 色深(每像素比特数)

If the colour depth is given in bits per colour channel (e.g., 8 bits for Red, 8 for Green, 8 for Blue), you must multiply by the number of channels. For a full RGB image: Total bits = Width × Height × (Red bits + Green bits + Blue bits).

如果色深是以每个颜色通道的比特数给出的(例如红、绿、蓝各 8 比特),你必须乘以通道数。对于完整的 RGB 图像:总比特数 = 宽度 × 高度 × (红色比特 + 绿色比特 + 蓝色比特)。

To convert bits to bytes, divide by 8. For kilobytes, divide further by 1024. Always check whether the question wants the answer in bytes, KiB, or MiB.

将比特转换为字节,除以 8。若要转换为千字节,再除以 1024。务必检查题目要求答案的单位是字节、KiB 还是 MiB。


3. Sound File Size Calculation | 声音文件大小计算

Sound is sampled by taking measurements of amplitude at regular intervals. The file size is determined by sample rate (Hz), sample resolution (bits per sample), number of channels, and duration (seconds).

e (bits) = Sample rate (Hz) × Sample resolution (bits) × Number of channels × Duration (s)

声音通过按固定间隔测量振幅进行采样。文件大小由采样率 (Hz)、采样分辨率 (比特/样本)、声道数以及时长 (秒) 决定。

声音文件大小(比特)= 采样率(Hz) × 采样分辨率(比特) × 声道数 × 时长(秒)

ses 1 channel. After computing the total bits, convert to bytes and then to suitable higher units just as with images.

立体声音频的声道数为 2,单声道为 1。计算总比特数后,与图像计算一样,转换为字节,再转换为合适的高级单位。


4. Video File Size Calculation | 视频文件大小计算

A video is essentially a sequence of images (frames) accompanied by audio. Its total size is the sum of the video track and the audio track. For the video portion, use the image formula multiplied by the number of frames:

Video track size (bits) = Width × Height × Colour depth × Frame rate (fps) × Duration (s)

视频本质上就是一系列图像(帧)加上音频。其总大小是视频轨和音频轨之和。对于视频部分,使用图像公式并乘以帧数:

视频轨大小(比特)= 宽度 × 高度 × 色深 × 帧率 (fps) × 时长(秒)

Then compute the audio track using the sound formula, and add the two results. If compression is applied, the final file size will be smaller than this uncompressed estimate.

然后利用声音公式计算音频轨,再将二者相加。如果应用了压缩,最终文件大小会比这个未压缩的估计值更小。


5. Data Transfer Time | 数据传输时间

When sending data across a network, the time required depends on the file size and the transmission speed. The relationship is:

Time (seconds) = File size ÷ Transfer speed

通过网络发送数据时,所需时间取决于文件大小和传输速度。关系式为:

时间(秒) = 文件大小 ÷ 传输速度

second (Mbps). Convert file size accordingly. For example, to find how long it takes to transfer a 10 MiB file over a 100 Mbps connection, first convert 10 MiB to bits: 10 × 1024 × 1024 × 8 bits, then divide by 100 × 10⁶ bps.

确保两个量使用相同的数据单位(均为比特、均为字节等)。传输速度通常以 bps 或 Mbps 给出。相应地转换文件大小。例如,计算通过 100 Mbps 连接传输 10 MiB 文件所需的时间:先把 10 MiB 转换为比特:10 × 1024 × 1024 × 8 比特,然后除以 100 × 10⁶ bps。


6. Compression Ratio | 压缩比

Compression reduces file size. The compression ratio compares the original size to the compressed size.

Compression ratio = Uncompressed size ÷ Compressed size

压缩可以减小文件大小。压缩比将原始大小与压缩后的大小进行比较。

压缩比 = 未压缩大小 ÷ 压缩后大小

A ratio of 4:1 means the uncompressed file is four times larger than the compressed version. To find the percentage reduction in size, use: Percentage reduction = ((Uncompressed size – Compressed size) ÷ Uncompressed size) × 100%.

压缩比为 4:1 意味着未压缩文件是压缩后文件的四倍大。要计算文件缩小的百分比,使用:缩小百分比 = ((未压缩大小 – 压缩后大小) ÷ 未压缩大小) × 100%。


7. Parity Check & Error Detection | 奇偶校验与错误检测

Parity adds an extra bit to a group of bits so that the total number of 1s is even (even parity) or odd (odd parity). The rule is:

For even parity: Parity bit = 1 if number of 1s in data is odd, else 0.

奇偶校验为一个比特组添加一个额外的比特,使得 1 的总数为偶数(偶校验)或奇数(奇校验)。规则为:

偶校验:如果数据中 1 的个数为奇数,校验位为 1,否则为 0。

On retrieval, the receiver counts the 1s (including the parity bit). If the expected parity does not match, an error is flagged. This method can detect a single-bit error but cannot pinpoint which bit is wrong, nor can it detect two-bit errors.

接收方在读取时统计 1 的个数(包括校验位)。如果与预期的奇偶性不符,则标记错误。该方法可以检测单比特错误,但无法定位错误比特,也不能检测双比特错误。


广告 / Sponsored

8. Boolean Algebra & De Morgan's Laws | 布尔代数与德摩根定律

Boolean algebra is used to simplify logic circuits and conditions. The key identities appear frequently in Cambridge papers:

Identity / 恒等式Expression / 表达式
Commutative lawA AND B = B AND A; A OR B = B OR A
Associative law(A AND B) AND C = A AND (B AND C)
Distributive lawA AND (B OR C) = (A AND B) OR (A AND C)
De Morgan's law (first)NOT (A AND B) = (NOT A) OR (NOT B)
De Morgan's law (second)NOT (A OR B) = (NOT A) AND (NOT B)

布尔代数用于简化逻辑电路和条件判断。以下重要恒等式常在剑桥试卷中出现:

恒等式名称表达式
交换律A AND B = B AND A; A OR B = B OR A
结合律(A AND B) AND C = A AND (B AND C)
分配律A AND (B OR C) = (A AND B) OR (A AND C)
德摩根定律 (第一)NOT (A AND B) = (NOT A) OR (NOT B)
德摩根定律 (第二)NOT (A OR B) = (NOT A) AND (NOT B)

Apply De Morgan's laws to simplify complex Boolean expressions or to convert a logic circuit drawn with NAND gates into an equivalent using other gates. In examination questions, you are often asked to draw new circuits after applying these laws.

运用德摩根定律可以简化复杂的布尔表达式,或将用与非门绘制的逻辑电路转换为使用其他门电路的等效电路。在考试题中,经常要求你在应用这些定律后画出新的电路。


9. Logic Gate Truth Tables | 逻辑门真值表

The three fundamental gates – AND, OR, NOT – plus the derived gates NAND, NOR, XOR define all digital circuits. The truth tables below must be memorised.

三种基本门电路——AND、OR、NOT——以及衍生出的 NAND、NOR、XOR 门定义了所有数字电路。下面的真值表必须牢记。

GateSymbol (Boolean)Truth Table (A, B → Output)
ANDA • B0,0→0; 0,1→0; 1,0→0; 1,1→1
ORA + B0,0→0; 0,1→1; 1,0→1; 1,1→1
NOTĀ0→1; 1→0
NAND(A • B)̄0,0→1; 0,1→1; 1,0→1; 1,1→0
NOR(A + B)̄0,0→1; 0,1→0; 1,0→0; 1,1→0
XORA ⊕ B0,0→0; 0,1→1; 1,0→1; 1,1→0

Note that XNOR (equivalence) outputs 1 when inputs are equal; it is the inverse of XOR. Always double-check the question's labeling of inputs and outputs when completing truth tables.

注意,XNOR(同或)在输入相同时输出 1;它是 XOR 的反。填写真值表时,务必仔细核对题目对输入输出的标注。


10. Search Algorithms – Linear vs Binary | 搜索算法——线性搜索与二分搜索

Search efficiency is often measured by the maximum number of comparisons needed. For an unsorted list of n items, a linear search examines each item in turn:

Linear search: Maximum comparisons = n

搜索效率通常用所需的最大比较次数来衡量。对于未排序的包含 n 个元素的列表,线性搜索依次检查每一项:

线性搜索:最大比较次数 = n

A binary search works on a sorted list. It repeatedly halves the search space, so the maximum number of comparisons is:

Binary search: Maximum comparisons ≈ log₂(n)

二分搜索适用于已排序的列表。它不断将搜索范围减半,因此最大比较次数为:

二分搜索:最大比较次数 ≈ log₂(n)

his huge difference explains why binary search is far superior for large, sorted datasets.

例:当 n = 1024 时,线性搜索最多需要 1024 次比较;二分搜索最多仅需 10 次比较(因为 2¹⁰ = 1024)。如此巨大的差异说明了为何二分搜索在大规模、已排序的数据集上远为优越。


11. Check Digit Calculation | 校验位计算

Check digits help detect errors in single-digit transcription or transposition. A common method is the ISBN-13 / mod-10 algorithm. Given the first 12 digits, calculate the check digit as follows:

  1. Sum of digits in odd positions (1st, 3rd, 5th, …) → S₁.
  2. Sum of digits in even positions (2nd, 4th, 6th, …) → S₂.
  3. Total = S₁ + 3 × S₂.
  4. Check digit = (10 – (Total mod 10)) mod 10.

校验位有助于检测单位数字转录或换位错误。常用的方法是 ISBN-13 / 模 10 算法。给定前 12 位数字,按以下步骤计算校验位:

  1. 奇数位(第 1、3、5…位)数字之和 → S₁。
  2. 偶数位(第 2、4、6…位)数字之和 → S₂。
  3. 总和 = S₁ + 3 × S₂。
  4. 校验位 = (10 – (总和 mod 10)) mod 10。

For a valid code, the weighted sum of all 13 digits must be a multiple of 10. This simple validation can catch most single-digit errors and many transpositions.

对于一个有效的代码,所有 13 位数字的加权和必须是 10 的倍数。这种简单的验证可以检测出大多数单数字错误以及许多换位错误。


12. Sorting Algorithms – Comparison Counts | 排序算法——比较次数

Although not always expressed as a strict formula, understanding the approximate number of comparisons in sorting algorithms helps to analyse efficiency. For a list of n items:

虽然并不总是以严格的公式呈现,但了解排序算法的大致比较次数有助于分析效率。对于包含 n 个元素的列表:

These counts help explain why merge sort is preferred for large lists despite its use of extra memory. In Cambridge exam questions, you may be asked to count the exact number of swaps or comparisons for a small dataset, so practise tracing through the algorithms step by step.

这些次数有助于解释为何在大型列表中归并排序更受青睐,尽管它需要额外内存。在剑桥考题中,你可能会被要求对一个小数据集精确统计算法执行的交换或比较次数,因此请务必逐步练习追踪算法过程。


Published by TutorHao | Computer Science Revision Series | aleveler.com

广告 / Sponsored
现货 Cambridge International AS & ALevel IT Coursebook剑桥国际IGC…
计算机 备考教辅 · 正版现货 · 与本文内容相关
查看详情 / View on Taobao参考价 ¥467.0

更多咨询请联系16621398022(同微信)

备考资讯每日更新,关注不错过
考纲变化 · 科目分析 · 学习方法
扫码关注公众号 tutorhao
在微信里长按二维码识别关注
或截图后用「扫一扫 → 相册」选择本图
公众号:tutorhao