📚 IB & CIE Computer Science: Concept Clarifications | IB CIE 计算机科学概念辨析
In IB and CIE Computer Science, students frequently encounter pairs of terms that sound alike or overlap in everyday language, yet carry precise and distinct meanings in the syllabus. Misunderstanding these can cost marks in exams and lead to flawed design decisions in practical work. This article walks you through ten essential conceptual distinctions, each explained with clear comparisons and real‑world contexts.
在 IB 与 CIE 计算机科学课程中,学生经常会遇到日常用语中听似相近或重叠的术语,但在教学大纲里它们有着精确而不同的含义。混淆这些概念可能在考试中丢分,也会导致实践环节的设计缺陷。本文带你辨析十组核心概念,每一组都用清晰的对比和实际语境加以说明。
1. Compiler vs Interpreter | 编译器与解释器
A compiler translates the entire source code into machine code (or intermediate code) before execution, producing a standalone executable file. An interpreter, by contrast, reads, translates and executes the source code line by line without generating a separate executable.
编译器在执行前将整个源代码翻译成机器码(或中间代码),生成独立的可执行文件。解释器则是逐行读取、翻译并执行源代码,不产生独立的可执行文件。
Once compiled, a program runs faster because the translation overhead occurs only once. Interpreted programs are easier to debug and modify, but they run more slowly due to repeated on‑the‑fly translation.
程序一旦经过编译,运行速度更快,因为翻译开销只发生一次。解释型程序更容易调试和修改,但由于每次都需要即时翻译,运行速度较慢。
C, C++ and Rust typically use compilers; Python, JavaScript and PHP are commonly interpreted (or compiled to bytecode on the fly).
C、C++ 和 Rust 通常使用编译器;Python、JavaScript 和 PHP 常被解释执行(或即时编译为字节码)。
2. RAM vs ROM | 随机存取存储器与只读存储器
RAM (Random Access Memory) is volatile primary memory that temporarily stores data and instructions the CPU is currently using. Its contents are lost when the power is turned off. ROM (Read‑Only Memory) is non‑volatile and retains data permanently; it typically stores firmware or BIOS code essential for booting the computer.
RAM(随机存取存储器)是易失性主存,临时保存 CPU 当前使用的数据和指令,断电后内容丢失。ROM(只读存储器)是非易失性的,可永久保留数据,通常存储启动计算机所必需的固件或 BIOS 代码。
RAM can be read from and written to at high speed. ROM is mostly read‑only (some types like EEPROM can be rewritten under special conditions) and is slower to write, but it guarantees data persistence.
RAM 可被高速读写。ROM 大多只读(部分如 EEPROM 可在特定条件下重写),写入速度较慢,但能确保数据持久保存。
3. Primary Memory vs Secondary Storage | 主存与辅存
Primary memory (such as RAM and cache) is directly accessible by the CPU, provides fast read/write speeds, and holds data and instructions currently in use. Secondary storage (hard disk drives, SSDs, USB sticks) offers persistent, non‑volatile storage with larger capacity but significantly slower access times.
主存(如 RAM 和缓存)可由 CPU 直接访问,读写速度快,保存当前正在使用的数据和指令。辅存(硬盘、固态盘、U盘)提供持久的非易失性存储,容量更大,但访问速度明显较慢。
Without primary memory, the CPU would have to fetch every instruction from slow secondary storage, crippling performance. Secondary storage is essential for keeping operating systems, applications and user files when the power is off.
若没有主存,CPU 每次都得从慢速辅存中取指令,性能将大幅下降。辅存则在断电后继续保存操作系统、应用程序和用户文件。
4. TCP vs UDP | 传输控制协议与用户数据报协议
TCP (Transmission Control Protocol) is a connection‑oriented protocol that guarantees reliable, ordered delivery of data through acknowledgements, retransmissions and flow control. UDP (User Datagram Protocol) is connectionless, sending datagrams without any guarantee of delivery, which reduces latency and overhead.
TCP(传输控制协议)是面向连接的协议,通过确认、重传和流量控制保证数据可靠有序地送达。UDP(用户数据报协议)是无连接的,发送数据报时不保证送达,从而降低了延迟和开销。
TCP is used where accuracy matters most, such as web browsing (HTTP/HTTPS), email (SMTP) and file transfers (FTP). UDP is preferred for real‑time applications like VoIP, live video streaming and online gaming, where occasional packet loss is acceptable but delay is not.
TCP 用于准确性至关重要的场合,如网页浏览(HTTP/HTTPS)、电子邮件(SMTP)和文件传输(FTP)。UDP 则更适用于实时应用,如 VoIP、直播视频流和在线游戏,这些场景可容忍偶尔丢包,但不能容忍延迟。
5. LAN vs WAN | 局域网与广域网
A LAN (Local Area Network) covers a small geographical area such as a single building or campus. It usually offers high data transfer rates and low latency because the network is privately owned and uses technologies like Ethernet and Wi‑Fi. A WAN (Wide Area Network) spans large geographical distances, often connecting multiple LANs across cities or countries, and relies on leased telecommunication lines or public networks.
LAN(局域网)覆盖小范围地理区域,如单栋建筑或校园。由于网络为私有并使用以太网和 Wi‑Fi 等技术,它通常提供高数据传输率和低延迟。WAN(广域网)跨越较大地理距离,常连接城市或国家间的多个 LAN,依赖于租用的电信线路或公共网络。
LANs are faster, cheaper to set up and maintain, while WANs are slower, more expensive because they involve third‑party infrastructure, and introduce higher latency. The internet itself is the largest WAN.
LAN 速度更快、建设和维护成本更低;WAN 则较慢,成本也更高,因为它涉及第三方基础设施,并且还会引入更高的延迟。互联网本身即是最大的 WAN。
6. Symmetric vs Asymmetric Encryption | 对称加密与非对称加密
Symmetric encryption uses a single shared key for both encryption and decryption. It is fast and efficient, making it suitable for encrypting large amounts of data. Asymmetric encryption uses a pair of mathematically related keys: a public key for encryption and a private key for decryption; it provides stronger security for key exchange but is computationally slower.
对称加密使用同一把共享密钥进行加密和解密。它速度快、效率高,适合加密大量数据。非对称加密使用一对数学上相关的密钥:公钥加密,私钥解密;它为密钥交换提供了更强的安全性,但计算开销较大。
AES and DES are common symmetric algorithms; RSA and ECC are typical asymmetric ones. In practice, hybrid systems use asymmetric encryption to safely exchange a symmetric session key, then rely on symmetric encryption for the bulk data transfer.
AES 和 DES 是常见的对称算法;RSA 和 ECC 是典型的非对称算法。实际应用中,混合系统用非对称加密安全地交换对称会话密钥,然后依靠对称加密进行大量数据传输。
7. Lossy vs Lossless Compression | 有损压缩与无损压缩
Lossless compression reduces file size without losing any original data; the decompressed file is identical to the original. Lossy compression permanently discards some data that is considered less perceptible, achieving much smaller file sizes at the cost of quality.
无损压缩在缩小文件体积的同时不丢失任何原始数据,解压后的文件与原文件完全一致。有损压缩会永久舍弃一些被认为不易察觉的数据,以质量换取更小的文件体积。
Techniques like run‑length encoding and Huffman coding are lossless, suitable for text, executable code and archives (ZIP, PNG). JPEG for images, MP3 for audio and MPEG for video use lossy compression, where the human senses’ limitations allow aggressive data reduction.
游程编码、哈夫曼编码等技术属于无损压缩,适用于文本、可执行代码和归档文件(ZIP、PNG)。JPEG 图像、MP3 音频和 MPEG 视频采用有损压缩,利用人类感官的限制可以大幅度削减数据。
8. Stack vs Queue | 栈与队列
A stack is a Last‑In‑First‑Out (LIFO) linear data structure, where elements are inserted and removed only from the top. A queue is a First‑In‑First‑Out (FIFO) structure, where elements enter from the rear and leave from the front.
栈是一种后进先出(LIFO)的线性数据结构,只能在顶部进行插入和删除操作。队列是先进先出(FIFO)的结构,元素从队尾进入,从队首离开。
Stacks are fundamental to calling subprograms (call stacks), undo mechanisms and backtracking algorithms. Queues govern print spoolers, task scheduling and breadth‑first traversals. Attempting to pop from an empty stack or dequeue from an empty queue causes an underflow error.
栈是实现子程序调用(调用栈)、撤销机制和回溯算法的基础。队列则支配着打印缓冲池、任务调度和广度优先遍历。尝试从空栈弹出或从空队列出队会引发下溢错误。
9. IPv4 vs IPv6 | IPv4 与 IPv6
IPv4 uses 32‑bit addresses, yielding roughly 4.3 billion unique addresses, written in dotted‑decimal notation (e.g., 192.168.1.1). IPv6 employs 128‑bit addresses, providing an astronomically large address space (about 3.4×10³⁸ addresses), and uses hexadecimal colon‑separated notation (e.g., 2001:0db8:85a3::8a2e:0370:7334).
IPv4 使用 32 位地址,能提供约 43 亿个唯一地址,采用点分十进制记法(如 192.168.1.1)。IPv6 采用 128 位地址,地址空间极为庞大(约 3.4×10³⁸ 个地址),使用十六进制冒号分隔记法(如 2001:0db8:85a3::8a2e:0370:7334)。
IPv4 relies heavily on NAT (Network Address Translation) to cope with address exhaustion. IPv6 eliminates the need for NAT in theory, offers simplified header structures, built‑in IPsec support and better multicast handling. However, full global migration remains gradual.
IPv4 严重依赖 NAT(网络地址转换)来应对地址枯竭问题。IPv6 在理论上消除了对 NAT 的需求,提供了更简洁的首部结构、内置 IPsec 支持和更优的多播处理。但全球范围内的迁移仍然缓慢。
10. Authentication vs Authorization | 认证与授权
Authentication is the process of verifying the identity of a user, device or system. It answers ‘Who are you?’ — typically through passwords, biometrics or multi‑factor tokens. Authorization determines what an authenticated entity is permitted to do, answering ‘What are you allowed to access?’
认证是验证用户、设备或系统身份的过程,它回答“你是谁?”——通常通过密码、生物识别或多因子令牌来实现。授权决定通过认证的实体被允许执行哪些操作,回答“你可以访问什么?”。
A user first authenticates by logging in; thereafter the system checks authorization rules (permissions, roles) to grant or deny access to specific resources, such as files, databases or administrative features. Strong authentication without proper authorization still leaves a system vulnerable to privilege escalation.
用户先通过登录进行认证;随后系统检查授权规则(权限、角色)以允许或拒绝对特定资源(如文件、数据库或管理功能)的访问。仅有严格的身份验证而没有恰当的授权,仍然会使系统面临权限提升的风险。
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课程辅导,国外大学本科硕士研究生博士课程论文辅导