Year 10 CCEA Computer Science: Formula & Theorem Quick Reference | Year 10 CCEA 计算机:公式定理速查手册

📚 Year 10 CCEA Computer Science: Formula & Theorem Quick Reference | Year 10 CCEA 计算机:公式定理速查手册

This quick reference guide brings together the essential formulas, laws, and key theorems you will meet in the Year 10 CCEA Computer Science course. Use it to revise data representation, Boolean logic, data compression, networking calculations, and the efficiency of algorithms. Every formula is stated clearly, so you can check your understanding quickly before a test or while completing practice questions.

本手册汇集了 Year 10 CCEA 计算机科学课程中所有核心的公式、定律与定理,涵盖数据表示、布尔逻辑、数据压缩、网络传输计算以及算法效率等内容。每条公式都表述清晰,方便你在考试前或练习时快速查阅与核对。

1. Data Units & Storage Conversions | 数据单位与存储换算

The smallest unit of data is a bit (b). 8 bits make 1 byte (B). In the CCEA specification you need to convert confidently between bits, bytes, kilobytes (KB), megabytes (MB), gigabytes (GB) and terabytes (TB). Two numbering systems are used: decimal (powers of 10) for storage marketed to consumers and binary (powers of 2) for memory capacities actually used by the computer.

数据的最小单位是比特(bit, b),8 个比特组成 1 个字节(Byte, B)。CCEA 课程要求你熟练地在比特、字节、千字节(KB)、兆字节(MB)、吉字节(GB)和太字节(TB)之间进行换算。换算时会遇到两种进制:消费者标称存储容量使用的十进制(10 的幂)和计算机实际寻址使用的二进制(2 的幂)。

  • Decimal conversions: 1 KB = 10³ B = 1000 B, 1 MB = 10⁶ B, 1 GB = 10⁹ B, 1 TB = 10¹² B.

    十进制换算:1 KB = 10³ B = 1000 B,1 MB = 10⁶ B,1 GB = 10⁹ B,1 TB = 10¹² B。

  • Binary conversions (often written as KiB, MiB etc.): 1 KiB = 2¹⁰ B = 1024 B, 1 MiB = 2²⁰ B ≈ 1.05 million B, 1 GiB = 2³⁰ B, 1 TiB = 2⁴⁰ B.

    二进制换算(常写作 KiB、MiB 等):1 KiB = 2¹⁰ B = 1024 B,1 MiB = 2²⁰ B ≈ 1.05 × 10⁶ B,1 GiB = 2³⁰ B,1 TiB = 2⁴⁰ B。


2. Binary-Decimal Conversions | 二进制与十进制转换

Computers store all data as binary numbers (base‑2). To convert a binary number to denary (base‑10), add the place values of columns that contain a 1. The place values from right to left are powers of 2: 2⁰=1, 2¹=2, 2²=4, 2³=8, 2⁴=16, 2⁵=32, 2⁶=64, 2⁷=128 for an 8‑bit number.

计算机以二进制(基数为 2)存储所有数据。将二进制转换为十进制(基数为 10)时,只需要把每一位 1 对应的权值相加即可。8 位二进制数从右向左的权值依次是 2 的幂:2⁰=1,2¹=2,2²=4,2³=8,2⁴=16,2⁵=32,2⁶=64,2⁷=128。

To convert denary to binary, repeatedly divide the denary number by 2, record the remainder (0 or 1) each time, and read the remainders in reverse order.

将十进制转换为二进制时,则用十进制数反复除以 2,依次记录余数(0 或 1),然后从下向上逆序读出即为二进制结果。


3. Hexadecimal Conversions | 十六进制转换

Hexadecimal (base‑16) uses digits 0–9 and letters A–F (A=10, B=11, C=12, D=13, E=14, F=15). It is widely used to represent binary values in a shorter, more readable form, especially for colour codes and memory addresses. One hex digit represents exactly 4 bits (a nibble).

