Core Knowledge Review for AS Cambridge Computer Science | AS剑桥计算机科学核心知识点梳理

📚 Core Knowledge Review for AS Cambridge Computer Science | AS剑桥计算机科学核心知识点梳理

The Cambridge AS Computer Science syllabus (9618) lays a strong foundation in core computing concepts, covering information representation, hardware, system software, networking, databases, and algorithm design. This article provides a concise yet comprehensive review of the essential topics you must master, offering key definitions, explanations, and practical examples to reinforce your understanding.

剑桥AS计算机科学大纲(9618) 在信息表示、硬件、系统软件、网络、数据库和算法设计等核心概念方面奠定了坚实基础。本文将对必考的核心主题进行简明而全面的梳理,提供关键定义、解释和实例,以巩固你的理解。

1. Number Systems and Binary Arithmetic | 数制与二进制运算

Computers operate using the binary number system (base‑2) with digits 0 and 1. Each binary digit is called a bit. A group of 4 bits is a nibble, and 8 bits form a byte. To make binary numbers more readable, we often use hexadecimal (base‑16), which uses the digits 0‑9 and letters A‑F to represent values 10‑15. Conversions between denary, binary, and hexadecimal are fundamental skills.

计算机使用二进制系统(基数为2)运行,数字为0和1。每个二进制数字称为一位(bit)。4位组成一个半字节,8位组成一个字节。为了让二进制数更易读,我们常使用十六进制(基数为16),它用数字0‑9和字母A‑F表示值10‑15。十进制、二进制和十六进制之间的转换是基本技能。

Binary addition follows simple rules: 0+0=0, 0+1=1, 1+0=1, and 1+1=0 with a carry of 1 to the next column. An overflow occurs when the result of an addition exceeds the maximum value representable with the given number of bits, typically signalled by a carry into the sign bit in two’s complement representation.

二进制加法遵循简单规则:0+0=0,0+1=1,1+0=1,1+1=0并向高位进1。当加法结果超出给定位数所能表示的最大值时,会产生溢出,在补码表示中通常由进位进入符号位来指示。

Negative numbers in binary are commonly stored using two’s complement. To obtain the two’s complement representation of a negative denary number, first write the positive binary, invert all bits (one’s complement), and then add 1. For an 8‑bit representation, –6 becomes:

二进制中的负数通常使用补码存储。要获得一个负十进制数的补码表示,先写出其正数的二进制,将所有位取反(反码),再加1。对于8位表示,–6 变为:

–6 (denary) → 0000 0110 (+6) → 1111 1001 (one’s complement) → 1111 1010 (two’s complement)

Another way to represent decimal digits is Binary Coded Decimal (BCD), where each denary digit is encoded separately using its 4‑bit binary equivalent. For example, 29 in BCD is 0010 1001, not the pure binary 0001 1101. BCD is often used in systems that require exact decimal rounding, such as financial calculations.

另一种表示十进制数字的方法是二进制编码十进制(BCD),其中每个十进制数字单独用其4位二进制等效值编码。例如,29的BCD编码为0010 1001,而不是纯二进制0001 1101。BCD常用于需要精确十进制舍入的系统,例如金融计算。


2. Data Representation: Text, Sound, and Images | 数据表示:文本、声音和图像

Text is stored using character sets. The ASCII standard uses 7 bits to represent 128 characters, while extended ASCII uses 8 bits for 256 characters. Unicode incorporates many more characters to support global languages, using encoding schemes such as UTF‑8, which is backward‑compatible with ASCII.

文本使用字符集存储。ASCII标准使用7位表示128个字符,而扩展ASCII使用8位表示256个字符。Unicode包含更多字符以支持全球语言,使用如UTF‑8等编码方案,向后兼容ASCII。

Sound is captured by sampling the amplitude of an analogue signal at regular intervals. The sample rate (measured in Hz) determines how many samples are taken per second; a typical rate for CD quality is 44 100 Hz. Bit depth defines the number of bits used to record each sample, affecting the precision of amplitude representation. The file size for uncompressed sound can be calculated as:

