📚 PDF资源导航

Common Mistakes in IB/AQA Computer Science Exams: A Focused Review | IB/AQA 计算机:易错题精讲

📚 Common Mistakes in IB/AQA Computer Science Exams: A Focused Review | IB/AQA 计算机:易错题精讲

Even well-prepared students can stumble on certain topics in IB and AQA Computer Science exams. This article targets the most frequently misunderstood concepts—from logic gates and binary arithmetic to recursion and object-oriented design—explaining exactly where candidates lose marks and how to avoid typical pitfalls. Each section pairs a concise English explanation with a Chinese translation, ensuring clarity for bilingual learners.

即使是准备充分的学生,在 IB 和 AQA 计算机科学考试中也常常会在某些知识点上栽跟头。本文聚焦最容易被误解的概念——从逻辑门、二进制运算到递归和面向对象设计——精准剖析考生在哪里丢分以及如何避开典型陷阱。每个要点都配有简明的中英文对照,确保双语学习者都能清晰理解。

1. Logic Gate Confusions: AND vs. NAND | 逻辑门混淆:与门 vs. 与非门

A common mistake is assuming a NAND gate simply inverts the AND output, but many students incorrectly draw its truth table. Remember: an AND gate outputs 1 only when all inputs are 1; a NAND gate outputs 0 only in that same condition. The error often appears when combining gates into circuits, leading to wrong Boolean expressions. Always double-check intermediate outputs when simplifying logic diagrams.

一个常见错误是以为与非门只是将“与”输出取反,但很多学生在画其真值表时却出错。记住:与门只有在所有输入都为 1 时才输出 1;与非门则恰好是在这种情况下输出 0。当把多个门组合成电路时,这个错误经常导致布尔表达式错误。在化简逻辑图时,务必仔细核对每个中间输出。


2. Binary Addition and Overflow | 二进制加法与溢出

Students often forget to handle the carry bit correctly when adding binary numbers, or they misinterpret overflow. For example, adding 1010₂ + 0110₂ yields 10000₂, which requires an extra bit. In an 8-bit register, this results in overflow and the carry flag being set. Mistaking overflow for a simple mistake in addition loses marks in topics like processor architecture and two’s complement.

学生在二进制加法时经常忘记正确处理进位,或者误读溢出。例如,1010₂ + 0110₂ 得到 10000₂,这需要额外的一位。在 8 位寄存器中,这会导致溢出并使进位标志置位。把溢出当作简单的加法错误,会在处理器架构和二进制补码等题目中丢分。


3. Two’s Complement Sign Extension | 二进制补码的符号扩展

When converting a negative two’s complement number to a wider bit-width, many candidates just add zeros on the left, destroying the value. The correct method is to copy the sign bit (the leftmost bit) into all the new higher positions. For instance, the 4-bit number 1110₂ (-2) extended to 8 bits becomes 11111110₂, not 00001110₂. This concept is critical for AQA’s data representation questions.

当把负数的二进制补码扩展到更宽的位宽时,许多考生只在左侧补零,从而破坏了数值。正确方法是把符号位(最左位)复制到所有新增的高位。例如,4 位的 1110₂(-2)扩展到 8 位后应为 11111110₂,而不是 00001110₂。这个概念在 AQA 的数据表示题中至关重要。


4. Recursion: Missing Base Case | 递归:缺少基准情形

A frequent programming error is writing a recursive function without a proper base case, or placing the base case after the recursive call. This leads to infinite recursion and stack overflow. In IB exams, tracing such flawed code often reveals a failure to terminate. Always ensure the base case is tested first and that each recursive step converges toward it.

一个常见的编程错误是编写递归函数时缺少合适的基准情形,或者把基准情形放在递归调用之后。这会导致无限递归和栈溢出。在 IB 考试中,跟踪这类有缺陷的代码常常会发现无法终止。务必确保先测试基准情形,并且每次递归调用都向它收敛。


5. Object-Oriented Inheritance vs. Composition | 面向对象的继承与组合混淆

Students often misuse inheritance when composition would be more appropriate. The classic test: does a subclass truly represent a “is-a” relationship? Many force an “has-a” relationship into an extends clause, causing fragile designs. In IB and AQA scenarios, carefully read the problem; if the relationship is “Car has an Engine,” use composition (a field), not inheritance. Misapplying inheritance can result in lost marks in design questions.

学生经常在应该使用组合时误用继承。经典检验是:子类是否真的体现“是一种”关系?许多人强行把“有一个”关系塞进 extends 子句中,导致设计脆弱。在 IB 和 AQA 的场景题中,仔细审题;如果关系是“汽车有一个发动机”,就用组合(成员字段),而不是继承。错误使用继承会在设计题中丢分。


6. Sorting Algorithms: Bubble vs. Merge | 排序算法:冒泡与归并的细节

Many candidates confuse the time complexity of bubble sort (O(n²)) with merge sort (O(n log n)), but more subtle errors arise when tracing a partially sorted pass. In bubble sort, after the i-th pass, the i largest elements are in their final positions; students often misapply this property. Also, when implementing merge sort, forgetting to copy the remaining elements of the left/right subarrays is a classic bug.

