剑桥A Level计算机科学核心知识点精讲
剑桥国际 AS 与 A Level 计算机科学(9608/9618)是一门理论与实践并重的学科,Sylvia Langfield 与 Dave Duddell 编写的教材是备考时最常用的参考书。本文按知识模块梳理课程核心内容,覆盖数据表示、计算机体系结构、网络、编程、算法与数据库,帮助你快速建立起完整的知识框架。无论你正在备考 AS 还是 A Level,把这些模块吃透,都能为理论题和编程题打下扎实的基础。
Cambridge International AS and A Level Computer Science (9608/9618) is a subject that balances theory with practical skill, and the coursebook by Sylvia Langfield and Dave Duddell is the most widely used reference for exam preparation. This article walks through the core topics module by module, covering data representation, computer architecture, networking, programming, algorithms and databases, so you can quickly build a complete framework of knowledge. Whether you are preparing for AS or A Level, mastering these modules gives you a solid foundation for both theory and programming questions.
一、二进制、十六进制与进制转换 | Binary, Hexadecimal and Number Base Conversion
计算机内部所有数据最终都以二进制存储,只使用 0 和 1 两个数字。原因在于物理实现:电子电路最容易可靠地区分高低两种电平状态,因此二进制对硬件最自然。AS 阶段的第一项实用技能就是进制转换。十六进制用 0 到 9 以及 A 到 F 表示 16 个值,由于四位二进制恰好对应一位十六进制,内存地址和颜色值通常都用十六进制缩写,例如 0xFF 表示 255,比它的八位二进制形式 11111111 好读得多。
All data inside a computer is ultimately stored in binary, using only the digits 0 and 1. The reason is physical rather than arbitrary: electronic circuits can most reliably distinguish two states, a high voltage and a low voltage, so binary is the most natural fit for hardware. The first practical skill in the AS course is converting between number bases. Hexadecimal uses the digits 0 to 9 and the letters A to F to represent sixteen values. Because four binary digits map exactly onto one hexadecimal digit, hex is the standard shorthand for memory addresses and colour values; for example, 0xFF represents 255 and is far easier to read than its eight-bit binary equivalent 11111111.
二、原码、反码与补码:负数如何存储 | Sign-Magnitude, One's and Two's Complement
表示负数有几种方案。原码把最高位当作符号位,但直接相加会出错。反码把正数的每一位取反,却仍然存在正零和负零两种表示。补码是实际采用的方法:负数的补码等于它对应正数的反码再加一。补码最大的优点是加法和减法可以统一成加法,硬件只需一个加法器即可完成两种运算。以八位二进制为例,-1 的补码就是 11111111。
Several schemes exist for representing negative numbers. Sign-magnitude reserves the most significant bit for the sign, but arithmetic then goes wrong. One's complement inverts every bit of the positive number, yet it still leaves two representations of zero, a positive one and a negative one. Two's complement is the method actually used: the two's complement of a negative number is the one's complement of its positive value plus one. Its greatest advantage is that addition and subtraction can both be unified into addition, so the hardware needs only a single adder to perform both operations. In eight-bit binary, for example, -1 is stored as 11111111.
三、字符编码:ASCII 与 Unicode | Character Encoding: ASCII and Unicode
字符同样要用数字来表示。ASCII 用 7 位表示 128 个字符,覆盖英文字母、数字和基本符号,后来扩展到 8 位。但 ASCII 无法容纳中文、日文等其他文字系统。Unicode 统一了全球字符集,为每个字符分配唯一的码点。UTF-8 是可变长度编码,英文字符占 1 字节、中文字符占 3 字节,同时与 ASCII 兼容,因而成为互联网上最主流的编码方式。
Characters also have to be represented as numbers inside a computer. ASCII uses seven bits to represent 128 characters, covering English letters, digits and basic symbols, and was later extended to eight bits. But ASCII cannot hold Chinese, Japanese and other writing systems. Unicode unifies the world's character sets by giving every character a unique code point. UTF-8 is a variable-length encoding in which English characters use one byte and Chinese characters use three bytes; it remains compatible with ASCII and has therefore become the dominant encoding on the internet.
四、处理器架构与取指-执行循环 | Processor Architecture and the Fetch-Execute Cycle
中央处理器 CPU 由控制单元、算术逻辑单元和一组寄存器组成。CPU 运行程序时反复执行取指-执行循环:从内存取出指令、译码、执行、再取下一条。程序计数器 PC 保存下一条指令的地址,指令寄存器保存当前正在执行的指令。理解这个循环能够回答"计算机究竟如何运行程序"这一根本问题,同时也是 A Level 汇编语言部分的基础。
The central processing unit consists of the control unit, the arithmetic logic unit and a set of registers. When the CPU runs a program it repeatedly performs the fetch-execute cycle: fetch an instruction from memory, decode it, execute it, and move on to the next. The program counter holds the address of the next instruction, and the instruction register holds the instruction currently being executed. Understanding this cycle answers the fundamental question of how a computer actually runs a program, and it lays the foundation for the assembly language topics in A Level.
五、存储层次与虚拟内存 | Memory Hierarchy and Virtual Memory
存储器按速度和成本分成层次。寄存器最快但容量最小,其次是高速缓存、主存 RAM,最后是硬盘。RAM 是易失性存储器,断电后数据丢失;ROM 是非易失性的。虚拟内存让操作系统把硬盘的一部分当作额外内存使用:当物理内存不足时,把暂时不用的页面换出到硬盘,腾出空间给当前程序。缺点是硬盘访问慢,过度依赖会拖慢整个系统。考试中常考 RAM 与 ROM 的区别,以及虚拟内存的优缺点对比。
Memory is organised into a hierarchy by speed and cost. Registers are the fastest but smallest, followed by cache, main memory (RAM), and finally disk storage. RAM is volatile, losing its contents when power is removed, while ROM is non-volatile. Virtual memory lets the operating system treat part of the hard disk as extra memory: when physical memory runs short, pages that are not currently in use are swapped out to disk to free space for the running program. The drawback is that disk access is slow, so relying on it too heavily slows the whole system down. Exam questions frequently test the difference between RAM and ROM, along with the advantages and drawbacks of virtual memory.
六、网络拓扑与 TCP/IP 协议栈 | Network Topologies and the TCP/IP Protocol Stack
网络把多台计算机连接起来以便共享资源。常见拓扑有总线型、星型、环型和网状型。现代局域网大多采用星型拓扑,所有设备都连到中心交换机,因此单条线路故障只影响一台设备。TCP/IP 是互联网的协议栈,分为四层:应用层、传输层、网络层、链路层。IP 负责寻址和路由,TCP 在 IP 之上提供可靠的连接,保证数据按序、完整地到达。
Networks connect computers together so they can share resources. Common topologies include bus, star, ring and mesh. Modern local area networks mostly use the star topology, in which every device connects to a central switch, so a single cable failure only affects one device. TCP/IP is the protocol stack of the internet, arranged in four layers: application, transport, network and link. IP handles addressing and routing, while TCP sits on top of IP and provides a reliable connection, ensuring that data arrives in order and complete.
七、编程基础:数据类型、选择与迭代 | Programming Basics: Data Types, Selection and Iteration
编程语言提供整型、实型、字符、字符串和布尔等数据类型。所有程序都由三种基本结构构成:顺序、选择和迭代。选择结构用 IF...THEN...ELSE 根据条件执行不同分支;迭代结构用 FOR、WHILE 和 REPEAT 循环重复执行代码。正确使用变量和赋值,再掌握这三种结构,就能编写绝大多数基础程序,这是后续学习函数和模块化的前提。
Programming languages provide data types such as integer, real, character, string and Boolean. Every program is built from three basic constructs: sequence, selection and iteration. Selection uses IF...THEN...ELSE to execute different branches depending on a condition, while iteration uses FOR, WHILE and REPEAT loops to run code repeatedly. Once you use variables and assignment correctly and master these three constructs, you can write most basic programs, which is the prerequisite for later topics such as functions and modular programming.
八、数组、记录与文件处理 | Arrays, Records and File Handling
数组把相同类型的数据按顺序存储,通过下标访问,适合批量处理,二维数组可以表示表格。记录把不同类型的数据组合成一个整体,比如学生的姓名、年龄和成绩。文件处理让程序读写持久化数据:顺序文件按顺序读写,随机访问文件可以定位到任意记录。理解这些数据结构,是后续学习链表、栈和队列的重要铺垫。
An array stores data of the same type in order and accesses it through an index, which suits batch processing; a two-dimensional array can represent a table. A record combines data of different types into one unit, such as a student's name, age and grade. File handling lets a program read and write persistent data: a sequential file is read in order, while a random-access file can jump to any record. Understanding these structures is an important stepping stone towards linked lists, stacks and queues later in the course.
九、排序与搜索算法 | Sorting and Searching Algorithms
排序算法中,冒泡排序反复比较相邻元素并交换,简单但效率低;插入排序把元素逐个插入已排序部分;快速排序采用分治策略,平均效率最高。搜索算法中,线性搜索从头到尾逐个比较,适用于无序列表;二分搜索要求列表有序,每次排除一半元素,时间复杂度从 O(n) 降到 O(log n)。考试常要求手写追踪这些算法的每一步。
Among sorting algorithms, bubble sort repeatedly compares adjacent elements and swaps them; it is simple but inefficient. Insertion sort places each element into the already sorted part one by one, while quick sort uses a divide-and-conquer strategy and is the fastest on average. Among searching algorithms, linear search compares elements one by one and suits unsorted lists, whereas binary search requires a sorted list and eliminates half the elements each step, reducing the time complexity from O(n) to O(log n). Exams often ask you to trace these algorithms step by step by hand.
十、数据库设计与 SQL 查询 | Database Design and SQL Queries
数据库用结构化的方式存储大量数据。关系型数据库把数据组织成表,表之间通过主键和外键建立联系。良好的设计通过规范化过程避免数据冗余。SQL 是操作关系型数据库的标准语言:SELECT 查询数据,INSERT 插入记录,UPDATE 修改记录,DELETE 删除记录。规范化通常分为第一、第二、第三范式(1NF、2NF、3NF),目的是消除重复数据、保证数据一致性。一条简单的查询如 SELECT name FROM students WHERE grade 大于 80 就能筛选出成绩超过 80 分的学生。
A database stores large amounts of data in a structured way. A relational database organises data into tables, which are linked through primary and foreign keys. Good design avoids redundant data through a process called normalisation. SQL is the standard language for working with relational databases: SELECT retrieves data, INSERT adds records, UPDATE modifies them, and DELETE removes them. Normalisation is usually described through first, second and third normal form (1NF, 2NF and 3NF), with the goal of eliminating repeated data and keeping the data consistent. A simple query such as SELECT name FROM students WHERE grade is greater than 80 filters out the students who scored above 80.
十一、考试结构与备考策略 | Exam Structure and Revision Strategy
剑桥国际 AS 与 A Level 计算机科学各考两张试卷。Paper 1 侧重理论基础,考查数据表示、体系结构、网络和数据库;Paper 2 侧重问题求解与编程,考查算法设计、伪代码和编程技能。备考要重视两点:一是手写追踪算法,考试常要求逐步写出变量值的变化过程;二是大量练习历年真题,熟悉题型和评分标准。理解原理永远比死记硬背更有效。
Cambridge International AS and A Level Computer Science is assessed through two papers. Paper 1 focuses on theory fundamentals, examining data representation, computer architecture, networking and databases, while Paper 2 focuses on problem-solving and programming, testing algorithm design, pseudocode and programming skills. Revision should emphasise two things: first, tracing algorithms by hand, since exams often ask you to show step-by-step changes in variable values; and second, practising a large number of past papers to become familiar with question styles and mark schemes. Understanding the underlying principles is always more effective than memorising by rote.
需要A Level计算机科学辅导?
16621398022
同微信 | 免费咨询课程规划
访问 aleveler.com 了解更多
更多咨询请联系16621398022(同微信)

或截图后用「扫一扫 → 相册」选择本图