📚 IB & CIE Computer Science: Last-Minute Revision Notes | IB CIE 计算机:考前冲刺笔记
This article condenses essential concepts from both IB and CIE Computer Science specifications into a rapid-fire revision guide. Each section pairs an English explanation with a Chinese counterpart, helping you reinforce terminology, key models, and common pitfalls right before the exam.
本文浓缩了IB和CIE计算机科学课程的核心概念,为你提供一份考前快速回顾指南。每个要点都采用英文解释搭配中文对照的方式,帮助你巩固术语、关键模型和常见易错点,在进入考场前最后一次高效梳理知识。
1. Number Systems and Data Representation | 数制与数据表示
Binary, hexadecimal and denary conversions are fundamental. A nibble is 4 bits, a byte is 8 bits. Overflow occurs when the result of an operation exceeds the available bit width. Two’s complement is the standard method for representing signed integers, where the most significant bit (MSB) acts as the sign bit.
二进制、十六进制和十进制的转换是基础。半字节为4位,一字节为8位。当运算结果超过可用位宽时会发生溢出。二进制补码是表示符号整数的标准方法,最高位用作符号位。
Floating-point representation stores numbers as mantissa × baseexponent. IEEE 754 single precision uses 1 sign bit, 8 exponent bits (biased by 127) and 23 mantissa bits. Normalisation ensures a leading ‘1’ after the decimal point for binary floating point, maximising precision.
浮点数表示为 尾数 × 基数指数。IEEE 754 单精度使用 1 个符号位、8 个偏置为 127 的指数位和 23 个尾数位。二进制浮点数通过规格化确保小数点后首位为 ‘1’,以最大化精度。
Character sets: ASCII uses 7 bits (128 characters); Extended ASCII uses 8 bits; Unicode (UTF-8, UTF-16) supports global scripts with variable-length encoding. Sound is sampled and digitised using sample rate and bit depth; images are stored as pixels with colour depth and resolution.
字符集:ASCII 用7位(128个字符);扩展 ASCII 用8位;Unicode(UTF-8, UTF-16)采用可变长编码支持全球文字。声音通过采样率和位深度进行采样数字化;图像则以像素、颜色深度和分辨率存储。
2. Boolean Algebra and Logic Gates | 布尔代数与逻辑门
Basic gates: AND, OR, NOT, NAND, NOR, XOR, XNOR. NAND and NOR are functionally complete. Boolean algebra laws (commutative, associative, distributive, absorption, De Morgan’s) allow simplification of logic expressions.
基本门:与、或、非、与非、或非、异或、同或。与非和或非是功能完备的。布尔代数定律(交换律、结合律、分配律、吸收律、德摩根定律)可用于化简逻辑表达式。
A truth table lists every input combination and its output. Karnaugh maps (K-maps) provide a visual method to minimise Boolean functions for up to 4 variables. Don’t-care conditions (X) can be used to further simplify circuits.
真值表列出所有输入组合及其输出。卡诺图为最多4变量的布尔函数提供了一种可视化最小化方法。无关项条件(X)可进一步简化电路。
Half-adder: adds two bits, produces sum and carry. Full-adder: adds three bits (two inputs + carry-in), produces sum and carry-out. Ripple-carry adders chain full-adders but have propagation delay. Flip-flops (SR, JK, D) are used for memory elements in sequential circuits.
半加器:两比特相加,产生和与进位。全加器:三个比特相加(两个输入+进位输入),产生和与进位输出。行波进位加法器由全加器级联而成,但存在传输延迟。触发器(SR, JK, D)用于时序电路的存储单元。
3. Computer Architecture and the Fetch-Execute Cycle | 计算机体系结构与取指执行周期
The von Neumann architecture stores both data and instructions in the same memory. The CPU contains the Control Unit (CU), Arithmetic Logic Unit (ALU) and registers such as 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)。
Fetch-decode-execute cycle: The PC holds the address of the next instruction. MAR receives the address from PC; MDR fetches the instruction from memory; CIR holds the decoded opcode and operand; the CU coordinates execution.
取指-解码-执行周期:PC 存放下一个指令地址;MAR 从 PC 接收地址;MDR 从内存取出指令;CIR 存解码后的操作码和操作数;CU 协调执行。
Factors affecting performance: clock speed, word size, number of cores, cache memory (L1/L2/L3) and bus width. Pipelining allows overlapping of fetch, decode and execute stages to improve throughput.
影响性能的因素:时钟速度、字长、核心数、缓存大小(L1/L2/L3)和总线宽度。流水线允许取指、解码和执行阶段重叠,从而提高吞吐量。
Harvard architecture uses separate memory for instructions and data, allowing simultaneous access. It’s common in embedded systems and DSPs.
哈佛架构使用独立的指令存储器和数据存储器,允许同时访问,常见于嵌入式系统和数字信号处理器。
4. Operating Systems and Resource Management | 操作系统与资源管理
The OS provides a virtual machine abstraction, hiding hardware complexity. Key functions: memory management (paging, segmentation, virtual memory), process scheduling (FCFS, SJF, round-robin, priority-based), file management and I/O control.
操作系统提供虚拟机抽象,隐藏硬件复杂性。主要功能:内存管理(分页、分段、虚拟内存)、进程调度(先来先服务、最短作业优先、轮转、优先级调度)、文件管理和输入/输出控制。
Virtual memory uses a swap file on disk to extend physical RAM. Pages are swapped in/out as needed, but excessive swapping causes disk thrashing, degrading performance. A page fault occurs when a required page is not in RAM.
虚拟内存利用磁盘上的交换文件扩展物理内存。页按需换入换出,但频繁交换会导致磁盘抖动,降低性能。所需页面不在内存中时会发生缺页异常。
Interrupts signal the CPU to suspend the current task and execute an interrupt service routine (ISR). Types: hardware (e.g., I/O completion), software (e.g., division by zero), and timer interrupts. The interrupt vector table holds ISR addresses.
中断通知 CPU 暂停当前任务并执行中断服务例程(ISR)。类型:硬件中断(如 I/O 完成)、软件中断(如除零)和定时器中断。中断向量表存放 ISR 的地址。
5. Networks and the OSI/TCP Models | 网络与OSI/TCP模型
The OSI model: Physical, Data Link, Network, Transport, Session, Presentation, Application. The TCP/IP model: Network Access, Internet, Transport, Application. TCP provides connection-oriented, reliable transmission; UDP is connectionless with lower overhead.
OSI 模型:物理层、数据链路层、网络层、传输层、会话层、表示层、应用层。TCP/IP 模型:网络接入层、网际层、传输层、应用层。TCP 提供面向连接的可靠传输;UDP 是无连接的,开销低。
Common protocols: HTTP/HTTPS (80/443), FTP (21), SMTP (25), POP3 (110), IMAP (143), DNS (53), DHCP (67/68). DNS resolves domain names to IP addresses using a hierarchical distributed database.
常见协议:HTTP/HTTPS(80/443)、FTP(21)、SMTP(25)、POP3(110)、IMAP(143)、DNS(53)、DHCP(67/68)。DNS 通过分层分布式数据库将域名解析为 IP 地址。
Network topologies: star, bus, ring, mesh. Packet switching breaks data into packets; each packet may take a different route. A router uses the destination IP address to forward packets; a switch uses MAC addresses within a LAN.
网络拓扑:星型、总线、环形、网状。分组交换将数据分割成数据包;每个包可能走不同路径。路由器根据目的 IP 地址转发数据包;交换机在局域网内根据 MAC 地址转发。
Cyclic Redundancy Check (CRC) is an error-detecting code. Parity bits can detect single-bit errors. CSMA/CD is used in Ethernet to handle collisions.
循环冗余校验(CRC)是一种检错码。奇偶校验位可检测单比特错误。以太网使用 CSMA/CD 处理冲突。
6. Databases and SQL | 数据库与SQL
A relational database organises data into tables with rows (records) and columns (fields). Each table has a primary key that uniquely identifies each record. Foreign keys link tables, enforcing referential integrity.
关系数据库将数据组织成包含行(记录)和列(字段)的表。每个表都有一个唯一标识记录的主键。外键用于连接表,保证引用完整性。
SQL commands: DDL (CREATE, ALTER, DROP), DML (SELECT, INSERT, UPDATE, DELETE). Joins combine rows from multiple tables: INNER JOIN returns matching rows; LEFT JOIN returns all rows from the left table. Indexes speed up query performance but slow down writes.
SQL 命令:DDL(CREATE, ALTER, DROP),DML(SELECT, INSERT, UPDATE, DELETE)。联接合并多个表的行:INNER JOIN 返回匹配的行;LEFT JOIN 返回左表全部行。索引提高查询性能但降低写入速度。
Normalisation (1NF, 2NF, 3NF) reduces data redundancy and anomalies. 1NF: atomic values, no repeating groups; 2NF: full functional dependency on the whole primary key; 3NF: no transitive dependencies.
规范化(1NF, 2NF, 3NF)减少数据冗余和异常。1NF:原子值,无重复组;2NF:所有非键属性完全函数依赖于主键;3NF:消除传递依赖。
ACID properties ensure reliable transactions: Atomicity, Consistency, Isolation, Durability. A DBMS (Database Management System) manages concurrent access via locking and time-stamping.
ACID 特性保障可靠事务:原子性、一致性、隔离性、持久性。数据库管理系统通过加锁和时间戳管理并发访问。
7. Algorithms and Pseudocode | 算法与伪代码
Searching: Linear search O(n); Binary search on a sorted array O(log n). Sorting: Bubble sort O(n²), Insertion sort O(n²), Merge sort O(n log n), Quick sort O(n log n) average but O(n²) worst case.
搜索:线性搜索 O(n);在有序数组上二分搜索 O(log n)。排序:冒泡排序 O(n²),插入排序 O(n²),归并排序 O(n log n),快速排序平均 O(n log n) 最坏 O(n²)。
Abstract Data Types (ADTs): Stack (LIFO) with push/pop; Queue (FIFO) with enqueue/dequeue; Linked list using nodes with pointers; Binary tree (pre-order, in-order, post-order traversals).
抽象数据类型(ADT):栈(后进先出)使用压入/弹出;队列(先进先出)使用入队/出队;链表通过带指针的结点实现;二叉树(前序、中序、后序遍历)。
Recursion: a function calls itself; requires a base case to prevent infinite loops. Iteration usually uses less memory than recursion. Trace tables help walk through algorithm steps manually.
递归:函数调用自身;需要基准情形以避免无限循环。迭代通常比递归占用更少内存。跟踪表用于手动模拟算法步骤。
Big O notation describes the upper bound of an algorithm’s time or space complexity: O(1) constant, O(log n) logarithmic, O(n) linear, O(n log n) linearithmic, O(n²) quadratic.
大 O 表示法描述算法时间或空间复杂度的上界:O(1) 常数,O(log n) 对数,O(n) 线性,O(n log n) 线性对数,O(n²) 平方。
8. Object-Oriented Programming (OOP) | 面向对象编程
Core OOP principles: Encapsulation bundles data and methods; a class defines attributes and behaviours; an object is an instance of a class. Inheritance allows a subclass to inherit properties from a superclass.
面向对象编程核心原则:封装将数据和方法捆绑在一起;类定义属性和行为;对象是类的实例。继承允许子类继承超类的特性。
Polymorphism means the same method name can behave differently depending on the object’s class (overriding) or parameter types (overloading). Abstraction hides complex implementation details, exposing only essential interfaces.
多态指同一方法名可根据对象类(重写)或参数类型(重载)表现出不同行为。抽象隐藏复杂的实现细节,仅暴露基本接口。
UML class diagrams show class name, attributes, methods and relationships: association, aggregation, composition. Composition is a strong ‘has-a’ relationship where the part cannot exist independently.
UML 类图展示类名、属性、方法及关系:关联、聚合、组合。组合是强“拥有”关系,部分无法独立存在。
Constructor is a special method that initialises a new object; destructor releases resources. Access modifiers: public (+), private (-), protected (#). Static methods belong to the class, not to instances.
构造函数是初始化新对象的特殊方法;析构函数释放资源。访问修饰符:public (+),private (-),protected (#)。静态方法属于类而非实例。
9. Software Development Life Cycle | 软件开发生命周期
Typical stages: feasibility study, requirements analysis, design, implementation (coding), testing, deployment, maintenance. Waterfall model is linear; agile models (Scrum, XP) are iterative and responsive to change.
典型阶段:可行性研究、需求分析、设计、实现(编码)、测试、部署、维护。瀑布模型是线性的;敏捷模型(Scrum、极限编程)是迭代式的并响应变化。
Testing methods: unit testing, integration testing, system testing, acceptance testing. Alpha testing is internal; beta testing is with selected users. White-box testing examines internal logic; black-box testing checks functionality without looking at code.
测试方法:单元测试、集成测试、系统测试、验收测试。Alpha 测试为内部测试;Beta 测试由选定用户参与。白盒测试检查内部逻辑;黑盒测试不查看代码仅验证功能。
Debugging involves systematic error finding: breakpoints, stepping, traces, memory dumps. Good documentation includes requirements specification, design docs, user manual and maintenance guide.
调试涉及系统化错误查找:断点、单步执行、跟踪、内存转储。良好文档包括需求规约、设计文档、用户手册和维护指南。
Version control (e.g., Git) tracks changes, supports branching and merging. Continuous integration ensures frequent integration of code changes with automated testing.
版本控制(如 Git)跟踪更改,支持分支与合并。持续集成确保频繁集成代码变更并进行自动化测试。
10. Cybersecurity and Ethics | 网络安全与伦理
Malware types: virus (attaches to files), worm (self-replicates), Trojan horse (disguised as legitimate software), ransomware (locks data for ransom). Phishing deceives users into revealing credentials.
恶意软件类型:病毒(附着文件)、蠕虫(自我复制)、特洛伊木马(伪装成合法软件)、勒索软件(加密数据索要赎金)。网络钓鱼诱骗用户泄露凭证。
Symmetric encryption (e.g., AES) uses one shared key; asymmetric encryption (e.g., RSA) uses public/private key pair. Hashing (SHA-256) produces a fixed-length digest, used for password storage and integrity checks. Digital signatures authenticate sender and ensure data integrity.
对称加密(如 AES)使用同一密钥;非对称加密(如 RSA)使用公钥/私钥对。哈希(SHA-256)生成固定长度摘要,用于密码存储和完整性校验。数字签名验证发送方身份并保证数据完整。
Ethical issues: data privacy, AI bias, intellectual property, digital divide. Computer ethics guidelines (ACM/IEEE) advocate avoiding harm, respecting privacy and acting honestly.
伦理问题:数据隐私、人工智能偏见、知识产权、数字鸿沟。计算机伦理准则(ACM/IEEE)倡导避免伤害、尊重隐私和诚实行事。
Legislation: GDPR (EU) protects personal data; copyright laws protect software. Computer misuse acts criminalise unauthorised access, hacking and malware distribution.
法规:GDPR(欧盟)保护个人数据;版权法保护软件。计算机滥用法将未经授权访问、黑客攻击和恶意软件传播定为犯罪。
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课程辅导,国外大学本科硕士研究生博士课程论文辅导