📚 Year 9 Edexcel Computer Science Quick Reference: Formulae & Theorems | 爱德思 Year 9 计算机科学速查手册:公式与定理
Welcome to your quick reference guide for the key formulae and theorems you'll meet in Year 9 Edexcel Computer Science. The subject is not all about coding – it is built on mathematical and logical rules that control how data is stored, how signals are processed, and how programs make decisions. Keep this handbook close as you revise binary conversions, Boolean algebra, and data-size calculations.
欢迎来到 Year 9 爱德思计算机科学关键公式与定理速查手册。这门课不仅仅涉及编程,它还建立在控制数据存储方式、信号处理方式以及程序如何进行决策的数学与逻辑规则之上。在复习二进制转换、布尔代数和数据大小计算时,请把这份手册放在手边。
1. Place Values in Binary | 二进制的位权
In the binary number system, each digit (bit) holds a place value that doubles from right to left. The rightmost bit has a value of 1 (2⁰), the next 2, then 4, 8, 16, and so on.
在二进制数系统中,每个数字(位)的位权从右向左依次加倍。最右边的位值为 1 (2⁰),接着是 2、4、8、16,以此类推。
Example: The binary pattern 1011₂ is evaluated as (1×8) + (0×4) + (1×2) + (1×1) = 11₁₀.
示例:二进制模式 1011₂ 的值为 (1×8) + (0×4) + (1×2) + (1×1) = 11₁₀。
Decimal = Σ (bit × 2^position), position starts at 0 from the right.
2. Binary to Decimal Conversion Formula | 二进制转十进制公式
To convert a binary number to decimal, multiply each bit by its place value and sum the results. The formula is:
要将二进制数转换为十进制,将每一位乘以其位权,然后求和。公式为:
N₁₀ = bₙ₋₁ × 2ⁿ⁻¹ + … + b₁ × 2¹ + b₀ × 2⁰
Where bₖ is the bit (0 or 1) at position k. This method works for any length of binary string.
其中 bₖ 是第 k 位(0 或 1)。该方法适用于任意长度的二进制串。
3. Decimal to Binary – Repeated Division by 2 | 十进制转二进制 – 除 2 取余法
Divide the decimal number by 2 repeatedly, recording the remainder each time. Read the remainders from bottom to top.
将十进制数反复除以 2,每次记录余数。从下往上读取余数即可得到二进制数。
or 29₁₀: 29 ÷ 2 = 14 r1; 14 ÷ 2 = 7 r0; 7 ÷ 2 = 3 r1; 3 ÷ 2 = 1 r1; 1 ÷ 2 = 0 r1 → 11101₂.
以 29₁₀ 为例:29 ÷ 2 = 14 余 1;14 ÷ 2 = 7 余 0;7 ÷ 2 = 3 余 1;3 ÷ 2 = 1 余 1;1 ÷ 2 = 0 余 1 → 11101₂。
Repeat until quotient = 0; remainder sequence (last to first) gives the binary digits.
4. Hexadecimal Place Values and Conversion | 十六进制位权与转换
Hexadecimal (base 16) uses digits 0–9 and letters A–F (A=10, B=11, …, F=15). Each hex digit represents 4 binary bits (a nibble).
十六进制(基数为 16)使用数字 0–9 和字母 A–F(A=10, B=11, …, F=15)。每个十六进制位代表 4 个二进制位(半字节)。
iply each digit by 16 raised to its position: D7₁₆ = (13×16¹) + (7×16⁰) = 208 + 7 = 215₁₀.
将二进制转换为十六进制时,从右向左每四位一组:1101 0111₂ → D7₁₆。将十六进制转换为十进制时,每位乘以 16 的位置次幂:D7₁₆ = (13×16¹) + (7×16⁰) = 208 + 7 = 215₁₀。
5. Binary Addition and Overflow Rule | 二进制加法与溢出规则
rry 1, 1+1+1=1 carry 1. When the result exceeds the fixed number of bits, overflow occurs.
二进制加法遵循以下规则:0+0=0,0+1=1,1+0=1,1+1=0 进 1,1+1+1=1 进 1。当结果超出固定位数时,发生溢出。
a 4-bit system, 1111₂ + 0001₂ = 10000₂, but only the lower 4 bits are stored, giving 0000₂ – an overflow error.
例如,在 4 位系统中,1111₂ + 0001₂ = 10000₂,但只保留低 4 位,得到 0000₂ —— 发生溢出错误。
Overflow detection: If the carry into the Most Significant Bit (MSB) is different from the carry out of the MSB, overflow has occurred.
6. Image File Size Formula | 图像文件大小公式
The file size of a bitmap image can be estimated using the resolution and colour depth:
位图图像的文件大小可以通过分辨率和颜色深度来估算:
File size (bits) = width in pixels × height in pixels × colour depth (bits per pixel)
Colour depth tells how many bits are used to represent each pixel’s colour. For example, a 24‑bit image uses 8 bits for red, 8 for green, and 8 for blue.
颜色深度表示每个像素的颜色使用多少位来存储。例如,24 位图像使用 8 位红、8 位绿和 8 位蓝。
To convert to bytes, divide by 8; to kilobytes, divide by 1024; to megabytes, divide by 1024².
转换为字节需除以 8;转换为千字节需除以 1024;转换为兆字节需除以 1024²。
- Formula chain: Bits → Bytes (÷8) → KB (÷1024) → MB (÷1024²).
- 转换链:位 → 字节 (÷8) → KB (÷1024) → MB (÷1024²)。
7. Sound File Size Formula | 声音文件大小公式
Uncompressed sound file size depends on the sample rate, bit depth, number of channels, and duration:
未压缩音频文件的大小取决于采样率、位深度、声道数和时长:
File size (bits) = sample rate (Hz) × bit depth × channels × time (seconds)
nels. A 10-second clip would be: 44 100 × 16 × 2 × 10 = 14 112 000 bits, or about 1.68 MB.
例如,CD 品质音频的采样率为 44 100 Hz,位深度为 16 位,双声道。一段 10 秒的音频大小为:44 100 × 16 × 2 × 10 = 14 112 000 位,约 1.68 MB。
8. Logic Gate Truth Tables | 逻辑门真值表
Logic gates are the building blocks of digital circuits. The core gates are NOT, AND, OR, and XOR. Their truth tables define every possible output.
逻辑门是数字电路的基本组件。核心逻辑门包括非门、与门、或门和异或门。它们的真值表定义了所有可能的输出。
| Gate | Symbol | Truth Table |
|---|---|---|
| NOT | ¬A | Input 0 → 1, Input 1 → 0 |
| AND | A ∧ B | 0,0→0; 0,1→0; 1,0→0; 1,1→1 |
| OR | A ∨ B | 0,0→0; 0,1→1; 1,0→1; 1,1→1 |
| XOR | A ⊕ B | 0,0→0; 0,1→1; 1,0→1; 1,1→0 |
Understanding these tables is essential for solving logic circuits and simplifying Boolean expressions.
理解这些真值表对于求解逻辑电路和化简布尔表达式至关重要。
9. De Morgan’s Theorems | 德摩根定理
De Morgan’s laws allow you to transform ANDs into ORs (and vice versa) under negation. They are vital for simplifying circuit designs and Boolean algebra in programming conditions.
德摩根定律允许将取反条件下的与运算转换为或运算(反之亦然)。它们对于简化电路设计和编程条件中的布尔代数至关重要。
First Theorem: ¬(A ∧ B) = ¬A ∨ ¬B
Second Theorem: ¬(A ∨ B) = ¬A ∧ ¬B
In words: the negation of a conjunction is the disjunction of the negations; the negation of a disjunction is the conjunction of the negations.
换言之:与的取反等于取反后的或;或的取反等于取反后的与。
10. Boolean Algebra Laws for Simplification | 布尔代数化简定律
Beyond De Morgan, there are fundamental identities that help reduce Boolean expressions to their simplest forms. These appear in truth-table proofs and logic circuit minimisation.
除了德摩根定律,还有一些基本恒等式有助于将布尔表达式化简到最简形式。它们出现在真值表证明和逻辑电路最小化中。
- Identity laws: A ∧ 1 = A, A ∨ 0 = A
- 恒等律:A ∧ 1 = A,A ∨ 0 = A
- Annihilator laws: A ∧ 0 = 0, A ∨ 1 = 1
- 零一律:A ∧ 0 = 0,A ∨ 1 = 1
- Idempotent laws: A ∧ A = A, A ∨ A = A
- 幂等律:A ∧ A = A,A ∨ A = A
- Complement laws: A ∧ ¬A = 0, A ∨ ¬A = 1
- 互补律:A ∧ ¬A = 0,A ∨ ¬A = 1
- Double negation: ¬(¬A) = A
- 双重否定律:¬(¬A) = A
Apply these step by step to simplify expressions like ¬(A ∧ ¬B) ∨ (¬A ∧ B).
逐步应用这些定律可以化简如 ¬(A ∧ ¬B) ∨ (¬A ∧ B) 这样的表达式。
11. Data Storage Units and Conversion Formulae | 数据存储单位与转换公式
Computer memory and file sizes use a hierarchy of units. Memorising the conversion steps is essential for answering exam questions on storage.
计算机内存和文件大小使用一系列单位。记住转换步骤对于回答关于存储的考试题目至关重要。
| Unit | Abbreviation | Value in bytes |
|---|---|---|
| Bit | b | 1/8 byte |
| Byte | B | 1 |
| Kilobyte | KB | 2¹⁰ = 1024 B |
| Megabyte | MB | 2²⁰ = 1 048 576 B |
| Gigabyte | GB | 2³⁰ B |
| Terabyte | TB | 2⁴⁰ B |
The general rule: to move up a unit, divide by 1024; to move down, multiply by 1024.
一般规则:向上一级单位除以 1024;向下一级单位乘以 1024。
12. Efficiency of Searching and Sorting Algorithms (Big O Concepts) | 搜索与排序算法效率初探(大 O 记号概念)
Although Year 9 does not require formal Big O notation, you should understand the relative efficiency of common algorithms. Linear search checks items one by one; binary search halves the search space each time but requires sorted data.
尽管 Year 9 不要求正式的大 O 符号,但你应该了解常见算法的相对效率。线性搜索逐个检查项目;二分搜索每次将搜索空间减半,但要求数据已排序。
- Linear search: up to n comparisons for n items.
- 线性搜索:对于 n 个项目最多需要 n 次比较。
- Binary search: approximately log₂(n) comparisons (much faster on large lists).
- 二分搜索:大约需要 log₂(n) 次比较(在大型列表中快得多)。
For sorting, bubble sort repeatedly swaps adjacent items out of order, leading to about n²/2 comparisons in the worst case. Insertion sort is usually faster for small or nearly sorted lists.
对于排序,冒泡排序重复交换相邻的逆序项,最坏情况下大约需要 n²/2 次比较。插入排序对于小型或接近有序的列表通常更快。
Understanding these principles helps you choose the right algorithm and predict performance, a key computational thinking skill.
理解这些原理有助于你选择合适的算法并预测性能,这是一项关键的计算思维技能。
Published by TutorHao | Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)

或截图后用「扫一扫 → 相册」选择本图