Year 13 WJEC Computer Science: Core Knowledge Review | Year 13 WJEC 计算机:核心知识点梳理

📚 Year 13 WJEC Computer Science: Core Knowledge Review | Year 13 WJEC 计算机:核心知识点梳理

Welcome to this comprehensive revision guide tailored for Year 13 WJEC Computer Science students. This article consolidates the most important concepts from the A2 units – Unit 3: Programming and System Development and Unit 4: Computer Architecture, Data, Communication and Applications. Each section presents key knowledge in paired English and Chinese paragraphs, helping you reinforce understanding and prepare effectively for your examinations.

欢迎阅读这份为 Year 13 WJEC 计算机科学学生量身定制的综合复习指南。本文梳理了 A2 单元(单元 3:编程与系统开发,单元 4:计算机体系结构、数据、通信与应用)中最核心的知识点。每一节都以成对的英文和中文段落呈现要点,帮助你强化理解,高效备考。

1. Data Structures and Abstract Data Types | 数据结构与抽象数据类型

Data structures are fundamental ways of organising and storing data to enable efficient operations. An Abstract Data Type (ADT) defines a data structure purely by the operations it supports, such as insertion or deletion, while hiding the underlying implementation details. Key linear structures include arrays, linked lists, stacks, and queues; non-linear structures include trees and hash tables.

数据结构是组织和存储数据以实现高效操作的基本方式。抽象数据类型(ADT)仅通过其支持的操作(如插入或删除)定义数据结构,隐藏了底层实现细节。常见的线性结构有数组、链表、栈和队列;非线性结构包括树和哈希表。

Arrays provide O(1) random access using an index but have a fixed size allocated at creation. Linked lists consist of nodes connected via pointers; they allow dynamic memory usage and efficient insertion/deletion at any position, but element access requires O(n) traversal. A stack follows LIFO (Last-In, First-Out) with push and pop operations, useful in expression evaluation or backtracking. A queue uses FIFO (First-In, First-Out) with enqueue and dequeue, essential in scheduling and buffering.

数组利用索引提供 O(1) 的随机访问,但创建时分配的大小固定。链表由通过指针连接的节点组成,允许动态内存使用和任意位置的高效插入/删除,但访问元素需要 O(n) 的遍历。栈遵循 LIFO(后进先出),支持 push 和 pop 操作,常用于表达式求值或回溯。队列使用 FIFO(先进先出),支持 enqueue 和 dequeue,在调度和缓冲中必不可少。

Binary search trees store data hierarchically: for each node, the left subtree contains smaller values, and the right subtree contains larger values. Balanced trees allow O(log n) search, insert, and delete. Hash tables map keys to array indices via a hash function, offering average O(1) lookup; collisions are resolved through chaining or open addressing.

二叉搜索树按层次存储数据:每个节点的左子树包含较小值,右子树包含较大值。平衡树可实现 O(log n) 的搜索、插入和删除。哈希表通过哈希函数将键映射到数组索引,提供平均 O(1) 的查找;冲突通过链地址法或开放寻址法解决。


2. Algorithm Complexity and Big-O Notation | 算法复杂度与大O符号

Algorithm efficiency is measured in terms of time and space complexity as the input size n grows. Big-O notation describes the upper bound of the growth rate, ignoring constants and lower-order terms. Common complexities include constant O(1), logarithmic O(log n), linear O(n), linearithmic O(n log n), quadratic O(n²), and exponential O(2ⁿ).

算法的效率用时间复杂度和空间复杂度来衡量,随输入规模 n 增长。大 O 符号描述了增长率的上界,忽略常数和低阶项。常见的复杂度包括常数 O(1)、对数 O(log n)、线性 O(n)、线性对数 O(n log n)、平方 O(n²) 和指数 O(2ⁿ)。

For example, accessing an array element by index is O(1), binary search is O(log₂n), and a simple nested loop over an array is O(n²). When comparing algorithms, we also consider best-case and worst-case scenarios. Big-Ω gives a lower bound, and Big-Θ describes a tight bound where the upper and lower bounds match.

