← 返回资讯屏轩教育 · 行业资讯

Year 9 CCEA Computer Science: Formula and Theorem Quick Reference | CCEA九年级计算机:公式定理速查手册

2026-07-18 19:32 · 本文部分内容由AI辅助创作

📚 Year 9 CCEA Computer Science: Formula and Theorem Quick Reference | CCEA九年级计算机:公式定理速查手册

This quick-reference handbook brings together the essential formulas, theorems and key facts that every Year 9 CCEA Computer Science student needs to know. From binary arithmetic and Boolean logic to algorithm performance and network calculations, the material is organised into concise sections with clear worked examples in both English and Chinese. Use it to revise core concepts, check your understanding and build confidence before your assessments.

本速查手册汇集了每位九年级CCEA计算机科学学生必须掌握的基本公式、定理和关键知识点。从二进制算术和布尔逻辑到算法性能与网络计算,内容按精炼的章节编排,并用中英双语给出清晰的示例。用它来复习核心概念、检验你的理解,并在评估前建立信心。

1. Binary Number System Basics | 二进制数系统基础

t and its place value, which is a power of 2. For an 8-bit binary number b₇b₆b₅b₄b₃b₂b₁b₀ (where b₇ is the most significant bit), the decimal equivalent is: b₇ × 2⁷ + b₆ × 2⁶ + ... + b₀ × 2⁰.

二进制系统只使用两个数字,0和1。每个数字称为一个比特(位)。二进制数的值通过将每位数字与其位值(2的幂次)的乘积相加得到。对于一个8位二进制数 b₇b₆b₅b₄b₃b₂b₁b₀(其中b₇是最高有效位),其十进制值为:b₇ × 2⁷ + b₆ × 2⁶ + ... + b₀ × 2⁰。

from bottom to top. For example, decimal 29: 29 ÷ 2 = 14 r 1; 14 ÷ 2 = 7 r 0; 7 ÷ 2 = 3 r 1; 3 ÷ 2 = 1 r 1; 1 ÷ 2 = 0 r 1. Reading remainders upwards gives 11101, padded to 8 bits as 00011101.

位值(从右到左)依次为1, 2, 4, 8, 16, 32, 64, 128。要将十进制数转换为二进制,重复除以2并从下往上记录余数。例如十进制29:29 ÷ 2 = 14 余 1;14 ÷ 2 = 7 余 0;7 ÷ 2 = 3 余 1;3 ÷ 2 = 1 余 1;1 ÷ 2 = 0 余 1。从下向上读取余数得到11101,补足8位为00011101。


2. Binary Arithmetic | 二进制算术

which is 0 with a carry of 1). When adding two 8-bit numbers, we work from the rightmost bit to the leftmost, propagating carries. Overflow occurs if the result requires more than 8 bits.

二进制加法遵循四条简单规则:0 + 0 = 0,0 + 1 = 1,1 + 0 = 1,1 + 1 = 10(即0并向左进1)。当两个8位数相加时,我们从最右边一位开始向左操作,传递进位。如果结果需要超过8位,则发生溢出。