声音通过对模拟信号的振幅进行规则间隔采样来捕获。采样率(单位为Hz)决定每秒采集多少个样本;CD质量的典型采样率为44 100 Hz。位深度定义了用于记录每个样本的位数,影响振幅表示的精度。未压缩声音的文件大小可计算如下:

Sound file size (bits) = sample rate × bit depth × number of channels × duration in seconds

Images are made up of a grid of pixels. Resolution is the total number of pixels (width × height), while colour depth is the number of bits used to store the colour of each pixel. A higher colour depth allows more colours. For a bitmap image, the uncompressed file size (in bits) equals resolution × colour depth. Compression techniques such as lossless (e.g., run‑length encoding) and lossy (e.g., JPEG) are used to reduce file sizes.

图像由像素网格构成。分辨率是像素的总数(宽度 × 高度),而颜色深度是用于存储每个像素颜色的位数。颜色深度越高,可显示的颜色越多。对于位图图像,未压缩文件大小(位)等于分辨率 × 颜色深度。无损压缩(如行程编码)和有损压缩(如JPEG)等技术被用于减小文件大小。


3. Logic Gates and Boolean Algebra | 逻辑门与布尔代数

Logic gates are the building blocks of digital circuits. The basic gates are NOT, AND, OR, NAND, NOR, and XOR. Each gate can be described by a truth table that lists all possible inputs and the corresponding output. For instance, an AND gate outputs 1 only when both inputs are 1.

逻辑门是数字电路的构建模块。基本门包括非门、与门、或门、与非门、或非门和异或门。每个门都可以用一个真值表来描述,列出所有可能的输入及对应的输出。例如,与门仅在两个输入均为1时才输出1。

A B A AND B A OR B
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 1

Boolean algebra provides a mathematical method for simplifying logic expressions. Key laws include idempotent (A ∨ A = A), commutative, associative, distributive, and De Morgan’s laws. De Morgan’s theorems state that NOT (A AND B) equals (NOT A) OR (NOT B), and NOT (A OR B) equals (NOT A) AND (NOT B). These are used to minimise circuits and reduce the number of gates.

布尔代数提供了一种简化逻辑表达式的数学方法。关键定律包括幂等律(A ∨ A = A)、交换律、结合律、分配律和德摩根律。德摩根定理指出: NOT (A AND B) 等价于 (NOT A) OR (NOT B); NOT (A OR B) 等价于 (NOT A) AND (NOT B)。这些定律用于最小化电路、减少门数量。

A logic circuit can be built from a problem statement or a truth table. The process involves writing the Boolean expression, simplifying it using algebra or Karnaugh maps (at AS level, simple K‑maps with 2 or 3 variables may be introduced), and then drawing the equivalent gate diagram. For example, the expression ¬A ∧ B ∨ A ∧ ¬B represents an XOR gate.

可以根据问题描述或真值表构建逻辑电路。该过程包括写出布尔表达式,使用代数或卡诺图(在AS阶段,可能引入2或3变量的简单卡诺图)进行简化,然后画出等效的门电路图。例如,表达式 ¬A ∧ B ∨ A ∧ ¬B 表示异或门。


4. Processor Architecture and the Fetch‑Execute Cycle | 处理器架构与取指执行周期

The central processing unit (CPU) follows the Von Neumann architecture, which stores both data and instructions in the same memory. Key dedicated registers inside the CPU include: the Program Counter (PC) holds the address of the next instruction; the Memory Address Register (MAR) holds the address to read/write; the Memory Data Register (MDR) holds the data transferred; the Current Instruction Register (CIR) stores the instruction being decoded; and the Accumulator (ACC) holds results of calculations.

中央处理器(CPU)遵循冯·诺依曼架构,将数据和指令存储在同一个内存中。CPU内部的关键专用寄存器包括:程序计数器(PC)保存下一条指令的地址;内存地址寄存器(MAR)保存要读写的内存地址;内存数据寄存器(MDR)保存传输的数据;当前指令寄存器(CIR)存储正在解码的指令;累加器(ACC)保存计算结果。

