OCR Computer Science Year 1: Foundations of Computing | OCR 计算机科学第一年:计算基础

📚 OCR Computer Science Year 1: Foundations of Computing | OCR 计算机科学第一年:计算基础

The first year of OCR A Level Computer Science builds the essential theoretical knowledge underpinning modern computing. From the inner workings of the processor to the principles of networking and data representation, these foundations equip learners to analyse, design, and evaluate digital systems with confidence. This article unpacks the core topics and key terminology required for success in the AS and first year of the full A Level.

OCR A Level 计算机科学第一年构建了支撑现代计算的关键理论知识。从处理器内部运行机制到网络原理与数据表示,这些基础使学生能够自信地分析、设计和评估数字系统。本文拆解了 AS 阶段及完整 A Level 第一年的核心主题和关键术语。

1. The Fetch-Decode-Execute Cycle | 取指-解码-执行周期

The fetch-decode-execute (FDE) cycle is the fundamental process by which a CPU executes instructions. During the fetch stage, the program counter (PC) holds the address of the next instruction, which is copied to the memory address register (MAR). The instruction is then read from memory into the memory data register (MDR) and copied to the current instruction register (CIR). The PC is incremented to point to the next instruction.

取指-解码-执行 (FDE) 周期是 CPU 执行指令的基本过程。在取指阶段,程序计数器 (PC) 存放下一条指令的地址,该地址被复制到内存地址寄存器 (MAR)。接着指令从内存读入内存数据寄存器 (MDR) 并复制到当前指令寄存器 (CIR)。PC 递增,指向下一条指令。

During the decode stage, the control unit interprets the opcode and operand from the CIR, preparing the necessary control signals. The execute stage then carries out the instruction, which may involve the ALU for arithmetic or logic operations, data transfer, or a branch that alters the PC value. This cycle repeats billions of times per second in modern processors.

在解码阶段,控制单元解读 CIR 中的操作码和操作数,准备必要的控制信号。执行阶段随即实施指令,这可能涉及算术逻辑单元 (ALU) 进行算术或逻辑运算、数据传输,或改变 PC 值的跳转。现代处理器中,该周期每秒重复数十亿次。


2. CPU Architecture and Factors Affecting Performance | CPU 架构与影响性能的因素

Key components of the CPU include the arithmetic logic unit (ALU), control unit (CU), registers, and internal buses. The ALU performs calculations and logical comparisons; the CU orchestrates the FDE cycle. Registers such as the accumulator, MAR, MDR, CIR, and PC provide high-speed storage for data and instructions currently in use.

CPU 的关键组件包括算术逻辑单元 (ALU)、控制单元 (CU)、寄存器和内部总线。ALU 执行计算和逻辑比较;CU 协调 FDE 周期。累加器、MAR、MDR、CIR 和 PC 等寄存器为当前使用的数据和指令提供高速存储。

Processor performance is influenced by clock speed, number of cores, and cache size. A higher clock speed yields more FDE cycles per second, while multiple cores allow true parallel execution. Larger, faster cache memory reduces the average time to access data from main memory. Pipelining further improves throughput by overlapping the stages of multiple instructions.

处理器性能受时钟速度、核心数量和缓存大小影响。更高的时钟速度意味着每秒更多 FDE 周期,而多个核心允许真正的并行执行。更大更快的缓存内存可减少从主存取数据的平均时间。流水线技术通过重叠多条指令的各阶段进一步提高吞吐量。


3. Input, Output and Storage Devices | 输入、输出和存储设备

Input devices such as keyboards, optical mice, barcode scanners, and touchscreens capture real-world data and convert it into digital signals. Output devices like monitors, printers, speakers, and actuators present processed information to users or the environment. Each device requires suitable interfaces and drivers to communicate with the system.

键盘、光电鼠标、条码扫描仪和触摸屏等输入设备捕获现实世界数据并将其转换为数字信号。监视器、打印机、扬声器和执行器等输出设备向用户或环境呈现处理后的信息。每种设备都需要合适的接口和驱动程序与系统通信。

Storage can be primary (RAM, ROM) or secondary (HDD, SSD, optical, flash). RAM is volatile and fast, holding currently running programs and data. ROM is non-volatile and stores boot instructions. Secondary storage varies in capacity, speed, portability, durability, and cost per gigabyte, with SSDs offering faster access times and lower power consumption than traditional HDDs.

存储可分为主存 (RAM、ROM) 或辅存 (HDD、SSD、光盘、闪存)。RAM 易失且高速,存放正在运行的程序和数据。ROM 非易失,存储启动指令。辅存在容量、速度、便携性、耐用性和每 GB 成本上各不相同,SSD 比传统 HDD 提供更快的访问速度和更低的功耗。


4. Systems Software: Operating Systems and Utility Software | 系统软件:操作系统与实用程序

