📚 Year 11 CAIE Computer Science: Formula & Theorem Quick Reference Handbook | Year 11 CAIE 计算机:公式定理速查手册
This concise handbook brings together the essential formulas, unit conversions, boolean laws, and calculation methods that every Year 11 CAIE Computer Science student needs at their fingertips. Whether you are converting between number systems, sizing an image file, or simplifying a logic circuit with De Morgan's theorems, the key relationships are presented here in a clean, bilingual pairing so you can revise efficiently and check your working on the spot.
这本速查手册汇集了每位 Year 11 CAIE 计算机科学学生都必须掌握的必备公式、单位换算、布尔定律和计算方法。不论你是在不同数制之间进行转换、计算图像文件大小,还是利用德摩根定理化简逻辑电路,关键关系式都以清晰的双语对照形式呈现在这里,方便你高效复习并即时核对解题过程。
1. Storage Units & File Size Conversions | 存储单位与文件大小换算
iga, and tera. Always remember that in CAIE Computer Science, 1 KiB = 2¹⁰ bytes, not 1000 bytes.
数字存储以位和字节为衡量单位。从千到兆、吉、太的每一步换算中,基本关系都使用 2¹⁰ 的倍数。请牢记,在 CAIE 计算机科学中,1 KiB = 2¹⁰ 字节,而非 1000 字节。
1 bit = smallest unit, 1 byte = 8 bits, 1 kibibyte (KiB) = 2¹⁰ bytes = 1024 bytes
1 位 = 最小单位,1 字节 = 8 位,1 千二进制字节 (KiB) = 2¹⁰ 字节 = 1024 字节
- 1 MiB = 2²⁰ bytes = 1 048 576 bytes | 1 MiB = 2²⁰ 字节
- 1 GiB = 2³⁰ bytes | 1 GiB = 2³⁰ 字节
- 1 TiB = 2⁴⁰ bytes | 1 TiB = 2⁴⁰ 字节
- When converting a file size given in bits to bytes, divide by 8. | 将以位给出的文件大小转换为字节时,除以 8。
- d: file size (bytes) = number of characters in ASCII text (assuming 1 byte per character). | 常用关系:文件大小(字节)= ASCII 文本字符数(假设每个字符 1 字节)。
2. Binary, Denary & Hexadecimal Conversions | 二进制、十进制与十六进制转换
Three number systems dominate CAIE data representation questions. Binary uses base 2, denary uses base 10, and hexadecimal uses base 16. Place values are the key to moving between them.
三种数制主导着 CAIE 数据表示题目。二进制采用基 2,十进制采用基 10,十六进制采用基 16。位权是三者之间相互转换的关键。
128 64 32 16 8 4 2 1 (8-bit binary place values)
128 64 32 16 8 4 2 1 (8 位二进制位权)
- To convert binary to denary: multiply each bit (0 or 1) by its place value and sum them. | 二进制转十进制:将每一位(0 或 1)乘以对应位权并求和。
- To convert denary to binary: repeatedly subtract the largest possible place value and record a 1; otherwise 0. | 十进制转二进制:反复减去可能的最大位权并记 1;否则记 0。
- Hexadecimal digits: 0–9, then A=10, B=11, C=12, D=13, E=14, F=15. | 十六进制数码:0–9,然后 A=10, B=11, C=12, D=13, E=14, F=15。
- A nibble (4 bits) maps directly to one hex digit: 0000₂ = 0ₓ, 1111₂ = Fₓ. | 一个半字节(4 位)直接对应一个十六进制数字:0000₂ = 0ₓ,1111₂ = Fₓ。
- To convert binary to hex: group bits into nibbles, convert each to hex. | 二进制转十六进制:将位按半字节分组,每组转换为一个十六进制数字。
- To convert denary to hex: convert denary to binary, then to hex, or divide by 16 repeatedly. | 十进制转十六进制:先将十进制转换为二进制,再转十六进制,或反复除以 16 取余数。
3. Image File Size Calculations | 图像文件大小计算
For a bitmap image, the total file size is directly proportional to the number of pixels and the colour depth. Mastering this formula allows you to predict storage requirements and solve exam problems where image dimensions or colour depth are changed.
对于位图图像,总文件大小与像素数量和色彩深度成正比。掌握这个公式可以帮助你预测存储需求,并解答考试中关于图像尺寸或色彩深度变化的题目。
Image file size (bits) = width (pixels) × height (pixels) × colour depth (bits per pixel)
图像文件大小(位) = 宽度(像素) × 高度(像素) × 色彩深度(位/像素)
- Colour depth = number of bits used to represent the colour of a single pixel. | 色彩深度 = 用于表示单个像素颜色的位数。
- For a black-and-white image, colour depth = 1 bit per pixel. | 对于黑白图像,色彩深度 = 1 位/像素。
- For 256 colours, colour depth = 8 bits per pixel (since 2⁸ = 256). | 对于 256 色图像,色彩深度 = 8 位/像素(因为 2⁸ = 256)。
- To express file size in bytes, divide the result in bits by 8. | 要得到以字节表示的文件大小,将位结果除以 8。
- on with 24-bit colour, size in bytes = (1024 × 768 × 24) / 8 = 2,359,296 bytes ≈ 2.25 MiB. | 若图像分辨率为 1024×768,24 位色彩,则字节大小 = (1024 × 768 × 24) / 8 ≈ 2.25 MiB。
4. Sound File Size Calculations | 声音文件大小计算
Digital audio storage depends on the sampling rate, the bit depth (sampling resolution), the number of channels, and the duration of the recording. You must check all units carefully, especially when a rate is given in kHz.
数字音频的存储取决于采样率、位深度(采样分辨率)、声道数和录音时长。你必须仔细核对所有单位,尤其是当速率以 kHz 给出时。
file size (bits) = sample rate (Hz) × bit depth × number of channels × duration (seconds)
声音文件大小(位) = 采样率(Hz) × 位深度 × 声道数 × 时长(秒)
- Sample rate is the number of samples taken per second, measured in Hz. CD quality uses 44,100 Hz. | 采样率是每秒采集的样本数,单位为 Hz。CD 音质使用 44,100 Hz。
- Bit depth (sampling resolution) is the number of bits used to record each sample; e.g., 16-bit. | 位深度(采样分辨率)是记录每个样本所用的位数,例如 16 位。
- Number of channels: mono = 1, stereo = 2. | 声道数:单声道 = 1,立体声 = 2。
- Convert kHz to Hz: 1 kHz = 1000 Hz. | 将 kHz 转换为 Hz:1 kHz = 1000 Hz。
- After computing bits, divide by 8 for bytes, and then use 1024-based units for KiB, MiB as required. | 计算出位数后,除以 8 得到字节数,然后按需使用以 1024 为基数的 KiB、MiB 单位。
5. Logic Gates & Truth Tables | 逻辑门与真值表
The six basic logic gates form the foundation of digital circuits. Their behaviour is defined by truth tables. Knowing these off by heart lets you trace any logic diagram and construct Boolean expressions.
六种基本逻辑门构成了数字电路的基础。它们的行为由真值表定义。熟记这些门的行为,你就能追踪任何逻辑图并构建布尔表达式。
| Gate | 门 | Symbol notation | Boolean expression | Truth table key (A, B → Output) |
| AND (与门) | A ∧ B | A · B | 0,0→0; 0,1→0; 1,0→0; 1,1→1 |
| OR (或门) | A ∨ B | A + B | 0,0→0; 0,1→1; 1,0→1; 1,1→1 |
| NOT (非门) | ¬A | A' or Ā | 0→1; 1→0 |
| NAND (与非门) | A | B | (A · B)' | 0,0→1; 0,1→1; 1,0→1; 1,1→0 |
| NOR (或非门) | A ⊽ B | (A + B)' | 0,0→1; 0,1→0; 1,0→0; 1,1→0 |
| XOR (异或门) | A ⊕ B | A'B + AB' | 0,0→0; 0,1→1; 1,0→1; 1,1→0 |
Note: CAIE logic circuits use standard symbols (e.g., a curved shape for AND, a pointed shape with curved back for OR, a triangle with a small circle for NOT). | 注意:CAIE 逻辑电路使用标准符号(例如与门为弧形,或门为尖形加弧形背,非门为三角形加小圆圈)。
6. Boolean Algebra Simplification Laws | 布尔代数化简定律
Boolean algebra provides a set of identities that allow you to simplify logic circuits without drawing truth tables. These laws are commutative, associative, distributive, and more. They work exactly the same way for AND (·) and OR (+) operations as long as you follow the rules.
布尔代数提供了一套恒等式,让你无需绘制真值表就能化简逻辑电路。这些定律包括交换律、结合律、分配律等。它们对与 (·) 和或 (+) 运算同样适用,只要遵循规则即可。
Commutative laws: A + B = B + A; A · B = B · A
交换律:A + B = B + A;A · B = B · A
Associative laws: (A + B) + C = A + (B + C); (A · B) · C = A · (B · C)
结合律:(A + B) + C = A + (B + C);(A · B) · C = A · (B · C)
Distributive law: A · (B + C) = A · B + A · C; A + (B · C) = (A + B) · (A + C)
分配律:A · (B + C) = A · B + A · C;A + (B · C) = (A + B) · (A + C)
- Identity law: A + 0 = A; A · 1 = A | 同一律:A + 0 = A;A · 1 = A
- Null law: A + 1 = 1; A · 0 = 0 | 零一律:A + 1 = 1;A · 0 = 0
- Idempotent law: A + A = A; A · A = A | 幂等律:A + A = A;A · A = A
- Inverse law: A + A' = 1; A · A' = 0 | 补余律:A + A' = 1;A · A' = 0
- Absorption law: A + (A · B) = A; A · (A + B) = A | 吸收律:A + (A · B) = A;A · (A + B) = A
7. De Morgan’s Theorems & Logic Simplification | 德摩根定理与逻辑化简
De Morgan’s theorems are essential for converting between AND, OR, and NOT forms. They are frequently used to prove that two different gate arrangements are equivalent, or to reduce the number of gates in a circuit.
德摩根定理对于在 AND、OR 和 NOT 形式之间进行转换至关重要。它们常被用来证明两种不同的门布局是等价的,或者减少电路中的门数量。
Theorem 1: (A + B)' = A' · B'
定理 1:(A + B)' = A' · B'
Theorem 2: (A · B)' = A' + B'
定理 2:(A · B)' = A' + B'
- To apply De Morgan: break the bar over the entire expression, change the operator (AND to OR, OR to AND), and place bars over each variable. | 应用德摩根定理的方法:断开覆盖整个表达式的长反号,更改运算符(与变或,或变与),并在每个变量上加短反号。
- In circuit terms, a NAND gate is equivalent to an OR gate with inverted inputs. | 在电路术语中,一个与非门等价于一个带反向输入的或门。
- A NOR gate is equivalent to an AND gate with inverted inputs. | 一个或非门等价于一个带反向输入的与门。
- Simplify step by step, e.g., (A + B + C)' = A' · B' · C'. | 逐步化简,例如 (A + B + C)' = A' · B' · C'。
8. Error Detection – Parity, Check Digit & ARQ | 错误检测 – 奇偶校验、校验位与自动重传请求
When data is transmitted or stored, errors can occur. The simplest detection methods rely on adding redundant bits according to fixed rules. Understanding the mathematics behind parity and check digits will help you verify validity in exam scenarios.
当数据被传输或存储时,可能会发生错误。最简单的检测方法依赖于根据固定规则添加冗余位。理解奇偶校验和校验位背后的数学原理,有助于你在考试场景中验证有效性。
Even parity bit = 0 if number of 1s in data is even, 1 if odd (makes total 1s even)
偶校验位 = 如果数据中 1 的个数为偶数则为 0,如果为奇数则为 1(使 1 的总数为偶数)
Odd parity bit = 0 if number of 1s is odd, 1 if even (makes total 1s odd)
奇校验位 = 如果数据中 1 的个数为奇数则为 0,如果为偶数则为 1(使 1 的总数为奇数)
- Parity can detect single-bit errors; it cannot locate the error. | 奇偶校验可检测单一位错误;无法定位错误。
- A parity byte (longitudinal parity) added to a block increases error detection capability. | 在数据块中添加一个奇偶校验字节(纵向奇偶校验)可增强错误检测能力。
- Check digit: commonly used in ISBN. ISBN-13 check digit is calculated using a weighted sum modulo 10. | 校验位:常用于 ISBN。ISBN-13 校验位使用加权和模 10 计算。
- ARQ (Automatic Repeat reQuest) uses acknowledgements and timeouts to detect errors and request retransmission. | 自动重传请求 (ARQ) 使用确认和超时机制检测错误并请求重传。
9. Network Transmission Time & Data Transfer Rate | 网络传输时间与数据传输速率
Transferring a file across a network involves a straightforward relationship between the size of the data and the bandwidth. Always harmonise units before calculating—mix-ups between bits and bytes are a common pitfall.
通过网络传输文件涉及数据大小与带宽之间一个直接的关系。在计算前务必统一单位——混淆位和字节是一个常见陷阱。
Transmission time (seconds) = File size (bits) ÷ Data transfer rate (bits per second, bps)
传输时间(秒) = 文件大小(位) ÷ 数据传输速率(位每秒,bps)
- If file size is given in bytes, multiply by 8 to get bits. | 如果文件大小以字节给出,乘以 8 得到位数。
- ond), 1 Mbps = 1,000,000 bits per second (in networking context, CAIE often uses decimal). | 如果传输速率以 Mbps(兆位每秒)给出,1 Mbps = 1,000,000 位每秒(在网络语境中,CAIE 通常使用十进制)。
- MiB file on a 100 Mbps connection: size = 10 × 1024 × 1024 × 8 bits. Time ≈ 0.84 seconds. | 对于一个 10 MiB 的文件在 100 Mbps 连接上:大小 = 10 × 1024 × 1024 × 8 位,时间 ≈ 0.84 秒。
- Propagation delay may be mentioned but the core formula relies on this direct division. | 传播延迟可能会被提及,但核心公式依赖于这种直接除法。
10. Compression Ratio & File Size Reduction | 压缩率与文件大小缩减
When a file is compressed, the reduction in size can be described by the compression ratio or by the space saving percentage. These formulas appear in paper exam questions about lossless and lossy compression.
当文件被压缩后,大小的缩减可以用压缩率或空间节省百分比来描述。这些公式出现在关于无损和有损压缩的笔试题目中。
Compression ratio = Original file size ÷ Compressed file size
压缩率 = 原始文件大小 ÷ 压缩后文件大小
- A ratio of 4:1 means the compressed file is one quarter the original. | 4:1 的比率表示压缩文件是原始大小的四分之一。
- Space saving (%) = [(Original size – Compressed size) ÷ Original size] × 100. | 空间节省 (%) = [(原始大小 – 压缩后大小) ÷ 原始大小] × 100。
- Lossless compression (e.g., run-length encoding, Huffman coding) reduces file size without losing information. Lossy compression (e.g., JPEG, MP3) permanently removes some data. | 无损压缩(如游程编码、霍夫曼编码)在减少文件大小的同时不丢失信息。有损压缩(如 JPEG、MP3)会永久移除部分数据。
11. Binary Addition & Overflow | 二进制加法与溢出
). Overflow occurs when the result exceeds the available number of bits, which is crucial for understanding how registers handle data.
二进制加法遵循与十进制加法类似的规则:0+0=0,0+1=1,1+0=1,1+1=10(写 0,进位 1)。当结果超出可用的位数时发生溢出,这对理解寄存器如何处理数据至关重要。
Binary addition: 1 + 1 = 10₂ (carry 1 to the next higher place)
二进制加法:1 + 1 = 10₂(向高一位进位 1)
- In 8-bit unsigned addition, the maximum value is 255 (11111111₂). Adding 1 to it gives 1 00000000₂ — the ninth bit is lost, and the register holds 0. | 在 8 位无符号加法中,最大值为 255(11111111₂)。将其加 1 会得到 1 00000000₂ —— 第九位丢失,寄存器中保存 0。
- Overflow flag is set when a carry occurs from the most significant bit (MSB) in unsigned arithmetic, or when sign bits indicate an incorrect result in two's complement arithmetic. | 在无符号运算中,当最高有效位 (MSB) 产生进位时,溢出标志置位;或在使用二补码运算中,若符号位指示了不正确的结果,也会发生溢出。
- Two's complement representation: to get the negative of a binary number, invert all bits and add 1. | 二补码表示法:要获得一个二进制数的负数,将所有位取反后加 1。
12. Searching & Sorting Algorithm Time Complexity – Key Concepts | 搜索与排序算法时间复杂度 – 关键概念
While Year 11 CAIE does not require big-O notation, it expects you to compare algorithm efficiency in terms of the number of comparisons or passes. Linear search examines each element sequentially; bubble sort repeatedly swaps adjacent items; binary search halves the search space each time.
尽管 Year 11 CAIE 不要求大 O 表示法,但它期望你能够根据比较次数或趟数来比较算法效率。线性搜索依次检查每个元素;冒泡排序反复交换相邻项;二分搜索每次将搜索空间减半。
- Linear search: worst case n comparisons for n items; data does not need to be sorted. | 线性搜索:对于 n 个项目,最坏情况比较 n 次;数据无需排序。
- Binary search: data must be sorted; each comparison eliminates half the remaining items; worst case about log₂(n) comparisons. | 二分搜索:数据必须已排序;每次比较消除一半剩余项目;最坏情况约 log₂(n) 次比较。
- les to its correct position; for n items, n−1 passes needed, total comparisons ≈ n(n−1)/2. | 冒泡排序:每趟排序后,下一个最大的元素“冒泡”到正确位置;对于 n 个项目,需要 n−1 趟,总比较次数 ≈ n(n−1)/2。
- Insertion sort: builds a sorted portion one element at a time; efficient for small or nearly sorted data sets. | 插入排序:每次将一个元素插入到已排序的部分中;对于小型或近乎有序的数据集效率较高。
Published by TutorHao | CAIE IGCSE Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)

或截图后用「扫一扫 → 相册」选择本图