Binary subtraction can be performed using two's complement. To find the two's complement of a binary number, invert all bits (one's complement) and add 1 to the least significant bit. Subtraction A - B is achieved by adding A to the two's complement of B. The carry into the sign bit and out of it must be the same for the result to be valid.

二进制减法可以通过二进制补码来实现。要求一个二进制数的补码,先将所有位取反(得反码),然后在最低位加1。减法 A - B 可通过将 A 加上 B 的补码来完成。只有当进入符号位的进位与出符号位的进位相同时,结果才有效。


3. Data Storage Units | 数据存储单位

Computer storage is measured using a hierarchical system based on the byte (B). One byte equals 8 bits. The standard units and their exact binary values are:

计算机存储使用基于字节(B)的层级系统进行度量。1字节等于8比特。标准单位及其精确的二进制值如下:

UnitEnglish Definition中文定义Exact Size (Bytes)
1 KB (kilobyte)2¹⁰ bytes = 1024 B2¹⁰ 字节1024 B
1 MB (megabyte)2²⁰ bytes = 1,048,576 B2²⁰ 字节1,048,576 B
1 GB (gigabyte)2³⁰ bytes ≈ 1.074 × 10⁹ B2³⁰ 字节1,073,741,824 B
1 TB (terabyte)2⁴⁰ bytes2⁴⁰ 字节≈ 1.1 × 10¹² B

ide when moving to a larger unit. The relationship is always based on powers of 2, not 10.

在单位之间转换时,向更小单位转换用乘法(例如5 MB转换为KB:5 × 1024 = 5120 KB),向更大单位转换用除法。相邻单位之间的换算关系总是基于2的幂次,而非10的幂次。


4. Boolean Logic Gates | 布尔逻辑门

Logic gates are the building blocks of digital circuits. The three fundamental gates are AND, OR, and NOT. The AND gate outputs 1 only when all inputs are 1. The OR gate outputs 1 when at least one input is 1. The NOT gate inverts its input: if input is 1, output is 0, and vice versa.

逻辑门是数字电路的基本构件。三种基本门为与门、或门和非门。与门仅在所有输入均为1时才输出1。或门在至少一个输入为1时输出1。非门则将输入取反:若输入为1,输出为0;反之亦然。

Two additional gates are commonly used: NAND (NOT AND) and NOR (NOT OR). A NAND gate outputs 0 only when all inputs are 1; otherwise it outputs 1. A NOR gate outputs 1 only when all inputs are 0. These gates are particularly important because every other logic function can be constructed using only NAND gates or only NOR gates.

另外两种常用门是与非门(NAND)和或非门(NOR)。与非门仅在所有输入均为1时输出0,其他情况输出1。或非门仅在所有输入均为0时输出1。这些门特别重要,因为所有其他逻辑函数都可以仅用与非门或仅用或非门来构建。


5. Truth Tables | 真值表

A truth table lists all possible input combinations for a logic circuit and the corresponding output. For a circuit with n inputs, there are 2ⁿ rows. The standard two-input gates have the following truth tables:

真值表列出了逻辑电路所有可能的输入组合及其对应的输出。对于有 n 个输入的电路,有 2ⁿ 行。标准的双输入门真值表如下:

ABANDORNANDNORXOR
0000110
0101101
1001101
1111000

e expressed as A XOR B = (A AND NOT B) OR (NOT A AND B). In Boolean algebra we often write ⊕ for XOR.

异或门(XOR)是一种派生门,仅当输入不同时才输出1。它可以表示为 A XOR B = (A AND NOT B) OR (NOT A AND B)。在布尔代数中我们常用 ⊕ 表示异或。


广告 / Sponsored

6. Boolean Algebra Laws | 布尔代数定律

Boolean algebra provides a set of laws for simplifying logic expressions. The most important are:

布尔代数提供了一套用于简化逻辑表达式的定律。最重要的包括:

Law / 定律Expression (English)表达式
Identity LawA AND 1 = A; A OR 0 = AA · 1 = A; A + 0 = A
Null LawA AND 0 = 0; A OR 1 = 1A · 0 = 0; A + 1 = 1
Idempotent LawA AND A = A; A OR A = AA · A = A; A + A = A
Complement LawA AND NOT A = 0; A OR NOT A = 1A · A̅ = 0; A + A̅ = 1
Commutative LawA AND B = B AND A; A OR B = B OR AA · B = B · A; A + B = B + A
Associative Law(A AND B) AND C = A AND (B AND C)(A · B) · C = A · (B · C)
Distributive LawA AND (B OR C) = (A AND B) OR (A AND C)A · (B + C) = A · B + A · C
Absorption LawA AND (A OR B) = A; A OR (A AND B) = AA · (A + B) = A; A + A · B = A
De Morgan's TheoremNOT (A AND B) = (NOT A) OR (NOT B); NOT (A OR B) = (NOT A) AND (NOT B)(A · B)̅ = A̅ + B̅; (A + B)̅ = A̅ · B̅

De Morgan's theorem is particularly useful for converting AND operations to OR operations (and vice versa) when implementing circuits with universal gates.

德摩根定理在使用通用门实现电路时,特别适用于将“与”操作转化为“或”操作(反之亦然)。


7. Sorting Algorithm Characteristics | 排序算法特性

Two fundamental sorting algorithms appear in the Year 9 curriculum: bubble sort and insertion sort. Bubble sort repeatedly steps through the list, comparing adjacent elements and swapping them if they are in the wrong order. The largest element 'bubbles' to the end in each pass. The process repeats until no more swaps are needed. The maximum number of comparisons for a list of n items is n(n-1)/2.

在九年级的课程中出现两种基本的排序算法:冒泡排序和插入排序。冒泡排序反复遍历列表,比较相邻元素,如果顺序错误则交换它们。每一趟最大的元素“冒泡”到列表末尾。重复此过程直到不再需要交换。对于包含 n 个元素的列表,最大比较次数为 n(n-1)/2。

A bubble sort algorithm can be optimised by stopping early if a pass makes no swaps, indicating the list is already sorted. This reduces unnecessary passes. You should be able to trace a bubble sort on a small list and identify the number of passes and swaps.

如果在一次遍历中没有发生交换,表示列表已经有序,冒泡排序算法可以通过提前停止来优化,从而减少不必要的趟数。你应该能够在一个小型列表上追踪冒泡排序,并识别出遍历的趟数和交换的次数。


8. Searching Algorithm Characteristics | 搜索算法特性

Linear search examines each item in a list sequentially until the target value is found or the list ends. It works on unordered lists and has a worst-case number of checks equal to n (the list length). It is simple but inefficient for large data sets.

线性搜索按顺序检查列表中的每一项,直到找到目标值或列表结束。它适用于无序列表,最坏情况下的检查次数等于 n(列表长度)。这种方法简单,但对于大型数据集效率较低。

Binary search requires the list to be sorted. It repeatedly divides the search interval in half by comparing the target with the middle element. If the target is smaller, the left half is searched; otherwise, the right half. The maximum number of comparisons is log₂(n) rounded up. For example, a list of 1000 items needs at most 10 comparisons using binary search, while linear search might need up to 1000.

二分搜索要求列表已排序。它通过将目标值与中间元素比较,反复将搜索区间减半。如果目标值较小,则搜索左半部分;否则搜索右半部分。最大比较次数为 log₂(n) 向上取整。例如,一个 1000 个元素的列表使用二分搜索最多需要 10 次比较,而线性搜索可能需要多达 1000 次。


9. Programming Concepts: Variables and Data Types | 编程概念:变量与数据类型

In programming, a variable is a named memory location that stores a value. Common data types include integer (whole numbers), float/real (decimal numbers), string (text), and Boolean (true/false). When a value is assigned to a variable, the previous value is overwritten. For example, score = 10 followed by score = score + 5 makes score equal to 15.

在编程中,变量是一个命名的内存位置,用于存储值。常见的数据类型包括整数(整数)、浮点/实数(小数)、字符串(文本)和布尔值(真/假)。当将值赋给变量时,之前的值会被覆盖。例如,score = 10 之后执行 score = score + 5 使得 score 等于 15。

ses first, then multiplication/division, then addition/subtraction. The modulus operator (%) gives the remainder of an integer division. For example, 17 % 5 = 2. String concatenation joins two strings together, e.g., 'Hello ' + 'World' gives 'Hello World'. Comparison operators (==, !=, >, <, >=, <=) return Boolean values.

算术运算符遵循标准优先级:先括号,再乘除,后加减。取模运算符(%)给出整数除法的余数。例如,17 % 5 = 2。字符串拼接将两个字符串连接在一起,例如 'Hello ' + 'World' 得到 'Hello World'。比较运算符(==、!=、>、<、>=、<=)返回布尔值。


10. Number Systems: Conversion Formulas | 数制转换公式

0, B=11, ..., F=15). To convert binary to hexadecimal, group the binary digits in sets of four from right to left and replace each group with its hex digit. For example, 1010 1111₂ = AF₁₆.

