📚 Speed-solving Techniques for Multiple Choice Questions in IB/Cambridge Computer Science | IB/CIE 计算机科学选择题秒杀技巧
Multiple-choice papers in IB and Cambridge (CIE) Computer Science are designed to test wide-ranging knowledge under time pressure. A clear set of mental shortcuts can dramatically improve both accuracy and speed. This article presents proven subject-specific shortcuts for number systems, logic, data structures, tracing, architecture, networking, databases, and recursion – each reinforced with paired explanations in English and Chinese.
IB 和剑桥(CIE)计算机科学的选择题旨在时间压力下考查广泛的知识点。掌握一套清晰的速解思路可以显著提升准确率和速度。本文针对数制、逻辑、数据结构、程序追踪、体系结构、网络、数据库和递归等关键领域,提供经过验证的学科特色速解技巧,每一条技巧均以中英双语对照讲解,帮助考生快速锁定正确答案。
1. Speedy Number Base Conversions | 数制转换快解
For binary-to-hex, split the binary string into nibbles (groups of 4 bits) from the right. Each nibble directly maps to one hex digit: 1010₂ is A, 1111₂ is F. Avoid full decimal conversion unless the question asks for it – direct grouping saves 30 seconds per question.
二进制转十六进制时,从右向左每4位分成一组(nibble),直接对应一个十六进制位:1010₂ 是 A,1111₂ 是 F。除非题目要求十进制,否则不要通过十进制中转——直接分组法每题可节省30秒。
For decimal to binary, use the repetitive division-by-2 method but read remainders bottom-to-top. However, for an MCQ, working backward from options by mentally converting each candidate back to decimal is often faster when the decimal number is small. For large numbers, look for boundary values: 128, 256, 512, 1024, etc.
十进制转二进制常用除2取余法,但做选择题时,若十进制数较小,从选项反推(心算每个选项对应的十进制)往往更快。遇上大数时,直接利用边界值(128、256、512、1024)快速排除。
For fractions, remember: 0.5₁₀ = 0.1₂, 0.25₁₀ = 0.01₂, 0.125₁₀ = 0.001₂. Combine these to build the required value without long multiplication.
十进制小数转二进制:记住 0.5₁₀ = 0.1₂,0.25₁₀ = 0.01₂,0.125₁₀ = 0.001₂,需要时直接组合,无需完整乘法过程。
2. Logic Gate Simplification Shortcuts | 逻辑门速简技巧
Immediately recognise gate equivalences. A NAND gate followed by an inverter is an AND; a NOR followed by an inverter is an OR. Two consecutive NAND gates can cancel inversions in certain feedback paths – draw a quick bubble-pushing diagram mentally.
一眼认出等价门:与非门后加非门等价于与门;或非门后加非门等价于或门。两个连续的与非门可以在一定反馈路径上相互抵消反相——在脑海中进行气泡前推即可。
When the circuit gives several interconnected NAND gates, apply De Morgan’s theorem directly on the bubble representation. The expression (A NAND B) NAND C simplifies to something closer to sum-of-products, often revealing the answer without writing a full truth table.
遇到多个与非门互连的电路,直接在气泡表示上应用德摩根定理。例如 (A NAND B) NAND C 可以快速转化为类似与或式的形式,往往不必写出完整真值表就能看出答案。
For multiple-choice items asking “which gate combination produces the same output”, test a single input pattern (e.g., 00, 01, 10) that differentiates the options. One discriminating pattern is often enough to eliminate three out of four choices.
面对”哪组门电路产生相同输出”的选择题,挑一个能区分选项的输入组合(如00、01、10)进行测试。一个具有区分能力的输入模式常常足以排除四个选项中的三个。
3. Boolean Algebra: Pattern Recognition | 布尔代数:模式识别速解
Spot absorption quickly: A + A·B = A, and A·(A + B) = A. If an option contains redundant terms while others are minimal, the redundant one is often a distractor. Conversely, when asked to simplify, immediately check if the original expression matches an absorption pattern.
快速识别吸收律:A + A·B = A,A·(A + B) = A。如果某个选项中包含多余项而其他选项是最简式,这个冗余项往往是干扰项。反过来,遇到化简题时,首先检查原表达式是否符合吸收律的模式。
Use De Morgan’s laws to convert complement bars. For example, (A·B)’ becomes A’ + B’. Mentally push the bar inward and change the operator. In multiple choice, compare the transformed expression with options rather than fully expanding every term.
用德摩根定律转换反变量。(A·B)’ 变为 A’ + B’。在心算中把反号推入并改变运算符。选择题中直接对比变换后的表达式与选项,无需完全展开所有项。
Karnaugh maps are rarely needed for small expressions (two or three variables). Instead, test with a single variable holding a constant (0 or 1) that simplifies the expression drastically. If the result does not match a given option, eliminate it.
对于两三个变量的小表达式,很少需要画卡诺图。取而代之的是将一个变量设为常量(0 或 1)使表达式大幅简化,然后快速验证结果是否与选项一致,不一致则排除。
4. Data Structure Operations (Stacks & Queues) | 数据结构操作(栈与队列)速判
For stack problems (LIFO), trace only the last few pushes and pops if the sequence is long. Many questions test whether a certain pop sequence is possible. Remember: if element X is popped before Y, Y must have been pushed after X or still deeper in the stack. A quick sanity check: no pop sequence can output an element that has not been pushed yet, and once popped, it cannot appear again.
栈(后进先出)问题中,若操作序列很长,只需跟踪最后几次压入和弹出。很多题目考查某个弹出序列是否合法。记住:若 X 在 Y 之前弹出,则 Y 必须在 X 之后压入或在栈中更深的位置。快速检验:弹出序列不能输出尚未压入的元素,且弹出后的元素不可能再次出现。
For queues (FIFO), output order is identical to input order. Any deviation suggests a priority queue or some other structure. When an MCQ asks “which structure yields this output”, check if the output follows strict FIFO; if not, rule out a standard queue immediately.
队列(先进先出)的输出顺序与输入顺序完全相同。任何差异都暗示可能是优先队列或其他结构。当选择题问“哪种结构产生此输出”时,先检查输出是否严格遵循 FIFO,若不是,立刻排除普通队列。
Circular queue index computations: (front + 1) MOD size or (rear + 1) MOD size. In an MCQ, simply plug given numbers into the formula and check which option gives the correct new pointer value; this avoids off-by-one errors.
循环队列索引计算:(front + 1) MOD size 或 (rear + 1) MOD size。在选择题中,直接把数字代入公式,看哪个选项给出正确的指针新值,避免“差一位”的错误。
5. Sorting Algorithm Identification by Behaviour | 排序算法行为快速辨别
Questions describing steps like “repeatedly swap adjacent out-of-order elements” point to bubble sort. “Find the minimum and place it at the front” is selection sort. “Pick a pivot and partition” is quicksort. Matching the verbal description to the algorithm name is the fastest route.
题目中若描述“反复交换相邻的乱序元素”即指向冒泡排序;“找出最小值放到最前面”是选择排序;“选取基准并划分”是快速排序。将文字描述与算法名称对应是最快的解题路线。
When asked about the state of an array after one or two passes, don’t trace the entire algorithm; simulate only the required number of passes mentally. For example, after one pass of bubble sort, the largest element is at the end. After one pass of selection sort, the smallest is at the front.
当题目问数组经过一两趟排序后的状态时,不必完整模拟全过程,只需心算所需趟数。例如,冒泡排序一趟后最大元素到达末尾;选择排序一趟后最小元素到达开头。
Stability checks: stable sorts (bubble, insertion, merge) preserve relative order of equal keys. If a sorted output changes the relative position of equal values from the original, the algorithm cannot be stable – a typical distractor trick.
稳定性检验:稳定排序(冒泡、插入、归并)保持相等键值的相对顺序。如果排序后的结果改变了原数组中相等值的相对位置,该算法不可能是稳定排序——这是典型的干扰项设置手法。
6. Program Tracing with Loops and Conditions | 循环与条件的程序追踪速解
Instead of tracing every iteration, identify the loop’s exit condition and the accumulation pattern. For a loop adding i while i < N, the final value is often the sum of an arithmetic progression. Learn to convert common loop patterns to closed-form results instantly.
不要逐步追踪每次迭代,而是识别循环退出条件和累加模式。例如,当 i < N 时累加 i 的循环,最终值通常是等差数列之和。学会把常见循环模式直接转化为封闭公式。
When variables are updated with assignments like x = x * 2, look for powers of two. If a loop runs k times, x becomes x₀ × 2ᵏ. MCQs often test exact exponent values; one off-by-one in the exponent is a common distractor.
当变量通过 x = x * 2 更新时,盯紧 2 的幂次。循环运行 k 次,则 x 变为 x₀ × 2ᵏ。选择题常考具体指数值,指数差 1 是常见干扰项。
Trace tables can be shortened by focusing only on the changing variable that appears in the question. For “what is the final value of count?”, track count alone, ignoring other auxiliary variables unless they influence count directly.
追踪表可以精简:只关注题目所问的变化变量。对于“count 最终值是多少”,仅追踪 count,忽略其他辅助变量,除非它们直接影响 count。
7. Computer Architecture: Addressing Modes Quick Check | 计算机体系结构:寻址方式快速判断
Immediate addressing: the operand is a constant in the instruction itself. Direct addressing: the instruction gives the memory address of the data. Indirect: the instruction points to a register or memory location that holds the address of the data. Indexed: an index register plus a base address.
立即寻址:操作数是指令中的常数。直接寻址:指令给出数据的内存地址。间接寻址:指令指向包含数据地址的寄存器或内存单元。变址寻址:变址寄存器加基地址。
When the question provides a diagram or table of memory values, use a simple mental walkthrough: follow the “address chain” exactly as the addressing mode does. Count how many memory accesses are needed: direct usually 1, indirect 2, indexed 2 (one for base+index calc, one for data).
当题目提供内存示意图或数值表时,按寻址方式心算“地址链”步骤。数一数需要多少次内存访问:直接寻址通常 1 次,间接寻址 2 次,变址寻址 2 次(一次计算基址+变址,一次取操作数)。
Register-based modes (register direct, register indirect) operate inside the CPU and are generally faster. If a question mentions “fastest access”, the mode with the least memory access (often register direct) wins.
基于寄存器的寻址方式(寄存器直接、寄存器间接)在 CPU 内部操作,通常更快。若题目提到“访问速度最快”,内存访问次数最少的(通常是寄存器直接)就是答案。
8. Networking: IP Addressing and Subnetting Shortcuts | 网络:IP 地址与子网划分速解
To find the network address, mentally apply the subnet mask in binary. A /24 (255.255.255.0) means the first three octets are the network. A /26 means 26 bits for network, leaving 6 bits for hosts. CIDR notation is faster: the prefix length tells you where the boundary lies.
计算网络地址时,心算应用子网掩码的二进制。 /24 (255.255.255.0) 表示前三个字节是网络部分。/26 表示 26 位网络位,剩余 6 位主机位。CIDR 记法更快:前缀长度直接告诉你分界在哪里。
Number of usable hosts = 2⁽³²⁻ᵖʳᵉᶠⁱˣ⁾ − 2 (excluding network and broadcast). For a /28, hosts = 2⁴ − 2 = 14. Quickly recognise powers of two: 2, 4, 8, 16, 32, 64, 128, 256 — subtract 2 and match to options.
可用主机数 = 2⁽³²⁻前缀长度⁾ − 2(排除网络地址和广播地址)。例如 /28 的主机数为 2⁴ − 2 = 14。快速回忆 2 的幂次:2、4、8、16、32、64、128、256,减去 2 后匹配选项。
If the question asks “are these two IPs in the same subnet?”, apply the subnet mask to the differing octet only. For a /24, compare the fourth octet? No, /24 uses third octet as network boundary; for /25 or /26, the division sits inside the fourth octet. Focus on the octet where the prefix crosses a byte boundary.
若题目问“两个 IP 是否在同一子网”,只需在掩码分界所在的字节上应用子网掩码。对于 /24,分界在第三字节;对于 /25 或 /26,分界落入第四字节。集中看前缀跨字节边界的那一个字节即可。
9. Database Normalisation: 1NF, 2NF, 3NF Rapid Check | 数据库规范化:1NF、2NF、3NF 快速判断
1NF: all attributes atomic, no repeating groups. If the table contains a field that stores multiple values (e.g., “Maths, Physics”), it violates 1NF. A single glance at commas inside a column is often enough to spot 1NF violation.
第一范式(1NF):所有属性原子化,无重复组。若表中某一字段包含多个值(如“数学, 物理”),即违反 1NF。只需一瞥,看到列内逗号即可判定非 1NF。
2NF: 1NF plus no partial dependency on a composite primary key. If a non-key attribute depends only on part of a composite key, the table is not 2NF. In MCQs, identify the primary key parts; then check if any non-key attribute relies on only one part of it.
第二范式(2NF):满足 1NF 且不存在对组合主键的部分依赖。若某非键属性只依赖于组合主键的一部分,则表格不符合 2NF。在选择题中,先确定主键的各部分,再检查是否有非键属性仅依赖于其中一部分。
3NF: 2NF plus no transitive dependency (non-key attribute depending on another non-key attribute). To spot this, look for a functional dependency among non-key columns. The classic school example: StudentID → Dormitory, Dormitory → Fee implies StudentID → Fee (transitive).
第三范式(3NF):满足 2NF 且无非键属性间的传递依赖。识别方法是观察两个非键列之间是否存在函数依赖。经典例子:学号 → 宿舍,宿舍 → 住宿费,则学号 → 住宿费为传递依赖。
Eliminating options: If the table has a single-attribute primary key, 2NF is automatically satisfied (no partial dependency possible). So only 1NF and 3NF need checking. This narrows choices quickly.
排除法:若表的主键是单属性,则 2NF 自动满足(不可能存在部分依赖),此时只需检查 1NF 和 3NF,快速缩小选项范围。
10. Recursive Function Evaluation without Full Tree | 递归函数求值:不必画出完整递归树
For linear recursion like factorial or Fibonacci, recognise the base case and unwind by applying the recurrence relation a limited number of steps mentally. For factorial(5), just build 5 × 4 × 3 × 2 × 1 = 120.
对于阶乘或斐波那契数列这类线性递归,只需明确基准情形,并在脑海中推演有限几步递推关系。比如 factorial(5),直接构建 5 × 4 × 3 × 2 × 1 = 120。
For a recursive function that prints before/after recursive calls, the sequence mirrors a tree traversal (pre-order, in-order, post-order). Identify which traversal it matches and apply its properties. For example, a post-order-like recursion prints children before the parent; the output order becomes predictable without tracing every call.
若递归函数在递归调用前后打印,其输出序列类似于树的遍历(先序、中序、后序)。识别出属于哪种遍历并利用其性质。例如,后序式递归会在父节点前打印子节点,输出顺序可预判,无需追踪每次调用。
Use mathematical induction reasoning: if f(0) = 1 and f(n) = 2 × f(n−1), then f(n) = 2ⁿ. MCQs often ask for f(6) or similar; computing 2⁶ = 64 is instantaneous once the closed form is identified.
运用数学归纳思维:若 f(0) = 1 且 f(n) = 2 × f(n−1),则 f(n) = 2ⁿ。选择题常求 f(6) 之类的值,一旦识别出闭合形式,计算 2⁶ = 64 即刻可得。
If the recursion contains multiple calls like f(n-1) + f(n-2), the pattern is Fibonacci. Count the number of calls for a small n (e.g., n=5) and match the total with options, but an even faster trick: remember that the number of recursive calls for naive Fibonacci grows roughly as O(2ⁿ), so the output value itself is a Fibonacci number; match it directly to the sequence 0,1,1,2,3,5,8,13…
若递归包含 f(n-1) + f(n-2) 这样的多重调用,即斐波那契模式。对小的 n(如 n=5)可数调用次数并匹配选项;但更快的技巧是记住简单斐波那契递归的返回值本身就是斐波那契数,直接匹配序列 0,1,1,2,3,5,8,13…即可。
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课程辅导,国外大学本科硕士研究生博士课程论文辅导