📚 Year 11 Edexcel Computer Science: Formula & Theorem Quick Reference | Year 11 Edexcel 计算机:公式定理速查手册
This ready-reference guide brings together every essential formula, theorem and conversion you need for the Year 11 Edexcel Computer Science exam. From storage calculations to Boolean simplification, each entry is paired with a worked example so you can apply it directly in problem-solving contexts.
这份速查手册汇集了 Year 11 Edexcel 计算机科学考试中所有必备的公式、定理和转换方法。从存储容量计算到布尔代数化简,每一条目都配有计算示例,帮助你直接应用于解题场景。
1. Storage Capacity Units & Conversion | 存储容量单位与换算
Computer storage is measured in bits, bytes and multiples of bytes. The base unit conversions follow powers of 2 for internal storage, though some contexts use powers of 10 for simplicity.
计算机存储以比特、字节及字节的倍数为单位。基本换算遵循 2 的次幂(内部存储),但部分场景为简化使用 10 的次幂。
-
1 byte = 8 bits
1 字节 = 8 比特
-
1 kilobyte (kB) = 10³ bytes = 1,000 bytes (decimal) | 1 kibibyte (KiB) = 2¹⁰ bytes = 1,024 bytes (binary)
1 千字节 (kB) = 10³ 字节 = 1000 字节(十进制) | 1 kibibyte (KiB) = 2¹⁰ 字节 = 1024 字节(二进制)
-
1 megabyte (MB) = 10⁶ bytes | 1 mebibyte (MiB) = 2²⁰ bytes = 1,048,576 bytes
1 兆字节 (MB) = 10⁶ 字节 | 1 mebibyte (MiB) = 2²⁰ 字节 = 1,048,576 字节
-
1 gigabyte (GB) = 10⁹ bytes | 1 gibibyte (GiB) = 2³⁰ bytes
1 吉字节 (GB) = 10⁹ 字节 | 1 gibibyte (GiB) = 2³⁰ 字节
-
1 terabyte (TB) = 10¹² bytes | 1 tebibyte (TiB) = 2⁴⁰ bytes
1 太字节 (TB) = 10¹² 字节 | 1 tebibyte (TiB) = 2⁴⁰ 字节
For Edexcel questions, check whether the problem assumes decimal or binary prefixes; unless stated, standard examination calculations often use 1 kB = 1000 bytes for file sizes and transmission, but 1 KiB = 1024 bytes in memory/CPU contexts.
Edexcel 试题中需注意题意假设的是十进制还是二进制前缀;除非特别说明,文件大小与传输常用 1 kB = 1000 字节,而内存/CPU 场景常用 1 KiB = 1024 字节。
2. Image File Size Formula | 图像文件大小公式
For a bitmap image, the file size (in bits) is the product of three factors: image width in pixels, image height in pixels, and colour depth in bits per pixel. This ignores metadata and compression overheads.
对于位图图像,文件大小(以比特计)等于三个因子的乘积:图像宽度(像素)、图像高度(像素)以及色彩深度(每像素比特数)。此公式不考虑元数据和压缩开销。
File size (bits) = width (px) × height (px) × colour depth (bpp)
-
Colour depth is the number of bits used to represent the colour of each pixel.
色彩深度是表示每个像素颜色所用的比特数。
-
To convert to bytes, divide by 8; to kB, divide by 8000 (or 8192 for KiB).
转换为字节则除以 8;转换为 kB 则除以 8000(或除以 8192 得到 KiB)。
Example: a 600 × 400 pixel photo with 24-bit colour depth requires 600 × 400 × 24 = 5,760,000 bits = 720,000 bytes ≈ 720 kB.
示例:一张 600 × 400 像素、24 位色彩深度的照片需要 600 × 400 × 24 = 5,760,000 比特 = 720,000 字节 ≈ 720 kB。
3. Sound File Size Formula | 声音文件大小公式
The size of an uncompressed digital audio file in bits equals the product of sample rate (Hz), bit depth (bits per sample), number of channels and duration (seconds).
未经压缩的数字音频文件大小(比特)等于采样率(赫兹)、比特深度(每样本比特数)、声道数和时长(秒)的乘积。
File size (bits) = sample rate (Hz) × bit depth × channels × time (s)
-
Sample rate is the number of samples per second, often 44,100 Hz for CD quality.
采样率即每秒采样次数,CD 品质通常为 44,100 Hz。
-
Bit depth is the number of bits per sample, e.g., 16-bit or 24-bit.
比特深度为每样本的比特数,例如 16 位或 24 位。
-
Stereo uses 2 channels; mono uses 1 channel.
立体声使用 2 声道;单声道使用 1 声道。
Example: 30 seconds of CD-quality stereo (44.1 kHz, 16-bit, 2 channels) uses 44,100 × 16 × 2 × 30 = 42,336,000 bits ≈ 5.29 MB.
示例:30 秒 CD 品质立体声 (44.1 kHz, 16 位, 2 声道) 需要 44,100 × 16 × 2 × 30 = 42,336,000 比特 ≈ 5.29 MB。
4. Text File Size & Character Encoding | 文本文件大小与字符编码
The size of a plain text file in bytes is roughly the number of characters multiplied by the number of bytes per character in the encoding scheme used, plus a small overhead for file headers.
纯文本文件的大小(字节)大致等于字符数乘以所用编码方案中每字符的字节数,外加少量的文件头开销。
| Encoding 编码 | Bits per char | Bytes per char |
| ASCII | 7 bits (extended 8) | 1 |
| Extended ASCII | 8 bits | 1 |
| UTF-8 (variable) | 8–32 bits | 1–4 |
| UTF-16 | 16 or 32 bits | 2 or 4 |
Example: 500 characters in extended ASCII = 500 bytes. In UTF-8 with only ASCII-range characters, also 500 bytes; with emoji or non-Latin scripts, the size increases.
示例:500 个字符使用扩展 ASCII 编码 = 500 字节。在仅包含 ASCII 范围字符的 UTF-8 中也为 500 字节;但若含有表情符号或非拉丁文字,体积增大。
5. Data Transmission Time | 数据传输时间
The time taken to transmit a file depends on the file size and the bit rate of the connection. The formula converts units to a common scale.
传输文件所需时间取决于文件大小和连接的比特率。公式将单位统一后进行换算。
Time (s) = File size (bits) ÷ Bit rate (bits per second)
-
Ensure file size is in bits; if given in bytes, multiply by 8.
确保文件大小以比特为单位;若以字节给出,乘以 8。
-
Common bit rates: 100 Mbps (100 × 10⁶ bps), 1 Gbps (1 × 10⁹ bps).
常见比特率:100 Mbps(100 × 10⁶ bps)、1 Gbps(1 × 10⁹ bps)。
Example: A 24 MB file over a 16 Mbps connection. 24 MB = 24 × 8 × 10⁶ = 192 Mbits. Time = 192 Mbits ÷ 16 Mbps = 12 seconds. (Note: using 1 MB = 10⁶ bytes, 1 Mbps = 10⁶ bps.)
示例:通过 16 Mbps 连接传输 24 MB 文件。24 MB = 24 × 8 × 10⁶ = 192 Mbits。时间 = 192 Mbits ÷ 16 Mbps = 12 秒。(注意:使用 1 MB = 10⁶ 字节,1 Mbps = 10⁶ bps。)
6. Boolean Algebra Laws | 布尔代数定律
Boolean algebra follows a set of identities used to simplify logic circuits. The variables A, B, C can be 0 or 1. The fundamental operators are AND (·), OR (+), and NOT (– or ¬).
布尔代数遵循一套恒等式,用于化简逻辑电路。变量 A、B、C 可取值 0 或 1。基本运算符为与 (·)、或 (+)、非(¬ 或 上方横线)。
| Law 定律 | AND form | OR form |
| Identity 恒等律 | A · 1 = A | A + 0 = A |
| Null 零律 | A · 0 = 0 | A + 1 = 1 |
| Idempotent 幂等律 | A · A = A | A + A = A |
| Complement 补余律 | A · ¬A = 0 | A + ¬A = 1 |
| Involution 双重否定 | ¬(¬A) = A | ¬(¬A) = A |
| Commutative 交换律 | A · B = B · A | A + B = B + A |
| Associative 结合律 | (A·B)·C = A·(B·C) | (A+B)+C = A+(B+C) |
| Distributive 分配律 | A·(B+C) = A·B + A·C | A + B·C = (A+B)·(A+C) |
| Absorption 吸收律 | A·(A+B) = A | A + A·B = A |
These laws are the foundation for reducing gate counts and simplifying expressions before producing a circuit diagram.
这些定律是在绘制电路图前减少门数量和化简表达式的基础。
7. De Morgan’s Theorems | 德摩根定理
De Morgan’s theorems describe how to express the complement of an AND operation as an OR of complements, and vice versa. They are essential for converting between NAND/NOR-only implementations.
德摩根定理描述如何将 AND 运算的补表示为补的 OR 运算,以及相反情况。这在转换为纯与非或纯或非实现时至关重要。
¬(A · B) = ¬A + ¬B
¬(A + B) = ¬A · ¬B
In words: the NOT of an AND equals the OR of the individual NOTs. The NOT of an OR equals the AND of the individual NOTs. These can be extended to multiple variables: ¬(A·B·C) = ¬A + ¬B + ¬C.
用语言表述:与运算的非等于各非的或运算。或运算的非等于各非的与运算。这些定理可推广至多个变量:¬(A·B·C) = ¬A + ¬B + ¬C。
Example: Simplify ¬(X · ¬Y). Using De Morgan: ¬X + ¬(¬Y) = ¬X + Y.
示例:化简 ¬(X · ¬Y)。使用德摩根定理:¬X + ¬(¬Y) = ¬X + Y。
8. Karnaugh Map (K-map) Simplification | 卡诺图化简
A Karnaugh map is a grid-based method for simplifying Boolean expressions with up to four variables visually, by grouping adjacent 1s in powers of two.
卡诺图是一种基于网格的方法,通过将相邻的 1 按 2 的幂次分组,直观地化简最多四个变量的布尔表达式。
-
Draw a K-map with cells labelled in Gray code order (e.g., 00, 01, 11, 10 for two variables).
绘制卡诺图,单元格按格雷码顺序标记(如两变量:00, 01, 11, 10)。
-
Enter 1s where the truth table output is 1. Group adjacent 1s into horizontal or vertical rectangles of size 1, 2, 4, 8, wrapping around the edges.
在真值表输出为 1 的位置填入 1。将相邻的 1 分组成 1、2、4、8 大小的水平或垂直矩形,可跨越边界。
-
Each group yields a product term where variables that change value within the group are eliminated.
每个分组产生一个乘积项,其中在组内发生变化的变量被消除。
-
The simplified expression is the sum (OR) of all group terms.
简化表达式为所有分组项的或。
Example: For expression F(A,B) = Σ(1,2,3), K-map grouping yields F = B + A. (Detailed working requires drawing the map; the result shows two groups of two cells each.)
示例:对于表达式 F(A,B) = Σ(1,2,3),卡诺图分组得到 F = B + A。(详细步骤需要画出图形;结果呈现两个各有两格的分组。)
9. Asymptotic Complexity – Big O Notation | 渐进复杂度 – 大 O 表示法
Big O notation expresses the upper bound of an algorithm’s time or space requirement as the input size n grows. It ignores constants and lower-order terms to describe how the resource scales.
大 O 表示法表示随着输入规模 n 增长,算法时间或空间需求的上界。它忽略常数和低阶项,描述资源的增长规模。
| Complexity 复杂度 | Notation | Meaning 含义 |
| Constant time 常数时间 | O(1) | Time stays same regardless of input size. 时间不随输入大小变化。 |
| Logarithmic 对数时间 | O(log n) | Grows very slowly; e.g., binary search. 增长极慢;如二分查找。 |
| Linear 线性时间 | O(n) | Time proportional to n. 时间与 n 成正比。 |
| Linearithmic | O(n log n) | Typical of efficient comparison sorts like merge sort. 高效比较排序的典型,如归并排序。 |
| Quadratic 平方时间 | O(n²) | Nested loop over all pairs; e.g., simple sorts. 对所有元素对的嵌套循环;如简单排序。 |
| Exponential 指数时间 | O(2ⁿ) | Very fast growth; avoid if possible. 增长极快;尽可能避免。 |
In Edexcel exams, you may be asked to identify the complexity of given pseudocode by counting loop operations and dropping constants.
在 Edexcel 考试中,可能要求通过计算循环操作并忽略常数,来确定给定伪代码的复杂度。
10. Sorting Algorithm Complexities | 排序算法复杂度
Sorting algorithms are compared by their best, average and worst-case time complexities, plus their space complexity. The table below summarises the key ones for the Edexcel syllabus.
排序算法通过其最佳、平均和最差时间复杂度以及空间复杂度进行比较。下表总结了 Edexcel 大纲中的关键算法。
| Algorithm 算法 | Best | Average | Worst | Space 空间 |
| Bubble Sort 冒泡排序 | O(n) | O(n²) | O(n²) | O(1) |
| Insertion Sort 插入排序 | O(n) | O(n²) | O(n²) | O(1) |
| Merge Sort 归并排序 | O(n log n) | O(n log n) | O(n log n) | O(n) |
| Quick Sort 快速排序 | O(n log n) | O(n log n) | O(n²) | O(log n) avg |
Remember: O(1) space means in-place sorting with only a constant number of extra variables. Merge sort needs additional memory proportional to n for merging.
请记住:O(1) 空间意味着原地排序,仅使用常量级额外变量。归并排序需要与 n 成比例的额外内存用于合并。
11. Search Algorithm Complexities | 搜索算法复杂度
Search algorithms locate a target within a data collection. Their efficiency depends on whether the data is sorted and the data structure used.
搜索算法在数据集合中定位目标元素。其效率取决于数据是否已排序以及所用的数据结构。
| Algorithm 算法 | Worst-case Time 最差时间 | Space 空间 | Requirement 前提 |
| Linear Search 线性搜索 | O(n) | O(1) | Data need not be sorted. 数据无需排序。 |
| Binary Search 二分搜索 | O(log n) | O(1) iterative, O(log n) recursive stack | Sorted array/list required. 需要排序数组/列表。 |
| Hash Table Lookup 哈希表查找 | O(1) avg, O(n) worst | O(n) | Good hash function, collision management. 良好哈希函数与冲突处理。 |
Binary search repeatedly divides the search space in half, making it exponentially faster on large datasets. However, it must operate on sorted data.
二分搜索不断将搜索空间减半,在大数据集上呈指数级加速。但它必须在排序数据上操作。
12. Number System Conversions & Checksums | 数制转换与校验和
Working with binary, denary and hexadecimal is fundamental. The formulas below give rapid manual conversion methods.
处理二进制、十进制和十六进制是基础。下列公式提供快速的手动转换方法。
Binary to Denary (n-bit unsigned): Sum of (bit at position i) × 2ⁱ, where i starts at 0 from the rightmost bit.
二进制转十进制(n 位无符号): 从右起第 i 位比特 × 2ⁱ 的总和,i 从 0 开始。
Denary to Binary: Repeatedly divide by 2 and record remainders (read from bottom to top).
十进制转二进制: 反复除以 2 并记录余数(从下往上读)。
Binary to Hex: Group bits in fours from the right, then convert each nibble to a hex digit (0-9, A-F).
二进制转十六进制: 从右边每四位分组,将每个半字节转换为十六进制数字 (0-9, A-F)。
Hex to Denary: Multiply each hex digit by 16^position (0 from right) and sum.
十六进制转十进制: 每个十六进制数字乘以 16^位权(从右0起)并求和。
Checksum and Check Digit: A simple verification value is obtained by summing data bytes (mod 256) or using a weighted sum (e.g., ISBN-13). The formula checks data integrity.
校验和与校验位: 通过求和数据字节(模 256)或加权和(如 ISBN-13)得到一个简单的验证值,用于检查数据完整性。
Example: Convert 1011 0101 binary to hex: 1011 = B, 0101 = 5 → B5h. To denary: 11×16 + 5 = 181.
示例:将二进制 1011 0101 转换为十六进制:1011 = B, 0101 = 5 → B5h。转换为十进制:11×16 + 5 = 181。
Published by TutorHao | Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导