三种数制至关重要:十进制(基数为10)、二进制(基数为2)和十六进制(基数为16)。十六进制使用数字0-9和字母A-F(A=10, B=11, ..., F=15)。要将二进制转换为十六进制,从右到左将二进制数字每四位一组分组,并用相应的十六进制数字替换每一组。例如,1010 1111₂ = AF₁₆。

cut from binary to decimal can use the corresponding hex conversion as an intermediate step.

要将十六进制转换为十进制,将每个十六进制数字乘以其位值(16的幂次)。例如,2F₁₆ = 2 × 16¹ + 15 × 16⁰ = 32 + 15 = 47₁₀。从二进制到十进制的捷径可以将十六进制转换作为中间步骤。


11. Network Formulas: Transmission Time | 网络公式:传输时间

When data is sent across a network, the transmission time can be calculated using the formula:

Time (seconds) = Data Size (bits) / Transfer Rate (bits per second)

当数据通过网络发送时,传输时间可以用以下公式计算:

时间(秒)= 数据大小(比特) ÷ 传输速率(比特每秒)

second) and 1 Gbps (gigabits per second). For example, to transfer a 25 MB file over a 100 Mbps connection, the data size in bits is 25 × 1024 × 1024 × 8. Time = (25 × 2²⁰ × 8) / (100 × 10⁶) ≈ 2.1 seconds (using binary megabytes).