十六进制(基数为 16)使用数字 0–9 和字母 A–F(A=10,B=11,C=12,D=13,E=14,F=15)。它常用于以更简洁的形式表示二进制数值,例如颜色码和内存地址。每个十六进制位恰好对应 4 个二进制位(一个半字节)。

To convert binary to hex, split the binary number into groups of 4 bits from the right, then replace each group with its hex equivalent. Denary to hex can be done by repeated division by 16 and reading remainders in reverse, or by converting to binary first.

二进制转十六进制:从右向左每 4 位一组进行划分,再将每组替换为对应的十六进制符号。十进制转十六进制可以通过不断除以 16 取余数后逆序读取实现,也可以先转换为二进制再分组转换。


4. Binary Arithmetic & Shifts | 二进制算术与移位

Binary addition follows the same principles as denary addition: 0+0=0, 0+1=1, 1+0=1, 1+1=0 carry 1, and 1+1+1=1 carry 1. When a result exceeds the number of available bits, an overflow error occurs. The computer stores the extra carry in an overflow flag.

二进制加法遵循与十进制加法相同的规则:0+0=0,0+1=1,1+0=1,1+1=0 进位 1,1+1+1=1 进位 1。当运算结果超出可用的位宽时,会发生溢出错误,计算机将此进位存储在溢出标志中。

Logical shifts move bits left or right, filling the vacant positions with zeros. Left shifting by n places multiplies an unsigned binary number by 2ⁿ; right shifting divides by 2ⁿ (ignoring remainders). These shifts are used in multiplication and division of integers at low level.

逻辑移位将二进制数向左或向右移动,空出的位用 0 填充。左移 n 位相当于将无符号二进制数乘以 2ⁿ;右移 n 位相当于除以 2ⁿ(舍去余数)。这类移位操作用于低层整数乘除运算。


5. Image File Size Formula | 图像文件大小公式

For bitmap images, file size depends on resolution (width × height in pixels) and colour depth (bits per pixel). The formula is:

Image file size (bits) = width (px) × height (px) × colour depth (bpp)

Convert bits to bytes by dividing by 8; further convert to KB, MB etc. as needed. If the image has more than one layer, multiply by the number of layers. Colour depth determines how many distinct colours can be represented: 1 bpp → 2 colours, 8 bpp → 256 colours, 24 bpp → about 16.7 million colours.

位图图像的文件大小取决于分辨率(宽度 × 高度,单位为像素)和色深(每像素位数,bpp)。公式为:

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

将比特除以 8 得到字节,再进一步转换为 KB、MB 等。若图像包含多个图层,还需乘以图层数量。色深决定了能表示的颜色数:1 bpp 可显示 2 种颜色,8 bpp 可显示 256 种颜色,24 bpp 可显示约 1670 万种颜色。


6. Sound File Size Formula | 声音文件大小公式

Sound is captured by sampling the analogue wave at regular intervals. Three factors affect file size:

Sound file size (bits) = sample rate (Hz) × bit depth (bits) × duration (s) × number of channels

Common sample rates are 44.1 kHz (CD quality) and 48 kHz (professional video). Bit depth is usually 16 or 24 bits. Stereo sound has 2 channels. Always express sample rate in Hz (1 kHz = 1000 Hz) and duration in seconds when calculating.

声音通过固定时间间隔对模拟波形进行采样来数字化。文件大小取决于三个因素:

声音文件大小(比特)= 采样率(Hz) × 采样位数(bit) × 时长(s) × 声道数

常见的采样率有 44.1 kHz(CD 音质)和 48 kHz(专业视频)。采样位数通常为 16 或 24 位。立体声包含 2 个声道。计算时务必把采样率转换为 Hz(1 kHz = 1000 Hz),时长转换为秒。


7. Boolean Logic Laws & Theorems | 布尔逻辑定律与定理

Boolean algebra works with binary variables (0 or 1). The three basic operators are AND (conjunction, ∧), OR (disjunction, ∨) and NOT (negation, ¬). Several laws allow you to simplify logic expressions—essential for reducing the number of gates in a circuit.