The fetch‑execute cycle describes how the CPU processes an instruction. During the fetch stage, the address in the PC is copied to the MAR, the instruction at that address is loaded into the MDR, and then transferred to the CIR, while the PC is incremented. In the execute stage, the control unit decodes the instruction and commands the ALU or other components to carry it out. This cycle repeats billions of times per second.

取指执行周期描述了CPU如何处理一条指令。在取指阶段,PC中的地址被复制到MAR,该地址处的指令被加载到MDR,然后传输到CIR,同时PC递增。在执行阶段,控制单元解码指令,并命令ALU或其他组件执行。该周期每秒重复数十亿次。

CPU performance is affected by several factors: clock speed (number of cycles per second, measured in GHz), the number of cores (allowing parallel processing of instructions), and cache memory (high‑speed memory that stores frequently accessed data and instructions). A larger cache typically reduces the need to access slower main memory.

CPU性能受几个因素影响:时钟速度(每秒的周期数,单位为GHz)、核心数量(允许并行处理指令)和高速缓存(存储频繁访问的数据和指令的高速内存)。更大的缓存通常能减少访问较慢主存的需求。


5. Assembly Language and Addressing Modes | 汇编语言与寻址方式

Assembly language is a low‑level programming language that uses mnemonics to represent machine code instructions. Each assembly instruction typically consists of an opcode (operation code) and one or more operands. An assembler translates assembly code into machine code. One‑to‑one correspondence usually exists between an assembly instruction and a machine code instruction.

汇编语言是一种低级编程语言,使用助记符表示机器码指令。每条汇编指令通常由一个操作码和一个或多个操作数组成。汇编器将汇编代码翻译成机器码。汇编指令和机器码指令之间通常存在一一对应关系。