An operating system (OS) manages hardware resources, provides a user interface, handles file management, and enables multitasking. It uses scheduling algorithms to allocate processor time, manages memory through paging or segmentation, and controls peripheral devices via drivers. Security features such as user authentication and access rights are also integral.

操作系统 (OS) 管理硬件资源、提供用户界面、处理文件管理并支持多任务处理。它通过调度算法分配处理器时间,通过分页或分段管理内存,并通过驱动程序控制外围设备。用户认证和访问权限等安全功能也是其组成部分。

Utility software performs specialised maintenance tasks. Disk defragmentation reorganises fragmented files to improve access speed, compression software reduces file size for storage or transmission, and encryption utilities protect data confidentiality. Backup software automates the copying and restoration of data to prevent loss.

实用程序软件执行专门的维护任务。磁盘碎片整理重新组织碎片文件以提高访问速度,压缩软件减小文件大小以便存储或传输,加密实用程序保护数据机密性。备份软件自动复制和恢复数据以防止丢失。


5. Programming Concepts: Data Types, Structures and Algorithms | 编程概念:数据类型、结构与算法

Programming languages support primitive data types such as integer, real (float), Boolean, and character. Composite types include arrays, records, and strings. Variables hold data values, while constants remain fixed. Selecting appropriate data types optimises memory usage and ensures correct operations.

编程语言支持基本数据类型,如整数、实数 (浮点数)、布尔型和字符。复合类型包括数组、记录和字符串。变量保存数据值,而常量保持不变。选择合适的数据类型可以优化内存使用并确保操作正确。

Common data structures include one- and two-dimensional arrays, lists, stacks, queues, and binary trees. Searching and sorting algorithms such as linear search, binary search, bubble sort, and insertion sort are fundamental. Algorithm efficiency is analysed using Big O notation, focusing on best, average, and worst-case time complexity.

常见数据结构包括一维和二维数组、列表、栈、队列和二叉树。搜索和排序算法如线性搜索、二分搜索、冒泡排序和插入排序是基础。算法效率使用大 O 符号分析,关注最好、平均和最差情况下的时间复杂度。


6. Boolean Algebra and Logic Gates | 布尔代数和逻辑门

Boolean algebra operates on binary variables using logical operators AND (⋅), OR (+), and NOT (¬). Key identities simplify expressions and reduce circuit complexity, for example:

布尔代数使用逻辑运算符 AND (·)、OR (+) 和 NOT (¬) 对二进制变量进行运算。关键恒等式可简化表达式并降低电路复杂性,例如:

A + 0 = A,    A ⋅ 1 = A,    A + ¬A = 1,    A ⋅ ¬A = 0

De Morgan’s laws are used to convert between AND and OR logic with negation: ¬(A ⋅ B) = ¬A + ¬B and ¬(A + B) = ¬A ⋅ ¬B. Truth tables display all possible input combinations and their corresponding outputs, enabling verification of logical equivalence.

德摩根定律用于在带有否定的 AND 和 OR 逻辑之间转换:¬(A ⋅ B) = ¬A + ¬B 以及 ¬(A + B) = ¬A ⋅ ¬B。真值表显示所有可能的输入组合及其对应输出,可用于验证逻辑等价。

Logic gates (AND, OR, NOT, NAND, NOR, XOR) physically implement Boolean functions. A combination of gates can be represented as a logic circuit or simplified using Karnaugh maps for up to four variables.

逻辑门 (AND、OR、NOT、NAND、NOR、XOR) 在物理上实现布尔函数。门的组合可以表示为逻辑电路,或使用卡诺图 (最多四个变量) 进行简化。


7. Data Representation: Binary, Hexadecimal and Character Sets | 数据表示:二进制、十六进制和字符集

All data in a computer is stored as binary digits (bits). Unsigned integers are represented directly in binary; signed integers use two’s complement to represent both positive and negative numbers. An 8-bit two’s complement number can hold values from -128 to +127. Binary addition follows fixed rules, and overflow occurs when the result exceeds the bit width.

计算机中的所有数据都以二进制位 (bit) 存储。无符号整数直接用二进制表示;有符号整数使用补码 (two’s complement) 表示正负数。一个 8 位补码数可保存从 -128 到 +127 的值。二进制加法遵循固定规则,当结果超出位宽时发生溢出。

Hexadecimal (base-16) provides a compact way to represent binary values, where each hex digit corresponds to four bits (a nibble). For instance, 10101101₂ becomes AD₁₆. It is widely used for memory addresses and colour codes.

十六进制 (基数为 16) 提供了一种表示二进制值的紧凑方式,每个十六进制数字对应四个二进制位 (半字节)。例如,10101101₂ 变为 AD₁₆。它广泛用于内存地址和颜色代码。