布尔代数处理二进制变量(0 或 1)。三个基本运算符是 与(合取,∧)、或(析取,∨)和 非(否定,¬)。掌握以下定律可以帮你化简逻辑表达式,从而减少电路中使用门电路的数量。

  • Identity: A ∧ 1 = A, A ∨ 0 = A

    恒等律:A ∧ 1 = A,A ∨ 0 = A

  • Null element: A ∧ 0 = 0, A ∨ 1 = 1

    零一律:A ∧ 0 = 0,A ∨ 1 = 1

  • Idempotent: A ∧ A = A, A ∨ A = A

    幂等律:A ∧ A = A,A ∨ A = A

  • Complement: A ∧ ¬A = 0, A ∨ ¬A = 1

    互补律:A ∧ ¬A = 0,A ∨ ¬A = 1

  • Double negation: ¬(¬A) = A

    双重否定律:¬(¬A) = A

  • Commutative: A ∧ B = B ∧ A, A ∨ B = B ∨ A

    交换律:A ∧ B = B ∧ A,A ∨ B = B ∨ A

  • Distributive: A ∧ (B ∨ C) = (A ∧ B) ∨ (A ∧ C) and A ∨ (B ∧ C) = (A ∨ B) ∧ (A ∨ C)

    分配律:A ∧ (B ∨ C) = (A ∧ B) ∨ (A ∧ C) 以及 A ∨ (B ∧ C) = (A ∨ B) ∧ (A ∨ C)

  • De Morgan’s laws: ¬(A ∧ B) = ¬A ∨ ¬B, ¬(A ∨ B) = ¬A ∧ ¬B

    德·摩根定律:¬(A ∧ B) = ¬A ∨ ¬B,¬(A ∨ B) = ¬A ∧ ¬B


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

Logic circuits are built from gates that implement Boolean functions. You must be able to draw their symbols and recall the truth tables for AND, OR, NOT, NAND, NOR and XOR gates (CCEA also uses EOR for Exclusive‑OR).

逻辑电路由实现布尔函数的门电路构成。你需要能够画出 AND、OR、NOT、NAND、NOR 和 XOR(CCEA 也使用 EOR 表示异或)的门电路符号,并默写它们的真值表。

Gate Symbol/Expression Truth Table Summary
AND A ∧ B Output 1 only when A=1 AND B=1
OR A ∨ B Output 1 when A=1 OR B=1 (or both)
NOT ¬A Inverts the input (1→0, 0→1)
NAND ¬(A ∧ B) Opposite of AND; output 0 only when both inputs are 1
NOR ¬(A ∨ B) Opposite of OR; output 1 only when both inputs are 0
XOR/EOR A ⊕ B Output 1 when inputs differ (exactly one input is 1)

9. Data Compression Ratio | 数据压缩率

Compression reduces file size. Lossless compression (e.g. run‑length encoding, Huffman coding) allows exact reconstruction of the original data; lossy compression (e.g. JPEG, MP3) discards some information to achieve higher compression. The compression ratio helps you measure the effectiveness.

压缩可以减小文件体积。无损压缩(如游程编码、霍夫曼编码)能够完全还原原始数据;有损压缩(如 JPEG、MP3)会舍弃部分信息以获取更高的压缩率。压缩率可用来衡量压缩效果。

Compression ratio = (uncompressed size − compressed size) / uncompressed size × 100%

Alternatively, you may see compression ratio expressed as a ratio, e.g. 4:1, meaning the compressed file is one quarter of the original size.

压缩率 = (未压缩大小 − 压缩后大小) / 未压缩大小 × 100%

此外,有时也用比值表示,例如 4:1 表示压缩后文件大小是原始大小的四分之一。


10. Network Transmission Time | 网络传输时间

When data travels across a network, the time taken depends on the amount of data and the transmission speed. The basic formula is:

Transmission time (s) = Data size (bits) / Transfer rate (bits per second, bps)