Addressing modes specify how an operand is interpreted. Common modes include: immediate addressing, where the operand is a constant value (e.g., LDR R1, #5); direct addressing, where the operand is a memory address (e.g., LDR R1, 256); indirect addressing, where the operand is a register that holds the memory address (e.g., LDR R1, [R2]); and indexed addressing, where a base address and an offset register are combined (e.g., LDR R1, [R2 + R3]).

寻址方式指定了如何解释操作数。常见的模式包括:立即寻址,操作数为常量值(例如 LDR R1, #5);直接寻址,操作数为内存地址(例如 LDR R1, 256);间接寻址,操作数为一个寄存器,该寄存器保存了内存地址(例如 LDR R1, [R2]);以及变址寻址,将基址和偏移寄存器结合(例如 LDR R1, [R2 + R3])。

Simple assembly language programs use instructions like LDR, STR (store), ADD, SUB, CMP (compare), and branch instructions (B, BEQ, BNE) to implement loops and conditional execution. Understanding how these instructions manipulate registers and memory is essential for low‑level programming tasks on the AS syllabus.

简单的汇编语言程序使用诸如LDR、STR(存储)、ADD、SUB、CMP(比较)和分支指令(B、BEQ、BNE)等来实现循环和条件执行。理解这些指令如何操作寄存器和内存对于AS大纲中的低级编程任务至关重要。


6. System Software and Operating Systems | 系统软件与操作系统

System software includes the operating system (OS), utility programs, and language translators. The OS manages hardware resources, provides a user interface, handles process scheduling, memory management, file management, and input/output operations. Interrupt handling is a key function – the OS suspends the current process to service a hardware or software interrupt, using an interrupt service routine (ISR).

系统软件包括操作系统(OS)、实用程序和语言翻译器。操作系统管理硬件资源,提供用户界面,处理进程调度、内存管理、文件管理和输入/输出操作。中断处理是一个关键功能——OS暂停当前进程以服务硬件或软件中断,使用中断服务程序(ISR)。

Translators change source code into machine code. A compiler translates high‑level language code into machine code in one go, producing an executable file; the translation is performed only once. An interpreter translates and executes the source code line‑by‑line each time the program runs. An assembler translates assembly language into machine code.

翻译器将源代码转换为机器码。编译器一次性将高级语言代码翻译为机器码,生成可执行文件;翻译只执行一次。解释器在每次程序运行时逐行翻译并执行源代码。汇编器将汇编语言翻译成机器码。

Memory management involves allocating memory to processes and freeing it when no longer needed. Paging and segmentation are techniques to manage memory efficiently, preventing processes from interfering with each other. Scheduling algorithms (e.g., round‑robin, first‑come‑first‑served) decide the order in which processes access the CPU, aiming for fairness and efficiency.

内存管理涉及为进程分配内存并在不再需要时释放。分页和分段是有效管理内存、防止进程相互干扰的技术。调度算法(例如轮转调度、先到先服务)决定进程访问CPU的顺序,旨在保证公平性和效率。


7. Networking and the Internet | 网络与互联网

A network connects two or more devices to share resources and data. Local Area Networks (LANs) cover a small geographical area, typically using Ethernet or Wi‑Fi. Wide Area Networks (WANs) connect LANs over large distances, often using leased lines or the internet. Network topologies include star, bus, ring, and mesh, each with advantages and disadvantages in terms of cost, scalability, and fault tolerance.

网络连接两个或多个设备以共享资源和数据。局域网(LAN)覆盖较小地理区域,通常使用以太网或Wi‑Fi。广域网(WAN)通过长距离连接LAN,常使用专线或互联网。网络拓扑包括星型、总线型、环型和网状,每种在成本、可扩展性和容错性方面各有优缺点。

The TCP/IP protocol stack is fundamental to internet communication. It consists of four layers: Application (HTTP, FTP, SMTP), Transport (TCP, UDP), Internet (IP), and Network Interface. TCP provides reliable, connection‑oriented delivery with error checking, while UDP offers faster but connectionless delivery. IP addresses identify devices on a network; IPv4 uses 32‑bit addresses, while IPv6 uses 128‑bit addresses to solve address exhaustion.

TCP/IP协议栈是互联网通信的基础。它由四层组成:应用层(HTTP、FTP、SMTP)、传输层(TCP、UDP)、互联网层(IP)和网络接口层。TCP提供可靠的、面向连接的传输并带有错误检查,而UDP提供更快但无连接的传输。IP地址标识网络上的设备;IPv4使用32位地址,IPv6使用128位地址以解决地址枯竭问题。

A router forwards data packets between networks using IP addresses, while a switch connects devices within a LAN using MAC addresses. The client‑server model involves clients requesting services from a central server, whereas a peer‑to‑peer network allows each device to act as both client and server, sharing resources directly.

路由器使用IP地址在网络之间转发数据包,而交换机使用MAC地址在LAN内部连接设备。客户端‑服务器模型涉及客户端向中央服务器请求服务,而对等网络允许每个设备同时充当客户端和服务器,直接共享资源。


8. Data Security, Privacy, and Integrity | 数据安全、隐私与完整性

Data security protects information from unauthorised access and damage. Threats include malware (viruses, worms, trojans), phishing (deceptive emails to steal credentials), and direct hacking. Encryption scrambles data so that only authorised parties with the decryption key can read it. Symmetric encryption uses the same key for encryption and decryption, while asymmetric encryption uses a public and a private key pair.

数据安全保护信息免受未经授权的访问和破坏。威胁包括恶意软件(病毒、蠕虫、木马)、网络钓鱼(用于窃取凭据的欺骗性电子邮件)和直接黑客攻击。加密打乱数据,使得只有拥有解密密钥的授权方才能读取。对称加密使用相同的密钥进行加密和解密,而非对称加密使用一对公钥和私钥。

Authentication mechanisms verify user identity, such as passwords, biometrics, and two‑factor authentication. Firewalls monitor incoming and outgoing network traffic and block suspicious activity based on predefined rules. Digital signatures use asymmetric encryption to verify the authenticity and integrity of a message – the sender signs with their private key, and the recipient verifies with the sender’s public key.

身份验证机制验证用户身份,例如密码、生物识别和双因素身份验证。防火墙监控进出的网络流量,

Published by TutorHao | AS 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