例如,通过索引访问数组元素是 O(1),二分搜索是 O(log₂n),对数组进行简单嵌套循环是 O(n²)。比较算法时,我们还要考虑最佳情况和最坏情况。大 Ω 提供下界,大 Θ 描述上界和下界匹配的紧确界。

Space complexity analyses the extra memory an algorithm requires. A recursive algorithm may use O(n) stack space due to call depth, while an iterative version might use only O(1) auxiliary space. Understanding these notations is critical for selecting optimal algorithms in systems development.

空间复杂度分析算法所需的额外内存。递归算法可能因为调用深度使用 O(n) 的栈空间,而迭代版本可能只使用 O(1) 的辅助空间。理解这些符号对于在系统开发中选择最优算法至关重要。


3. Sorting and Searching Algorithms | 排序与搜索算法

Sorting algorithms reorder data according to a comparison criterion. Bubble sort repeatedly swaps adjacent elements if they are out of order, with O(n²) in the average and worst cases. Insertion sort builds the final sorted array one element at a time, efficient for small or nearly sorted datasets, also O(n²) worst case. Merge sort uses a divide-and-conquer strategy to achieve O(n log n) time, but requires O(n) additional space. Quick sort selects a pivot and partitions the array, averaging O(n log n) but degrading to O(n²) with poor pivot choices.

排序算法根据比较准则重新排列数据。冒泡排序在相邻元素顺序错误时不断交换,平均和最坏情况均为 O(n²)。插入排序一次构建一个元素的最终有序数组,对小规模或近乎有序的数据集高效,最坏情况同样为 O(n²)。归并排序采用分治策略实现 O(n log n) 时间,但需要 O(n) 额外空间。快速排序选择一个枢轴并分区,平均 O(n log n),但在糟糕的枢轴选择下可退化至 O(n²)。

Searching algorithms locate a target value within a data structure. Linear search examines each element sequentially, giving O(n). It works on unsorted data. Binary search repeatedly divides a sorted list in half, achieving O(log n) time. It is far more efficient but requires data to be sorted beforehand.

搜索算法在数据结构中定位目标值。线性搜索依次检查每个元素,复杂度为 O(n),适用于无序数据。二分搜索反复将有序列表对半分割,达到 O(log n) 时间。它效率高得多,但要求数据事先已排序。

Knowing the strengths of each algorithm helps in choosing the right approach for a given problem, such as using merge sort when stable sorting is needed or binary search when performing repeated lookups on a static dataset.

了解每种算法的优势有助于为给定问题选择合适的方法,比如在需要稳定排序时使用归并排序,或者在对静态数据集进行重复查找时使用二分搜索。


4. Logic and Boolean Algebra | 逻辑与布尔代数

Boolean algebra underpins digital circuit design and programming conditionals. Variables take values TRUE (1) or FALSE (0). The basic operations are AND (·), OR (+), and NOT (¬). Truth tables enumerate all possible input combinations and the corresponding output. Logic gates such as AND, OR, NOT, NAND, NOR, XOR, and XNOR implement these operations in hardware.

布尔代数是数字电路设计和编程条件语句的基础。变量取 TRUE (1) 或 FALSE (0)。基本运算为 AND(·)、OR(+) 和 NOT(¬)。真值表列举所有可能的输入组合以及相应的输出。AND、OR、NOT、NAND、NOR、XOR 和 XNOR 等逻辑门在硬件中实现这些运算。

Boolean expressions can be simplified using algebraic laws (commutative, associative, distributive, De Morgan’s laws) or Karnaugh maps (K-maps) to minimise the number of gates. For instance, De Morgan’s law states that ¬(A · B) = ¬A + ¬B and ¬(A + B) = ¬A · ¬B.

布尔表达式可以使用代数定律(交换律、结合律、分配律、德摩根定律)或卡诺图进行化简,以减少门电路的数量。例如,德摩根定律指出 ¬(A·B) = ¬A + ¬B 以及 ¬(A + B) = ¬A · ¬B。

These concepts are directly examined in the WJEC specification through designing logic circuits, constructing truth tables, and simplifying expressions. They also form the basis for understanding the ALU within the CPU.