务必确保单位匹配。如果数据大小以字节为单位给出,乘以8得到比特。常见的传输速率包括100 Mbps(兆比特每秒)和1 Gbps(吉比特每秒)。例如,通过100 Mbps连接传输一个25 MB的文件,数据大小(比特)为25 × 1024 × 1024 × 8。时间 = (25 × 2²⁰ × 8) ÷ (100 × 10⁶) ≈ 2.1秒(使用二进制兆字节)。


12. Error Detection: Parity Check | 错误检测:奇偶校验

Parity check is a simple error-detection method that adds an extra bit to a binary string to make the total number of 1s either even (even parity) or odd (odd parity). In even parity, if the data already has an even number of 1s, the parity bit is set to 0; otherwise, it is set to 1. The receiver can detect any single-bit error if the parity does not match the expected value.

奇偶校验是一种简单的错误检测方法,它向二进制串添加一个额外的位,使得1的总数为偶数(偶校验)或奇数(奇校验)。在偶校验中,如果数据已有偶数个1,校验位设为0;否则设为1。如果接收到的奇偶性与预期值不匹配,接收方可以检测出任何单比特错误。

The formula for the even parity bit P for a 7-bit data D = d₁d₂d₃d₄d₅d₆d₇ is: P = d₁ ⊕ d₂ ⊕ d₃ ⊕ d₄ ⊕ d₅ ⊕ d₆ ⊕ not correct the error, only detect it, and it fails if an even number of bits are flipped.

对于7位数据 D = d₁d₂d₃d₄d₅d₆d₇,偶校验位 P 的计算公式为:P = d₁ ⊕ d₂ ⊕ d₃ ⊕ d₄ ⊕ d₅ ⊕ d₆ ⊕ d₇。(如果1的个数为奇数,异或和为1。)对于奇校验,P = 异或和取反。奇偶校验只能检测错误而不能纠正错误,而且如果有偶数个位发生翻转,它将检测不到错误。


Published by TutorHao | Computer Science Revision Series | aleveler.com

广告 / Sponsored
Linux高级程序设计(高等院校计算机技术十二五规划教材)/刘加海/季江民/浙江大学出版社
计算机 备考教辅 · 正版现货 · 与本文内容相关
查看详情 / View on Taobao参考价 ¥55.6

更多咨询请联系16621398022(同微信)

备考资讯每日更新,关注不错过
考纲变化 · 科目分析 · 学习方法
扫码关注公众号 tutorhao
在微信里长按二维码识别关注
或截图后用「扫一扫 → 相册」选择本图
公众号:tutorhao