许多考生混淆冒泡排序 (O(n²)) 和归并排序 (O(n log n)) 的时间复杂度,但更隐蔽的错误出现在跟踪部分排序趟时。在冒泡排序中,第 i 趟之后,最大的 i 个元素已经处于最终位置;学生常常用错这个性质。此外,实现归并排序时,忘记复制左/右子数组中剩余的元素是一个经典错误。


7. SQL Join Conditions and Nulls | SQL 连接条件与空值

AQA and IB both include database queries. A typical mistake is using INNER JOIN when a LEFT JOIN is needed to preserve all records from one table, or omitting the ON clause entirely, producing a Cartesian product. Also, comparing with NULL using = always yields UNKNOWN; you must use IS NULL. Students lose easy marks by incorrect join logic or missing NULL checks.

AQA 和 IB 都涉及数据库查询。一个典型错误是在需要保留一张表所有记录时使用了 INNER JOIN 而不是 LEFT JOIN,或者完全漏掉 ON 子句而产生笛卡尔积。另外,用 = 比较 NULL 总是得到 UNKNOWN;必须使用 IS NULL。错误的连接逻辑或缺少 NULL 检查会让考生白白丢分。


8. Floating Point Precision and Normalisation | 浮点精度与规范化

When converting real numbers to binary floating point, students often forget to normalise the mantissa correctly or do not account for the limited bits in the mantissa leading to truncation error. In IB, explaining why 0.1₁₀ cannot be represented exactly in binary is a common question. The error is repeatedly multiplying the fraction by 2 but forgetting to stop after the given number of bits, or failing to show the rounding needed.

在把实数转换为二进制浮点数时,学生常常忘记正确规范尾数,或者没有考虑尾数位数有限导致的截断误差。在 IB 中,解释为什么 0.1₁₀ 不能精确用二进制表示是一个常见问题。错误在于反复将小数部分乘以 2 却忘了在给定位数后停止,或者没有展示所需的舍入。


9. TCP/IP Layers and Encapsulation | TCP/IP 分层与封装

Networking questions often require describing how data moves through the TCP/IP layers. A classic error is confusing the names of the Protocol Data Units (PDUs): at the transport layer it is a segment, at the network layer a packet, at the data link layer a frame. Another mistake is thinking that the physical layer adds a header—it does not; it just transmits bits. Getting the encapsulation order wrong (adding headers from top down, stripping from bottom up) loses marks.

网络题目经常要求描述数据如何在 TCP/IP 层中传输。一个经典错误是混淆协议数据单元的名称:传输层是段,网络层是包,数据链路层是帧。另一个错误是以为物理层会添加报头——它不添加,它只传输比特。搞错封装顺序(从上层往下添加报头,从下层往上剥离)会丢分。


10. Big O Notation and Practical Code Analysis | 大 O 表示法与代码实际分析

A common pitfall is giving the worst-case time complexity for an algorithm without considering that the question might ask for average case, or misanalysing nested loops. For example, a nested loop where the inner loop runs log n times yields O(n log n), but students often write O(n²) without thinking. Also, in IB pseudocode, remember that accessing an element in an array by index is O(1), not O(n), which many incorrectly assume.

一个常见陷阱是在题目可能要求平均情况时给出了最坏情况时间复杂度,或者错误分析嵌套循环。例如,外层循环 n 次,内层循环运行 log n 次,结果是 O(n log n),但学生往往不假思索就写上 O(n²)。此外,在 IB 伪代码中,记住通过索引访问数组元素是 O(1) 而不是 O(n),很多人错误地认为后者。


11. Finite State Machines: Missing Transitions | 有限状态机:遗漏转换

When constructing a state diagram, candidates often forget to define what happens for all possible inputs in each state. In a fully specified FSM, every state must have a transition for each symbol in the alphabet. A common error is leaving some combinations undefined, especially when the design should handle invalid inputs with an error state. This is frequently penalised in AQA’s theory of computation questions.

在构建状态图时,考生常常忘记为每个状态的所有可能输入都定义动作。在一个完全确定的有限状态机中,每个状态对字母表中的每个符号都必须有一个转换。常见错误是有些组合未定义,特别是当设计应该用错误状态处理无效输入时。这在 AQA 的计算理论题中常常被扣分。


12. Assembly Language: Direct vs. Immediate Addressing | 汇编语言:直接寻址与立即寻址的混淆

In AQA’s assembly code questions, mixing up operand types causes entire programs to fail. LDR R1, #5 loads the immediate value 5, while LDR R1, 5 loads the contents of memory location 5. A similar mistake is using a value as an address when it should be a literal, or forgetting to use square brackets for indirect addressing. Carefully check the instruction set and addressing modes provided in the exam.

在 AQA 的汇编代码题中,混淆操作数类型会导致整个程序错误。LDR R1, #5 加载立即数 5,而 LDR R1, 5 加载内存地址 5 中的内容。类似的错误是把数值当地址使用,或者忘记在间接寻址时使用方括号。务必仔细核对考试提供的指令集和寻址模式。

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