这些概念在 WJEC 考纲中直接通过设计逻辑电路、构造真值表和化简表达式进行考查。它们也是理解 CPU 内部 ALU 的基础。


5. Computer Architecture and the CPU | 计算机体系结构与中央处理器

The Von Neumann architecture stores both instructions and data in the same memory, with a single shared bus. The CPU consists of the Control Unit (CU), Arithmetic Logic Unit (ALU), and a set of registers. Key registers include the Program Counter (PC), Memory Address Register (MAR), Memory Data Register (MDR), Current Instruction Register (CIR), and Accumulator (ACC).

冯·诺依曼体系结构将指令和数据存储在同一内存中,使用单一共享总线。CPU 由控制单元(CU)、算术逻辑单元(ALU)和一组寄存器组成。关键寄存器包括程序计数器(PC)、内存地址寄存器(MAR)、内存数据寄存器(MDR)、当前指令寄存器(CIR)和累加器(ACC)。

The fetch-decode-execute cycle continuously processes instructions. In the fetch stage, the PC supplies the address to MAR, a read signal is sent to memory, and the instruction is placed into MDR, then copied to CIR. The PC increments. During decode, the CU interprets the opcode. In the execute phase, the ALU performs the required operation, possibly using other registers or memory accesses.

取指-译码-执行周期持续处理指令。在取指阶段,PC 将地址送入 MAR,向内存发出读信号,指令被放入 MDR,然后拷贝至 CIR。PC 自增。译码阶段,CU 解释操作码。执行阶段,ALU 执行所需操作,可能用到其他寄存器或内存访问。

Modern processors enhance performance with pipelining, where multiple instructions are overlapped in different stages. Addressing modes, such as immediate, direct, indirect, and indexed, specify how the operand of an instruction is accessed. Understanding these concepts is essential for answering assembly language questions.

现代处理器通过流水线提升性能,使多条指令在不同阶段重叠执行。寻址模式,如立即寻址、直接寻址、间接寻址和变址寻址,指定了如何访问指令的操作数。理解这些概念对于回答汇编语言问题至关重要。


6. Assembly Language and Instruction Sets | 汇编语言与指令集

Assembly language uses mnemonics to represent machine code instructions, providing a human-readable way to program at a low level. Each processor has its own instruction set. The WJEC specification often uses the Little Man Computer (LMC) model or simple symbolic instructions such as LDA (load), STA (store), ADD, SUB, BRA (branch always), BRZ (branch if zero), BRP (branch if positive), INP, and OUT.

汇编语言使用助记符表示机器码指令,提供了低层次的人类可读编程方式。每个处理器有自己的指令集。WJEC 考纲常使用 Little Man Computer (LMC) 模型或简单的符号指令,如 LDA(加载)、STA(存储)、ADD、SUB、BRA(无条件跳转)、BRZ(为零跳转)、BRP(为正跳转)、INP 和 OUT。

