📚 Year 9 AQA Computer Science: Formula & Theorem Quick Reference Handbook | AQA 九年级计算机:公式定理速查手册
This handbook collates the essential formulas, logic rules and data calculations needed for the Year 9 AQA Computer Science curriculum. Use it to revise binary arithmetic, file size estimation, Boolean algebra and algorithm efficiency — all presented in a clear, bilingual format.
这本速查手册整理了 AQA 九年级计算机课程所必需的核心公式、逻辑法则与数据计算。你可以通过它来复习二进制运算、文件大小估算、布尔代数以及算法效率——所有内容均以清晰的双语形式呈现。
1. Information Storage Units | 信息存储单位
A bit is the smallest unit of data, holding a single 0 or 1. Eight bits form a byte. Larger units are powers of 2, not powers of 10.
位(bit)是最小的数据单位,存储一个 0 或 1。8 个位组成一个字节(byte)。更大的单位以 2 的幂次递进,而非 10 的幂次。
1 byte = 8 bits
1 KB = 2¹⁰ bytes = 1 024 bytes
1 MB = 2²⁰ bytes ≈ 1 048 576 bytes
- Nibble: 4 bits | 半字节:4 位
- Word: a fixed-sized piece of data handled by a CPU, often 16, 32 or 64 bits | 字:CPU 一次处理的固定长度数据,通常为 16、32 或 64 位
2. Binary Addition Rules | 二进制加法规则
Binary addition follows four simple rules, identical in principle to decimal addition but carrying occurs at 2 rather than 10.
二进制加法遵循四条简单规则,原理与十进制加法相同,但逢 2 进 1 而非逢 10 进 1。
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 0 carry 1 → 10₂
When adding multi-bit numbers, align them to the right and add column by column, carrying any excess 2 into the next left column. An overflow bit is generated if the result exceeds the available number of bits.
多位二进制数相加时,右对齐后逐列相加,逢 2 向左进 1。如果结果超出给定位数,则产生溢出位。
3. Binary Shifts (Multiplication & Division) | 二进制移位(乘法与除法)
Shifting the bits of a binary number to the left multiplies the number by 2 for each shift. Shifting to the right divides the number by 2, discarding any remainder.
将二进制数的位向左移动,每移一位相当于乘以 2;向右移动,每移一位相当于除以 2,舍去余数。
Left shift by n places: value × 2ⁿ
Right shift by n places: value ÷ 2ⁿ (integer division)
Example: 1010₂ (10) left-shifted by 1 → 10100₂ (20). Right-shifted by 1 → 0101₂ (5). | 示例:1010₂ (10) 左移 1 位 → 10100₂ (20);右移 1 位 → 0101₂ (5)。
4. Text File Size Calculation | 文本文件大小计算
The size of a plain text file depends on the number of characters and the bits per character determined by the encoding standard.
纯文本文件的大小取决于字符数量以及编码标准所确定的每个字符的位数。
File size (bits) = Number of characters × Bits per character
ASCII uses 7 bits per character (often stored as 8 bits). Extended ASCII uses 8 bits. Unicode (UTF-8) uses 8 to 32 bits depending on the character, but common Latin characters take 8 bits.
ASCII 每个字符 7 位(通常存储为 8 位)。扩展 ASCII 使用 8 位。Unicode (UTF-8) 根据不同字符使用 8 到 32 位,常见拉丁字符占用 8 位。
5. Image File Size Calculation | 图像文件大小计算
An image is a grid of pixels. Each pixel’s colour is stored using a fixed number of bits called the colour depth. The total file size for an uncompressed bitmap is determined by the resolution and colour depth.
图像是由像素组成的网格。每个像素的颜色使用固定数量的位来存储,称为色彩深度。未压缩位图的总文件大小由分辨率和色彩深度决定。
Image size (bits) = Width (px) × Height (px) × Colour depth (bits per pixel)
ur (8 bits for red, green, blue each), size = 1920 × 1080 × 24 ≈ 49 766 400 bits ≈ 6.2 MB.
对于 1920×1080、24 位色彩(红绿蓝各 8 位)的图像,大小 = 1920 × 1080 × 24 ≈ 4976 万位 ≈ 6.2 MB。
6. Sound File Size Calculation | 声音文件大小计算
Digital sound is stored as a sequence of samples taken at a regular rate. Each sample records the amplitude using a number of bits. The file size for uncompressed audio depends on the sample rate, bit depth, duration and number of channels.
数字声音以固定速率采样得到的序列形式存储。每个采样使用一定位数记录振幅。未压缩音频的文件大小取决于采样率、位深度、时长和声道数。
Sound size (bits) = Sample rate (Hz) × Bit depth × Duration (s) × Number of channels
bits, 2 channels), one minute of sound = 44 100 × 16 × 60 × 2 ≈ 84 672 000 bits ≈ 10.1 MB.
对于 CD 音质的立体声(44 100 Hz、16 位、双声道),一分钟声音 = 44 100 × 16 × 60 × 2 ≈ 8467 万位 ≈ 10.1 MB。
7. Logic Gates & Truth Tables | 逻辑门与真值表
Logic gates are the basic building blocks of digital circuits. Each gate implements a Boolean function. The output is either TRUE (1) or FALSE (0) based on the inputs.
逻辑门是数字电路的基本构件。每个门实现一个布尔函数,输出根据输入为真 (1) 或假 (0)。
| Gate | 门 | Symbol (Boolean) | 符号(布尔) | Truth Table Summary | 真值表摘要 |
|---|---|---|
| AND | 与 | A ∧ B | Output 1 only when both inputs are 1 | 仅当两个输入均为 1 时输出 1 |
| OR | 或 | A ∨ B | Output 1 if at least one input is 1 | 至少一个输入为 1 时输出 1 |
| NOT | 非 | ¬A | Output is the inverse of A | 输出为 A 的反 |
| NAND | 与非 | ¬(A ∧ B) | Output 0 only when both inputs are 1 | 仅当两个输入均为 1 时输出 0 |
| NOR | 或非 | ¬(A ∨ B) | Output 1 only when both inputs are 0 | 仅当两个输入均为 0 时输出 1 |
| XOR | 异或 | A ⊕ B | Output 1 when inputs are different | 输入相异时输出 1 |
8. Boolean Algebra Laws | 布尔代数基本定律
Boolean algebra simplifies logic expressions, making circuits smaller and more efficient. The laws below use A, B, C for Boolean variables (0 or 1).
布尔代数可用于化简逻辑表达式,使电路更小、更高效。以下定律中 A、B、C 为布尔变量(0 或 1)。
Identity: A ∧ 1 = A, A ∨ 0 = A
Null: A ∧ 0 = 0, A ∨ 1 = 1
Idempotent: A ∧ A = A, A ∨ A = A
Complement: A ∧ ¬A = 0, A ∨ ¬A = 1
Commutative: A ∧ B = B ∧ A, A ∨ B = B ∨ A
Associative: (A ∧ B) ∧ C = A ∧ (B ∧ C)
Distributive: A ∧ (B ∨ C) = (A ∧ B) ∨ (A ∧ C)
Absorption: A ∨ (A ∧ B) = A, A ∧ (A ∨ B) = A
These laws are the foundation for simplifying digital circuits and are often tested with truth tables or logic diagrams.
这些定律是化简数字电路的基础,常结合真值表或逻辑图进行考查。
9. De Morgan's Theorems | 德摩根定理
De Morgan's theorems describe how to translate between AND and OR operations when negations are applied. They are essential for designing circuits that use only one type of gate.
德摩根定理描述了带有非运算时 AND 与 OR 之间的转换关系,是仅使用单一类型门设计电路的关键。
¬(A ∧ B) = ¬A ∨ ¬B
¬(A ∨ B) = ¬A ∧ ¬B
In words: the negation of an AND is the OR of the negations; the negation of an OR is the AND of the negations.
换言之:AND 的非等于各输入的非再 OR;OR 的非等于各输入的非再 AND。
10. Algorithm Efficiency – Searching | 算法效率 – 搜索
Linear search checks each element one by one. Binary search works on sorted lists by repeatedly halving the search interval. Their worst-case performances differ significantly.
线性搜索逐个检查元素。二分搜索在已排序的列表中反复将搜索区间减半。两者的最坏情况性能差异显著。
Linear search max steps = n (for a list of n items)
Binary search max steps = ⌈log₂ n⌉
could need 1 000 000 steps; binary search needs at most 20 steps (since 2²⁰ = 1 048 576).
对于 100 万个数据项的列表,线性搜索可能需要 100 万步;而二分搜索最多只需要 20 步(因为 2²⁰ = 1 048 576)。
11. Compression Ratio | 压缩比
Compression reduces file size for storage or transmission. The compression ratio measures how much smaller the compressed file is compared to the original.
压缩可减小文件大小以便存储或传输。压缩比衡量压缩后文件比原始文件小多少。
Compression ratio = Uncompressed size ÷ Compressed size
0 MB file is compressed to 2 MB, the compression ratio is 10 ÷ 2 = 5:1. Often expressed as '5:1'. A higher ratio means better compression.
若一个 10 MB 的文件压缩至 2 MB,压缩比为 10 ÷ 2 = 5:1,常写作“5:1”。比值越高表示压缩效果越好。
12. Network Data Transfer Rate | 网络数据传输速率
The time taken to transfer a file over a network is calculated from the file size and the network speed. Speeds are given in bits per second (bps) while file sizes are often in bytes — remember to convert units.
通过网络传输文件所需的时间可由文件大小和网络速率计算。速率以每秒位数 (bps) 给出,而文件大小通常以字节为单位——务必注意单位转换。
Transfer time (s) = (File size in bits) ÷ (Transfer speed in bps)
s connection: convert 100 MB to megabits → 100 × 8 = 800 Mb. Time = 800 ÷ 50 = 16 seconds.
在 50 Mbps 的连接上下载 100 MB 文件:将 100 MB 转换为兆位 → 100 × 8 = 800 Mb。时间 = 800 ÷ 50 = 16 秒。
Published by TutorHao | Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)

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