📚 A-Level WJEC Computer Science: Past Paper Question Analysis | A-Level WJEC 计算机科学:历年真题解析
This article breaks down typical past paper questions from the WJEC A-Level Computer Science specification, offering model answers, common pitfalls, and exam technique advice. By working through these examples, you will strengthen your understanding of core topics such as data representation, Boolean logic, data structures, algorithms, programming, and systems architecture.
本文拆解了 WJEC A-Level 计算机科学考试中的典型真题,提供标准答案、常见误区与应试技巧。通过演练这些例题,你将加深对数据表示、布尔逻辑、数据结构、算法、编程和系统架构等核心主题的理解。
1. Binary and Hexadecimal Conversions | 二进制与十六进制转换
A common question asks you to convert the binary number 11010110₂ into hexadecimal. Start by splitting the binary digits into nibbles (groups of four) from the right: 1101 0110. Then convert each nibble separately: 1101₂ = D₁₆ and 0110₂ = 6₁₆, so the answer is D6₁₆. Always show your working and add the base subscript for clarity.
常见考题要求将二进制数 11010110₂ 转换为十六进制。首先从右向左将二进制位分成半字节(每组四位):1101 0110。然后分别转换每个半字节:1101₂ = D₁₆,0110₂ = 6₁₆,因此答案为 D6₁₆。务必展示步骤,并加上基数下标以清晰表达。
Reverse conversions follow the same principle: hex digit → 4-bit binary. For instance, 3F₁₆ becomes 0011 1111₂. Avoid dropping leading zeros when writing the full byte.
反向转换遵循相同原理:十六进制数字→4位二进制。例如,3F₁₆ 变为 0011 1111₂。写出完整字节时切忌省略前导零。
2. Binary Addition and Overflow | 二进制加法与溢出
WJEC often sets a binary addition such as 10101010₂ + 01110001₂. Align the bits, add from right to left, carrying where the sum exceeds 1. The result here is 100011011₂. Since we are working with 8‑bit registers, the 9‑bit result indicates an overflow error. Overflows occur when the sum falls outside the representable range for the given number of bits.
WJEC 常出二进制加法题,如 10101010₂ + 01110001₂。对齐各位,从右至左相加,和超过1时进位。结果为 100011011₂。因为使用8位寄存器,9位结果表示发生溢出错误。当和超出给定位数所能表示的范围时,即发生溢出。
Exam tip: explicitly state that an overflow flag would be set in the status register. Check the context – signed two’s complement addition has specific overflow rules (carry into sign bit ≠ carry out).
应试技巧:明确说明状态寄存器中的溢出标志将被置位。注意上下文——带符号的二进制补码加法有特定的溢出规则(进位入符号位 ≠ 进位出符号位)。
3. Boolean Algebra and Logic Gates | 布尔代数与逻辑门
A typical question provides a logic circuit and asks for the Boolean expression and truth table. For a circuit comprising an AND gate followed by a NOT gate, the expression is Q = ¬(A ∧ B). Simplify using De Morgan’s law: ¬(A ∧ B) ≡ ¬A ∨ ¬B. You may also be required to draw the equivalent NAND‑only circuit.
典型题目给出一个逻辑电路,要求写出布尔表达式和真值表。对于由与门后接非门组成的电路,表达式为 Q = ¬(A ∧ B)。使用德摩根定律化简:¬(A ∧ B) ≡ ¬A ∨ ¬B。也可能要求绘制仅用与非门实现的等效电路。
When constructing truth tables, list all input combinations in binary counting order (00, 01, 10, 11) and compute output columns step by step. Always label intermediate columns if the expression is complex.
构建真值表时,按二进制计序(00, 01, 10, 11)列出所有输入组合,并逐步计算各输出列。若表达式复杂,务必标注中间列。
4. Karnaugh Maps | 卡诺图
A Karnaugh map question supplies a truth table or minterms and asks you to derive a minimal sum‑of‑products expression. For a 3‑variable map with cells representing minterms 0,2,4,6, you should group the four corners. The resulting simplified expression is often just C’. Be systematic: circle the largest possible power‑of‑two groups, ensuring they overlap if it leads to a simpler formula.
卡诺图题目给出真值表或最小项列表,要求推导最简积之和表达式。对于代表最小项 0,2,4,6 的三变量方格,应将四个角圈为一组。得到的简化表达式通常仅为 C’。务必系统化:圈出尽可能大的 2 的幂次组合,若重叠能进一步简化公式则允许重叠。
Don’t forget to write final expression in the required format, and check for static hazards if the specification requires it. WJEC may ask you to compare the gate cost before and after simplification.
不要忘记按要求的格式写出最终表达式,若考纲要求则检查静态冒险。WJEC 可能会要求比较简化前后的门成本。
5. Data Structures: Stacks and Queues | 数据结构:栈和队列
Questions on abstract data types often describe a scenario, such as an interrupt service routine, and ask you to justify the use of a stack. A stack uses LIFO (last‑in first‑out) behaviour: push() and pop() operations act on the top. This suits subroutine call/return address storage because the most recent call must be returned from first.
抽象数据类型相关题目往往描述一个场景,如中断服务程序,要求说明使用栈的理由。栈采用后进先出(LIFO)行为:push() 和 pop() 操作作用在栈顶。这适合子程序调用/返回地址的存储,因为最近调用的子程序必须最先返回。
A queue, by contrast, is FIFO (first‑in first‑out) and is ideal for printer spooling or keyboard buffers. Trace table questions: simulate enqueue and dequeue operations with a circular array and maintain front/rear pointers.
相比之下,队列是先进先出(FIFO),非常适合打印机假脱机或键盘缓冲区。跟踪表演练:用循环数组模拟入队和出队操作,并维护前/后指针。
6. Sorting Algorithms: Bubble Sort and Quick Sort | 排序算法:冒泡排序和快速排序
Past papers often ask you to complete a bubble sort trace on a short list, e.g. [6, 2, 8, 4, 5]. Compare adjacent pairs and swap if out of order; after the first pass the largest element bubbles to the end. Continue until no swaps occur. Bubble sort has O(n²) time complexity.
真题常要求对一个短列表完成冒泡排序跟踪,如 [6, 2, 8, 4, 5]。比较相邻元素对,若顺序错误则交换;第一趟后最大元素会冒泡至末尾。持续进行直至无交换发生。冒泡排序的时间复杂度为 O(n²)。
For quick sort, you may be asked to show the partitioning step. Choose the first element as pivot, rearrange elements so those less than pivot are on the left, greater on the right, then recursively sort sub‑arrays. Explain why average time is O(n log n) but worst case is O(n²).
对于快速排序,可能要求展示划分步骤。选择首元素为枢纽,重排元素使小于枢纽者居左,大于者居右,然后递归排序子数组。需解释为何平均时间为 O(n log n) 但最坏情况为 O(n²)。
7. Finite State Machines | 有限状态机
A state transition diagram for a vending machine typically asks you to identify states (e.g. S0: waiting for coin, S1: 10p inserted, S2: 20p inserted) and transitions triggered by inputs (coin inserted, button pressed). You may need to complete a state table and then write a Boolean expression for the next‑state flip‑flop inputs if using D‑type flip‑flops.
自动售货机的状态转换图通常会要求识别状态(如 S0:等待投币,S1:已投 10 便士,S2:已投 20 便士)以及由输入(投币、按钮按下)触发的转换。可能需要补全状态表,进而在使用 D 型触发器时写出次态触发器的布尔表达式。
Be careful with Mealy vs. Moore interpretations. In WJEC, outputs are often associated with states (Moore) unless indicated otherwise. Label arcs clearly with input (and output if Mealy).
注意区分 Mealy 型和 Moore 型的理解。在 WJEC 中,除非特别说明,输出通常与状态关联(Moore 型)。清晰地用输入(若为 Mealy 型还需输出)标记弧线。
8. Computer Architecture and the Fetch‑Decode‑Execute Cycle | 计算机体系结构与取指-译码-执行周期
Questions on the FDE cycle require a step‑by‑step description of what happens inside the CPU. Use accurate register names: Program Counter (PC), Memory Address Register (MAR), Memory Data Register (MDR), Current Instruction Register (CIR), and Accumulator. Explain how the PC is incremented after the fetch stage.
关于取指-译码-执行周期的题目要求逐步描述 CPU 内部发生的情况。使用准确的寄存器名称:程序计数器(PC)、存储器地址寄存器(MAR)、存储器数据寄存器(MDR)、当前指令寄存器(CIR)和累加器。解释取指阶段结束后 PC 如何递增。
Also practise explaining pipelining and how it improves throughput by overlapping instruction stages. WJEC may include an assembly language instruction like LDA 12 and ask you to trace the buses (address, data, control) during execution.
此外,练习解释流水线技术及其如何通过重叠指令阶段来提高吞吐量。WJEC 可能会包含一条如 LDA 12 的汇编指令,并要求跟踪执行期间各总线(地址、数据、控制)的情况。
9. Networking: Protocols and Topologies | 网络:协议和拓扑
A typical scenario asks you to recommend a network topology for a school. A star topology is reliable because a single cable failure only affects one node, but it requires more cable and a central switch. Contrast this with a bus topology, which uses less cabling but has a single point of failure.
典型的场景题要求为学校推荐一种网络拓扑。星型拓扑可靠,因为单根电缆故障仅影响一个节点,但它需要更多电缆和中心交换机。对比总线型拓扑,后者用线更少但存在单点故障。
Protocol questions often focus on TCP/IP layers. For instance, explain why UDP is preferred over TCP for live video streaming: TCP’s acknowledgements and retransmissions cause latency, while UDP accepts packet loss to maintain real‑time flow. Know the role of protocols like HTTP, FTP, SMTP, POP3 at the application layer.
协议题常聚焦 TCP/IP 分层。例如,解释为何实时视频流优先选择 UDP 而非 TCP:TCP 的确认和重传机制导致延迟,而 UDP 接受部分丢包以维持实时流。应了解 HTTP、FTP、SMTP、POP3 等协议在应用层的作用。
10. Databases and SQL Queries | 数据库与 SQL 查询
WJEC frequently provides a relational database table (e.g. Customer(CustomerID, Name, Town) and Order(OrderID, CustomerID, Date)) and asks you to write SQL. A question might begin: ‘List the names of customers who placed orders after 1st Jan 2025.’ The SQL uses a JOIN and a WHERE clause:
WJEC 经常给出关系数据库表(如 Customer(CustomerID, Name, Town) 和 Order(OrderID, CustomerID, Date)),并要求编写 SQL。题目可能这样开始:‘列出 2025 年 1 月 1 日之后下过订单的客户姓名。’ SQL 需使用 JOIN 和 WHERE 子句:
SELECT DISTINCT Name FROM Customer C INNER JOIN Order O ON C.CustomerID = O.CustomerID WHERE O.Date > ‘2025-01-01’;
SELECT DISTINCT Name FROM Customer C INNER JOIN Order O ON C.CustomerID = O.CustomerID WHERE O.Date > ‘2025-01-01’;
Also be prepared to define primary and foreign keys, and explain referential integrity. For example, you may need to state that Order.CustomerID must match an existing CustomerID in the Customer table, or the DBMS rejects the insert/update.
还需准备好定义主键与外键,并解释参照完整性。例如,可能需要陈述 Order.CustomerID 必须匹配 Customer 表中已有的 CustomerID,否则 DBMS 将拒绝插入/更新。
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课程辅导,国外大学本科硕士研究生博士课程论文辅导