Operands can be specified using different addressing modes. In immediate addressing, the operand is the actual value (e.g., LDA #5). Direct addressing uses the memory address of the data (e.g., LDA 50). Indirect addressing takes the address stored at a given location, and indexed addressing adds an offset held in an index register to a base address.

操作数可以使用不同的寻址模式指定。在立即寻址中,操作数就是实际的值(例如 LDA #5)。直接寻址使用数据的内存地址(例如 LDA 50)。间接寻址取用给定位置中存储的地址,变址寻址将变址寄存器中保存的偏移量加到基地址上。

Writing assembly code requires careful management of registers and memory locations. Typical exam questions ask students to trace or write small programs performing arithmetic, loops, or branching based on conditions, which reinforces understanding of the fetch-execute cycle.

编写汇编代码需要仔细管理寄存器和内存位置。典型的考题要求学生追踪或编写执行算术、循环或基于条件分支的小程序,这可以加深对取指-执行周期的理解。


7. Operating Systems Concepts | 操作系统概念

An operating system (OS) manages hardware resources and provides an environment for application software. Key functions include process scheduling, memory management, file management, and handling input/output. The OS uses interrupts to respond to events such as I/O completion or exceptions.

操作系统(OS)管理硬件资源并为应用软件提供运行环境。关键功能包括进程调度、内存管理、文件管理和处理输入/输出。操作系统利用中断来响应 I/O 完成或异常等事件。

Process scheduling algorithms determine which process gets CPU time. Round-robin gives each process a fixed time slice, providing good response times but potential overhead. Priority-based scheduling assigns higher priority to certain processes, possibly causing starvation of low-priority tasks. Multi-level feedback queues combine several strategies.

进程调度算法决定哪个进程获得 CPU 时间。轮转调度为每个进程分配固定的时间片,响应时间好但可能存在开销。基于优先级的调度为特定进程分配较高优先权,可能导致低优先级任务饥饿。多级反馈队列结合了多种策略。

Memory management involves paging or segmentation to translate virtual addresses to physical addresses. Paging splits memory into fixed-size pages and frames, preventing external fragmentation. Virtual memory allows execution of programs larger than physical RAM by swapping pages to disk. An interrupt descriptor table and context switching enable the OS to handle multitasking securely.

内存管理涉及分页或分段,将虚拟地址转换为物理地址。分页将内存划分为固定大小的页面和帧,防止外部碎片。虚拟内存通过将页面交换到磁盘,允许执行比物理 RAM 更大的程序。中断描述符表和上下文切换使操作系统能够安全地处理多任务。


8. Data Representation | 数据表示

Computers store all data as binary digits. Natural numbers are represented as unsigned binary. Negative integers typically use two’s complement, where the most significant bit indicates sign and the range for n bits is from −2ⁿ⁻¹ to 2ⁿ⁻¹ − 1. To negate a number, invert all bits and add 1.

计算机将所有数据存储为二进制数字。自然数表示为无符号二进制。负整数通常使用二进制补码,最高位指示符号,n 位的范围是从 −2ⁿ⁻¹ 到 2ⁿ⁻¹ − 1。对一个数取负时,将所有位取反后加 1。

Floating-point representation stores real numbers in the form mantissa × 2ᵉˣᵖᵒⁿᵉⁿᵗ, following an IEEE-like format. Due to limited bits, precision can be lost, leading to rounding errors. Normalisation ensures a unique representation and maximises precision by adjusting the mantissa so that its first bit is 1 (for positive numbers).

浮点表示以 尾数×2^指数 的形式存储实数,遵循类似 IEEE 的格式。由于位数有限,精度可能丢失,导致舍入误差。规格化通过调整尾数使其首位为 1(对于正数),确保表示唯一并最大化精度。

Characters are encoded using ASCII (7-bit or 8-bit) or Unicode (UTF-8, UTF-16) which supports a vast range of international symbols. Sound is represented through sampling and quantisation, where higher sample rates and bit depths improve quality but increase file size. Image representation uses bitmaps with colour depth and resolution or vector graphics with mathematical descriptions.

字符使用 ASCII(7 位或 8 位)或支持大量国际符号的 Unicode(UTF-8、UTF-16)进行编码。声音通过采样和量化表示,更高的采样率和位深提高质量但增加了文件大小。图像表示使用带色彩深度和分辨率的位图,或使用数学描述的矢量图。


9. Networks and Communication | 网络与通信

Computer networks enable resource sharing and data exchange. The TCP/IP protocol stack is the foundation of the internet, with four layers: Application (HTTP, FTP, SMTP), Transport (TCP, UDP), Internet (IP), and Link (Ethernet, Wi-Fi). Data is encapsulated as it moves down the layers and decapsulated as it moves up.

计算机网络实现资源共享和数据交换。TCP/IP 协议栈是互联网的基础,包含四层:应用层(HTTP、FTP、SMTP)、传输层(TCP、UDP)、互联网层(IP)和链路层(以太网、Wi-Fi)。数据在向下经过各层时被封装,向上时被解封装。

Packet switching breaks data into packets that travel independently across a mesh of routers, allowing efficient use of network paths. Each packet contains source and destination IP addresses as well as a sequence number. Routers forward packets based on routing tables, and TCP reassembles them in correct order at the destination.

分组交换将数据拆分成数据包,这些数据包独立穿越由路由器组成的网状网络,高效利用网络路径。每个数据包包含源 IP 地址、目的 IP 地址以及序号。路由器根据路由表转发数据包,TCP 在目的地将其按正确顺序重组。

Network security involves firewalls that filter traffic based on rules, symmetric encryption (same key for encryption and decryption, e.g., AES) and asymmetric encryption (public/private key pair, e.g., RSA). Digital signatures and certificates verify the authenticity and integrity of messages, mitigating man-in-the-middle attacks.

网络安全涉及根据规则过滤流量的防火墙、对称加密(加解密使用相同密钥,如 AES)和非对称加密(公钥/私钥对,如 RSA)。数字签名和证书验证消息的真实性与完整性,缓解中间人攻击。


10. Databases and SQL | 数据库与SQL

Relational databases organise data into tables (relations) connected by keys. A primary key uniquely identifies each row, while a foreign key links to a primary key in another table to enforce referential integrity. Normalisation (1NF, 2NF, 3NF) reduces data redundancy and update anomalies by eliminating partial and transitive dependencies.

关系型数据库将数据组织成由键连接的表(关系)。主键唯一标识每一行,外键链接到另一张表的主键以实施参照完整性。规范化(1NF、2NF、3NF)通过消除部分依赖和传递依赖来减少数据冗余和更新异常。

Structured Query Language (SQL) is used to define, manipulate, and query data. The SELECT statement retrieves fields: SELECT name, age FROM students WHERE grade='A'. Joins combine rows from multiple tables: INNER JOIN returns matching rows, LEFT JOIN retains all rows from the left table. Aggregation functions like COUNT, SUM, AVG, MIN, MAX work with GROUP BY to summarise data.

结构化查询语言(SQL)用于定义、操作和查询数据。SELECT 语句检索字段:SELECT name, age FROM students WHERE grade='A'。联接将多张表的行组合在一起:INNER JOIN 返回匹配行,LEFT JOIN 保留左表所有行。聚合函数如 COUNT、SUM、AVG、MIN、MAX 与 GROUP BY 配合使用可汇总数据。

Database management systems (DBMS) handle concurrent access via locking, and transactions ensure the ACID properties (Atomicity, Consistency, Isolation, Durability). Understanding database design and SQL is crucial for the examined project work and written papers.

数据库管理系统(DBMS)通过锁定处理并发访问,事务确保 ACID 特性(原子性、一致性、隔离性、持久性)。理解数据库设计和 SQL 对于考试中的项目工作和书面试卷至关重要。


11. Programming Paradigms | 编程范式

WJEC examines various programming paradigms, notably object-oriented programming (OOP) and functional programming. OOP models real-world entities as objects that combine state (attributes) and behaviour (methods). Key principles are encapsulation (hiding internal state through private members), inheritance (creating subclasses that reuse and extend parent classes), and polymorphism (objects of different types responding to the same method call in their own way).

WJEC 考查多种编程范式,特别是面向对象编程(OOP)和函数式编程。OOP 将现实世界实体建模为对象,对象结合了状态(属性)和行为(方法)。关键原则包括封装(通过私有成员隐藏内部状态)、继承(创建复用并扩展父类的子类)和多态(不同类型的对象以各自的方式响应相同的方法调用)。

Functional programming treats computation as the evaluation of mathematical functions, avoiding mutable state and side effects. Pure functions always return the same output for a given input and have no side effects. Recursion replaces loops for iteration, and higher-order functions (functions that take or return other functions) such as map, filter, and reduce are heavily used. Immutability of data simplifies reasoning and parallel programming.

函数式编程将计算视为数学函数的求值,避免可变状态和副作用。纯函数对于给定输入总是返回相同输出且无副作用。递归替代循环进行迭代,高阶函数(接收或返回函数的函数)如 map、filter 和 reduce 被大量使用。数据的不可变性简化了推理和并行编程。

An awareness of these paradigms helps students select appropriate techniques for the programming project and answer theoretical questions on the differences, advantages, and typical use cases of each approach.

了解这些范式有助于学生在编程项目中选择合适的技术,并回答关于不同方法的差异、优点和典型用法的理论问题。


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