Character sets map binary codes to symbols. ASCII uses 7 or 8 bits for 128 or 256 characters, sufficient for English. Unicode extends this to thousands of characters supporting multiple languages and emoji, with UTF-8 being a variable-length encoding that remains compatible with ASCII.

字符集将二进制代码映射到符号。ASCII 使用 7 或 8 位表示 128 或 256 个字符,足以满足英语需求。Unicode 将其扩展到数千个字符,支持多种语言和表情符号,其中 UTF-8 是一种与 ASCII 兼容的变长编码。


8. Compression, Encryption and Hashing | 压缩、加密和哈希

Compression reduces file size for storage or transmission. Lossless compression (e.g., run-length encoding, dictionary-based methods) allows exact original data reconstruction. Lossy compression (e.g., JPEG, MP3) permanently discards non-essential information to achieve higher compression ratios, suitable for multimedia where slight quality loss is acceptable.

压缩可减少文件大小以便存储或传输。无损压缩 (例如游程编码、基于字典的方法) 允许精确重建原始数据。有损压缩 (例如 JPEG、MP3) 永久丢弃非必要信息以获得更高压缩率,适用于可接受轻微质量损失的多媒体文件。

Encryption secures data using algorithms and keys. Symmetric encryption uses a single shared key for both encryption and decryption, requiring secure key exchange. Asymmetric encryption uses a public/private key pair, solving the key distribution problem. Hashing produces a fixed-size digest from input data; it is one-way and used for password storage and data integrity checks.

加密使用算法和密钥保护数据。对称加密使用单一共享密钥进行加密和解密,需要安全的密钥交换。非对称加密使用公钥/私钥对,解决了密钥分发问题。哈希根据输入数据生成固定大小的摘要;它是单向的,用于密码存储和数据完整性校验。


9. Databases and SQL | 数据库与 SQL

A relational database stores data in tables (relations) linked by primary and foreign keys. Normalisation reduces data redundancy and anomalies by organising data into appropriate structures, typically up to third normal form (3NF). Queries are performed using Structured Query Language (SQL).

关系数据库将数据存储在用主键和外键关联的表 (关系) 中。规范化通过将数据组织成适当结构 (通常达到第三范式 3NF) 来减少数据冗余和异常。查询使用结构化查询语言 (SQL) 执行。

Basic SQL commands include SELECT to retrieve data, INSERT to add rows, UPDATE to modify existing records, and DELETE to remove rows. The WHERE clause filters results, and JOIN combines rows from multiple tables based on related columns. For example: SELECT Student.Name, Course.Title FROM Student INNER JOIN Enrolment ON Student.StudentID = Enrolment.StudentID INNER JOIN Course ON Enrolment.CourseID = Course.CourseID;

基本 SQL 命令包括用于检索数据的 SELECT、添加行的 INSERT、修改现有记录的 UPDATE 和删除行的 DELETE。WHERE 子句过滤结果,JOIN 根据相关列将多个表的行组合起来。例如:SELECT Student.Name, Course.Title FROM Student INNER JOIN Enrolment ON Student.StudentID = Enrolment.StudentID INNER JOIN Course ON Enrolment.CourseID = Course.CourseID;


10. Networks and the Internet | 网络与互联网

Networks are classified by scale: LAN (local area), WAN (wide area). Topologies include star, bus, ring, and mesh, each with advantages in cost, reliability, and scalability. The TCP/IP protocol stack consists of application, transport, internet, and link layers, encapsulating data as it moves down and decapsulating as it moves up.

网络按规模分类:LAN (局域网)、WAN (广域网)。拓扑结构包括星型、总线型、环型和网状型,每种在成本、可靠性和可扩展性方面各有利弊。TCP/IP 协议栈由应用层、传输层、互联网层和链路层组成,数据向下移动时封装,向上时解封。

The Domain Name System (DNS) resolves human-readable domain names to IP addresses. IPv4 provides approximately 4.3 billion addresses, while IPv6 expands the address space with 128-bit addresses. Network security involves firewalls, packet filtering, and encryption to protect data in transit.

域名系统 (DNS) 将人类可读的域名解析为 IP 地址。IPv4 提供约 43 亿个地址,而 IPv6 使用 128 位地址扩展了地址空间。网络安全涉及防火墙、数据包过滤和加密,以保护传输中的数据。

Key networking hardware includes switches, routers, and wireless access points. Switches forward frames within a LAN based on MAC addresses, while routers forward packets between different networks using IP addresses. Wireless networks use standards such as Wi-Fi (IEEE 802.11).

关键网络硬件包括交换机、路由器和无线接入点。交换机根据 MAC 地址在局域网内转发帧,而路由器使用 IP 地址在不同网络间转发数据包。无线网络使用 Wi-Fi (IEEE 802.11) 等标准。


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课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply

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

Exit mobile version