Always make sure the units match: if file size is given in megabytes, convert to megabits (×8 first if starting from bytes, then to bits) and ensure the transfer rate is in bits per second. Common units for transfer rate are bps, kbps (1000 bps), Mbps (1000 kbps) and Gbps.

数据在网络中传输时,所需时间由数据量和传输速率决定。基本公式为:

传输时间(秒) = 数据大小(bit) / 传输速率(bps,每秒比特数)

务必保持单位一致:若文件大小以兆字节给出,需先转换为兆比特(从字节开始先×8,再转为比特),并确保传输速率也是每秒比特数。常用的速率单位有 bps、kbps(1000 bps)、Mbps(1000 kbps)和 Gbps。


11. Algorithm Efficiency (Big O Notation) | 算法效率(大O记号)

The efficiency of an algorithm is described by how its run time or memory usage grows as the input size (n) increases. Big O notation gives an upper bound on this growth. In Year 10 CCEA you will meet simple time complexities when comparing searching and sorting algorithms.

算法的效率通过运行时间或内存占用的增长速度随输入规模(n)的变化来描述。大O记号给出了这种增长的上限。在Year 10 CCEA 中,你在比较搜索和排序算法时会接触到简单的时间复杂度。

  • O(1) — constant time: algorithm takes the same time regardless of n, e.g. accessing an array element by index.

    O(1)——常数时间:无论 n 多大,运行时间不变,例如通过索引访问数组元素。

  • O(log n) — logarithmic time: very efficient, performance grows slowly as n increases, e.g. binary search.

    O(log n)——对数时间:效率很高,n 增大时运行时间增长缓慢,例如二分查找。

  • O(n) — linear time: time grows proportionally with n, e.g. linear search.

    O(n)——线性时间:运行时间与 n 成正比,例如线性搜索。

  • O(n²) — quadratic time: time squares as n doubles, e.g. bubble sort and insertion sort in the worst case.

    O(n²)——平方时间:n 加倍时运行时间约变为原来的 4 倍,例如冒泡排序和插入排序的最坏情况。


12. Search & Sort Algorithms – Key Facts | 搜索与排序算法关键事实

Linear search checks each element in turn until the target is found (or the list ends). Maximum comparisons: n. Use it on unsorted lists.

线性搜索逐个检查列表中的元素直到找到目标(或遍历整个列表)。最大比较次数:n 次。适用于未排序的列表。

Binary search requires a sorted list. It repeatedly divides the search interval in half. Maximum comparisons: log₂n (rounded up). It is far more efficient on large, sorted datasets.

二分查找要求列表已排序。它反复将搜索区间一分为二。最大比较次数:log₂n(向上取整)。对于大型已排序数据集,其效率远高于线性搜索。

Bubble sort repeatedly steps through the list, compares adjacent items and swaps them if they are in the wrong order. After each pass the largest unsorted element ‘bubbles’ to its correct position. Maximum passes: n−1; worst‑case comparisons: ½n(n−1).

冒泡排序反复遍历列表,比较相邻元素并在顺序错误时交换它们。每一轮遍历后,未排序部分的最大元素会“浮”到正确的位置。最大遍历轮次:n−1;最坏情况下的比较次数:½n(n−1)。

Merge sort is a ‘divide and conquer’ algorithm that splits the list into halves, recursively sorts each half, then merges them. Its worst‑case time complexity is O(n log n), much better than bubble sort for large n.

归并排序是一种“分治法”算法:将列表递归地对半分割、排序,再合并。其最坏情况时间复杂度为 O(n log n),对于大规模数据远比冒泡排序高效。

Insertion sort builds the final sorted list one item at a time by inserting each new item into its correct position among the already sorted elements. It works well for nearly sorted lists.

插入排序通过将每一个新元素插入到已排序部分的正确位置,逐步构建有序列表。对于基本有序的列表,它的表现很好。


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

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

Comments

屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from aleveler.com

Subscribe now to keep reading and get access to the full archive.

Continue reading