📚 Year 7 WJEC Computer Science: Formula & Theorem Quick Reference Handbook | 七年级 WJEC 计算机:公式定理速查手册
This quick reference handbook brings together the essential formulas, theorems, and conversion rules you will meet in the Year 7 WJEC Computer Science course. From binary arithmetic and Boolean logic to data representation and network speeds, each entry is presented as a clear statement followed by a practical example. Use it to revise, test yourself, or check a fact quickly before an assessment.
本速查手册汇集了七年级 WJEC 计算机科学课程中必备的公式、定理和转换规则。从二进制算术和布尔逻辑到数据表示和网络速度,每个条目都以清晰的陈述呈现,并配有实例。你可以用它来复习、自测,或在测评前快速查阅某个知识点。
1. Binary to Decimal Conversion | 二进制转十进制
To convert a binary number to decimal, multiply each bit by 2 raised to the power of its position, starting from 0 on the right. Then add all the products together.
将二进制数转换为十进制时,用每一位乘以 2 的位置次方(最右侧位置为 0),再将所有乘积相加。
Decimal = bₙ₋₁ × 2ⁿ⁻¹ + bₙ₋₂ × 2ⁿ⁻² + … + b₀ × 2⁰
Example: 1011₂ = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1 = 11₁₀.
示例:1011₂ = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1 = 11₁₀。
2. Decimal to Binary Conversion | 十进制转二进制
Repeatedly divide the decimal number by 2, noting the remainder each time. Read the remainders from bottom to top to obtain the binary equivalent.
反复将十进制数除以 2,记录每次的余数。从下往上读取余数,即可得到对应的二进制数。
3 ÷ 2 = 6 r 1; 6 ÷ 2 = 3 r 0; 3 ÷ 2 = 1 r 1; 1 ÷ 2 = 0 r 1. Remainders from bottom: 1101₂.
示例:13₁₀ → 二进制。13 ÷ 2 = 6 余 1;6 ÷ 2 = 3 余 0;3 ÷ 2 = 1 余 1;1 ÷ 2 = 0 余 1。从下往上:1101₂。
3. Units of Data Storage | 数据存储单位
A bit is the smallest unit of data. A group of 4 bits is a nibble, and 8 bits form one byte. Larger units are based on powers of 2 (traditional computing) or powers of 10 (SI standard). The table below shows the traditional binary values commonly used in memory and storage.
位 (bit) 是最小的数据单位。4 位组成一个半字节 (nibble),8 位组成一个字节 (byte)。更大的单位基于 2 的幂(传统计算机)或 10 的幂(SI 标准)。下表列出了内存和存储中常用的传统二进制值。
| Unit | Abbreviation | Value (bytes) |
|---|---|---|
| 1 bit | b | 0.125 B |
| 1 nibble | – | 0.5 B |
| 1 byte | B | 1 B |
| 1 kilobyte | KB | 2¹⁰ B = 1024 B |
| 1 megabyte | MB | 2²⁰ B = 1 048 576 B |
| 1 gigabyte | GB | 2³⁰ B = 1 073 741 824 B |
| 1 terabyte | TB | 2⁴⁰ B = 1 099 511 627 776 B |
4. Boolean Logic Operations | 布尔逻辑运算
Boolean logic uses TRUE (1) and FALSE (0) values. The three fundamental operations are NOT, AND, and OR. Their truth tables define the output for every possible input combination.
布尔逻辑使用真 (1) 和假 (0) 两种值。三种基本运算是 非 (NOT)、与 (AND) 和 或 (OR)。它们的真值表定义了每一种输入组合对应的输出。
NOT A
| A | ¬A |
|---|---|
| 0 | 1 |
| 1 | 0 |
A AND B (A ∧ B)
| A | B | A ∧ B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
A OR B (A ∨ B)
| A | B | A ∨ B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
5. Commutative, Associative, and Distributive Laws | 交换律、结合律与分配律
These laws let you rearrange and simplify Boolean expressions just as you do in ordinary algebra. They are crucial for reducing logic circuits.
这些定律让你可以像在普通代数中一样重新排列和简化布尔表达式。它们对于精简逻辑电路至关重要。
Commutative Law: A ∧ B = B ∧ A A ∨ B = B ∨ A
The order of inputs does not affect the result of AND or OR.
输入的顺序不影响 AND 或 OR 的结果。
Associative Law: (A ∧ B) ∧ C = A ∧ (B ∧ C) (A ∨ B) ∨ C = A ∨ (B ∨ C)
When you have a chain of the same operation, the grouping does not matter.
当一连串相同运算出现时,分组的方式不影响结果。
Distributive Law: A ∧ (B ∨ C) = (A ∧ B) ∨ (A ∧ C) A ∨ (B ∧ C) = (A ∨ B) ∧ (A ∨ C)
AND distributes over OR, and OR distributes over AND.
AND 对 OR 可分配,OR 对 AND 也可分配。
6. De Morgan’s Laws | 德摩根定律
De Morgan’s laws show how to push a negation into a bracket. They are essential for simplifying circuits with NOT, AND, and OR gates.
德摩根定律展示了如何将否定符号推入括号内。它们对于简化带有 NOT、AND 和 OR 门的电路至关重要。
¬(A ∧ B) = ¬A ∨ ¬B
NOT (A AND B) is the same as (NOT A) OR (NOT B).
NOT (A AND B) 等同于 (NOT A) OR (NOT B)。
¬(A ∨ B) = ¬A ∧ ¬B
NOT (A OR B) is the same as (NOT A) AND (NOT B).
NOT (A OR B) 等同于 (NOT A) AND (NOT B)。
7. Binary Addition Rules | 二进制加法规则
Binary addition follows a small set of rules. When the sum of two bits is 2 (10₂), write 0 and carry 1 to the next column. If the sum is 3 (11₂), write 1 and carry 1.
二进制加法遵循一组简单的规则。当两个位相加等于 2(即 10₂)时,写 0 并向下一列进 1。如果相加等于 3(即 11₂),则写 1 并进 1。
- 0 + 0 = 0 (no carry)
- 0 + 1 = 1
- 1 + 0 = 1
- 1 + 1 = 0, carry 1
- 1 + 1 + 1 = 1, carry 1
Example: 0110₂ + 0011₂ = 1001₂.
示例:0110₂ + 0011₂ = 1001₂。
8. Overflow Error | 溢出错误
An overflow error occurs when the result of a binary addition requires more bits than the fixed number of bits available. In an 8-bit system, the maximum unsigned value is 255. Adding two numbers that produce a sum greater than 255 will cause an overflow.
当二进制加法的结果需要的位数超过了固定可用的位数时,就会发生溢出错误。在 8 位系统中,无符号最大值为 255。两个数相加得到的结果大于 255 就会引发溢出。
₂ which is 9 bits. In an 8-bit register, the most significant 1 is lost, leaving 00000000₂ – an obvious error.
示例:11111111₂ (255) + 00000001₂ (1) = 100000000₂,这是 9 位。在 8 位寄存器中,最高位的 1 会丢失,只剩下 00000000₂ —— 一个明显的错误。
9. Image Representation Formulas | 图像表示公式
A bitmap image is made of pixels. The file size is determined by the width, height, and colour depth (bits per pixel). The formula below gives the size in bytes.
位图图像由像素组成。文件大小由宽度、高度和颜色深度(每像素位数)决定。下面的公式给出了以字节为单位的大小。
File size (bytes) = Width (px) × Height (px) × Colour depth (bpp) ÷ 8
bits per pixel, the uncompressed size is 1024 × 768 × 24 ÷ 8 = 2 359 296 bytes ≈ 2.25 MB.
如果一张图像为 1024×768 像素,使用 24 位每像素,则未压缩的大小为 1024×768×24÷8 = 2 359 296 字节 ≈ 2.25 MB。
10. Sound Representation Formulas | 声音表示公式
Sound is sampled at regular intervals. The bit rate (bits per second) and file size are calculated from the sample rate, bit depth, and number of channels.
声音以固定间隔进行采样。比特率(每秒位数)和文件大小由采样率、位深度和声道数计算得出。
Bit rate (bps) = Sample rate (Hz) × Bit depth (bits) × Number of channels
File size (bytes) = Bit rate (bps) × Duration (s) ÷ 8
1 411 200 bps. A 60-second track would be 1 411 200 × 60 ÷ 8 = 10 584 000 bytes ≈ 10.1 MB.
示例:CD 质量立体声使用 44 100 Hz、16 位和 2 声道。比特率 = 44 100×16×2 = 1 411 200 bps。一首 60 秒的曲目大小为 1 411 200×60÷8 = 10 584 000 字节 ≈ 10.1 MB。
11. Compression Ratio | 数据压缩比
The compression ratio compares the size of the original file to the size of the compressed file. A higher ratio means better compression.
压缩比用于比较原始文件与压缩后文件的大小。比值越高表示压缩效果越好。
Compression ratio = Original size ÷ Compressed size
If a 500 KB image is reduced to 100 KB, the compression ratio is 5:1. Lossless compression preserves all data, while lossy compression removes some data permanently.
如果一个 500 KB 的图像被减小到 100 KB,压缩比为 5:1。无损压缩保留所有数据,而有损压缩会永久性删除部分数据。
12. Data Transfer Time | 数据传输时间
The time needed to send a file over a network depends on the file size and the transfer speed. Use the formula below to estimate download duration.
通过网络发送文件所需的时间取决于文件大小和传输速度。使用下面的公式可以估算下载时长。
Time (s) = File size (bits) ÷ Transfer rate (bps)
erred at 100 Mbps (100 × 10⁶ bps) takes approximately 0.84 seconds under ideal conditions.
确保单位一致;先将文件大小转换为位(1 字节 = 8 位),再除以比特率。示例:一个 10 MB 的文件(10×1024×1024×8 位)以 100 Mbps(100×10⁶ bps)传输,理想条件下约需 0.84 秒。
Published by TutorHao | Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)

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