📚 IB AQA Computer Science: Last-Minute Revision Notes | IB AQA 计算机:考前冲刺笔记
This set of revision notes covers the essential topics for both IB Diploma Computer Science and AQA A-level Computer Science examinations. The concise bilingual format is designed to help you review key concepts efficiently before the exam.
这本考前冲刺笔记涵盖了IB文凭计算机科学和AQA A-level计算机科学考试的核心话题。简洁的双语形式旨在帮助你在考前高效复习关键概念。
1. Binary & Data Representation | 二进制与数据表示
All data in a computer is stored as binary digits (bits). Numbers can be represented in unsigned binary, sign-magnitude, or two’s complement for negative values. Floating-point numbers follow the IEEE 754 standard with mantissa and exponent.
计算机中的所有数据都以二进制位存储。数字可以用无符号二进制、原码或补码表示负值。浮点数遵循IEEE 754标准,使用尾数和指数。
Binary arithmetic includes addition, multiplication, and shifting. An overflow occurs when the result exceeds the allocated bit width. Two’s complement simplifies subtraction by allowing the addition of a negative number.
二进制运算包括加法、乘法和移位。当结果超出分配的位宽时会发生溢出。补码通过允许加上一个负数简化了减法运算。
To convert between denary and binary, use division by 2 or sum of weighted bits. Hexadecimal is a compact representation, with each hex digit representing 4 bits. ASCII and Unicode encode characters, with Unicode supporting global scripts using variable-length encoding like UTF-8.
在十进制和二进制之间转换时,可使用除2取余法或加权位求和。十六进制是一种紧凑表示法,每个十六进制数字代表4个二进制位。ASCII和Unicode用于字符编码,Unicode使用UTF-8等变长编码支持全球文字。
Example: 1101₂ = 1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 13₁₀ = D₁₆
2. Computer Architecture & Fetch-Execute Cycle | 计算机体系结构与取指执行周期
The Von Neumann architecture stores both instructions and data in the same memory. The CPU contains the control unit (CU), arithmetic logic unit (ALU), and registers including the program counter (PC), memory address register (MAR), and memory data register (MDR).
冯·诺依曼体系结构将指令和数据存储在同一内存中。CPU包含控制单元(CU)、算术逻辑单元(ALU)以及程序计数器(PC)、内存地址寄存器(MAR)和内存数据寄存器(MDR)等寄存器。
The fetch-decode-execute cycle repeats for each instruction. The PC holds the address of the next instruction. It is copied to the MAR, the instruction is fetched into the MDR, then decoded and executed by the CU and ALU. The cycle continuously increments the PC.
每条指令重复执行取指-解码-执行周期。PC存放下一条指令的地址。该地址被复制到MAR,指令被取入MDR,然后由CU和ALU解码并执行。该周期不断递增PC。
Factors affecting performance include clock speed, number of cores, cache size, and word length. Pipelining allows overlapping of fetch, decode, and execute stages to improve throughput. The Harvard architecture uses separate memory for instructions and data, enabling simultaneous access.
影响性能的因素包括时钟速度、核心数量、缓存大小和字长。流水线允许取指、解码和执行阶段重叠以提高吞吐量。哈佛体系结构为指令和数据使用独立存储器,可实现同时访问。
Buses (data, address, control) connect CPU components. The width of the address bus determines maximum addressable memory. Current architectures use multi-level caches (L1, L2, L3) to reduce memory latency.
总线(数据、地址、控制)连接CPU组件。地址总线的宽度决定了最大可寻址内存。当前体系结构使用多级缓存(L1、L2、L3)来减少内存延迟。
3. Operating Systems & Resource Management | 操作系统与资源管理
The operating system (OS) manages hardware resources and provides services for application software. Key functions include memory management, processor scheduling, file management, and I/O operations.
操作系统(OS)管理硬件资源并为应用软件提供服务。关键功能包括内存管理、处理器调度、文件管理和输入输出操作。
Memory management uses paging, segmentation, or virtual memory to allocate RAM efficiently. The OS may swap pages between RAM and secondary storage when memory is full. A page table maps virtual addresses to physical frames.
内存管理使用分页、分段或虚拟内存来有效分配RAM。当内存用满时,OS可能在RAM和辅助存储器之间交换页面。页表用于将虚拟地址映射到物理帧。
Processor scheduling algorithms determine which process runs next. Common algorithms include First Come First Served (FCFS), Shortest Job First (SJF), Round Robin (RR), and priority-based scheduling. Context switching allows multitasking but incurs overhead.
处理器调度算法决定下一个运行哪个进程。常见算法包括先来先服务(FCFS)、最短作业优先(SJF)、轮转(RR)和基于优先级的调度。上下文切换实现多任务但会产生开销。
The OS also handles interrupt handling and manages peripheral devices through device drivers. File systems (e.g., FAT32, NTFS, ext4) organize data on storage devices, providing hierarchical directory structures and access permissions.
OS还处理中断并通过设备驱动程序管理外围设备。文件系统(如FAT32、NTFS、ext4)在存储设备上组织数据,提供分层目录结构和访问权限。
4. Programming Concepts & Control Structures | 编程概念与控制结构
Basic programming constructs include sequence, selection (if, else, switch), and iteration (while, for, repeat). These control structures form the logic of any program. Variables store data of specific types such as integer, real, Boolean, and string.
基本编程结构包括顺序、选择(if, else, switch)和循环(while, for, repeat)。这些控制结构构成了任何程序的逻辑。变量存储特定类型的数据,如整数、实数、布尔值和字符串。
Subroutines (functions and procedures) promote code reuse and modularity. Parameters can be passed by value or by reference. Recursion is a technique where a function calls itself to solve problems like factorial or Fibonacci; it requires a base case to avoid infinite loops.
子程序(函数和过程)促进代码重用和模块化。参数可以按值传递或按引用传递。递归是一种函数调用自身来解决问题(如阶乘或斐波那契)的技术;它需要一个基本情况以避免无限循环。
Error handling, such as try-catch blocks, is crucial for robust programs. Debugging techniques include dry running, trace tables, and breakpoints to identify logic errors. An integrated development environment (IDE) provides tools like code completion, syntax highlighting, and debugging.
错误处理(如try-catch块)对健壮的程序至关重要。调试技术包括手动执行、跟踪表和断点,以识别逻辑错误。集成开发环境(IDE)提供代码补全、语法高亮和调试等工具。
Data types and structures must be chosen carefully. Constants improve readability. Scope determines the visibility of variables (local vs global). Well-named identifiers and comments make code more maintainable.
数据类型和结构必须谨慎选择。常量提高可读性。作用域决定变量的可见性(局部 vs 全局)。命名良好的标识符和注释让代码更易于维护。
5. Data Structures: Arrays, Lists, Stacks & Queues | 数据结构
Published by TutorHao | IB Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply