📚 Cambridge Year 9 Computing: Formula & Theorem Quick Reference Handbook | 剑桥九年级计算机:公式定理速查手册
This handbook gathers the essential formulas, theorems and calculation methods you will meet in the Year 9 Cambridge Computing course. Each section presents the concept in English first, followed by a matching Chinese explanation, so you can build a solid bilingual foundation. Use it to revise binary conversions, boolean logic, multimedia file sizes, network data rates and error checking.
本手册汇集了剑桥九年级计算机课程中你需要掌握的重要公式、定理与计算方法。每个小节先用英文讲解概念,再配以对应的中文解释,帮助你建立扎实的双语基础。你可以用它来复习二进制转换、布尔逻辑、多媒体文件大小、网络数据速率以及差错校验等内容。
1. Number Systems and Conversions | 进制与转换
Computers use binary (base‑2) and often represent long binary strings with hexadecimal (base‑16). To convert from binary to decimal, sum each bit multiplied by the power of two corresponding to its position, starting from 0 on the right.
计算机采用二进制(基数为2),并常用十六进制(基数为16)来表示较长的二进制组合。把二进制转换为十进制时,将每一位上的数字乘以对应的2的幂(从右端0次幂开始),然后求和即可。
Decimal value = dₙ₋₁×2ⁿ⁻¹ + ... + d₁×2¹ + d₀×2⁰
For example, binary 1101₂ equals 1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 8+4+0+1 = 13 in decimal.
例如二进制 1101₂ = 1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 8+4+0+1 = 13(十进制)。
to group binary digits into nibbles (four bits). One hex digit corresponds exactly to a 4‑bit pattern, e.g., 0011 ₂ = 3₁₆, 1010 ₂ = A₁₆. The table below shows the common patterns.
十六进制与二进制之间的快速转换方法是将二进制数字每四位分为一组(称为半字节)。一个十六进制数字恰好对应一个4位二进制模式,例如 0011 ₂ = 3₁₆, 1010 ₂ = A₁₆。下表列出了常见的对应关系。
| Hex | Binary | Decimal |
|---|---|---|
| 0 | 0000 | 0 |
| 1 | 0001 | 1 |
| 2 | 0010 | 2 |
| 3 | 0011 | 3 |
| 4 | 0100 | 4 |
| 5 | 0101 | 5 |
| 6 | 0110 | 6 |
| 7 | 0111 | 7 |
| 8 | 1000 | 8 |
| 9 | 1001 | 9 |
| A | 1010 | 10 |
| B | 1011 | 11 |
| C | 1100 | 12 |
| D | 1101 | 13 |
| E | 1110 | 14 |
| F | 1111 | 15 |
2. Binary Arithmetic | 二进制算术
1+0=1, and 1+1=10 (binary for 2), which means you write 0 and carry 1 to the next column.
二进制加法的规则很简单:0+0=0,0+1=1,1+0=1,而1+1=10(即十进制2),表示该位写0并向高位进1。
For instance, adding 1101₂ (13) and 1011₂ (11) gives 11000₂ (24). An overflow occurs when the result needs more bits than the register can hold, which in a fixed‑width representation causes the highest bit to be lost.
例如,1101₂(13)加 1011₂(11)得到 11000₂(24)。当结果所需要的位数超过了寄存器的宽度,就会发生溢出,在固定位宽的表示中最高位会丢失。
Logical binary shifts also form part of arithmetic. A left shift by one position multiplies the binary number by 2; a right shift divides by 2, discarding the remainder.
逻辑移位也属于算术的一部分。左移一位相当于将二进制数乘以2;右移一位相当于除以2,并舍弃余数。
Left shift: 0011₂ (3) → 0110₂ (6) Right shift: 1100₂ (12) → 0110₂ (6)
3. Boolean Algebra Laws and Logic Gates | 布尔代数定律与逻辑门
Boolean algebra uses variables that can only be TRUE (1) or FALSE (0). The fundamental operations are AND (∧), OR (∨) and NOT (¬). Below are the key laws, where A and B are Boolean variables.
布尔代数中的变量只能取真(1)或假(0)。基本运算包括与(∧)、或(∨)和非(¬)。以下是关键定律,其中 A 和 B 为布尔变量。
Identity laws: A ∨ 0 = A, A ∧ 1 = A. Domination: A ∨ 1 = 1, A ∧ 0 = 0. Idempotent: A ∨ A = A, A ∧ A = A. Complement: A ∨ ¬A = 1, A ∧ ¬A = 0. Double negation: ¬(¬A) = A.
同一律:A ∨ 0 = A, A ∧ 1 = A。支配律:A ∨ 1 = 1, A ∧ 0 = 0。幂等律:A ∨ A = A, A ∧ A = A。互补律:A ∨ ¬A = 1, A ∧ ¬A = 0。双重否定:¬(¬A) = A。
De Morgan's theorems are especially important for simplifying circuits: ¬(A ∧ B) = ¬A ∨ ¬B and ¬(A ∨ B) = ¬A ∧ ¬B. These can be proved with truth tables.
德摩根定理在化简电路时尤为重要:¬(A ∧ B) = ¬A ∨ ¬B 以及 ¬(A ∨ B) = ¬A ∧ ¬B。这些可以用真值表加以证明。
Logic gates implement these operations in hardware. The common gates and their symbols are summarised below.
逻辑门在硬件中实现这些运算。常见的逻辑门及其符号总结如下。
| Gate | Boolean expression | Truth table (A,B → Out) |
|---|---|---|
| AND | X = A ∧ B | 00→0, 01→0, 10→0, 11→1 |
| OR | X = A ∨ B | 00→0, 01→1, 10→1, 11→1 |
| NOT | X = ¬A | 0→1, 1→0 |
| NAND | X = ¬(A ∧ B) | 00→1, 01→1, 10→1, 11→0 |
| NOR | X = ¬(A ∨ B) | 00→1, 01→0, 10→0, 11→0 |
| XOR | X = A ⊕ B = (¬A ∧ B) ∨ (A ∧ ¬B) | 00→0, 01→1, 10→1, 11→0 |
4. Data Storage Units Conversion | 数据存储单位换算
are based on powers of 2, where 1 byte = 8 bits, 1 KB = 2¹⁰ bytes = 1024 bytes, and so on.
存储大小以位(bit,b)和字节(byte,B)为计量单位。剑桥计算机课程中常用的标准换算基于2的幂次:1字节 = 8位,1 KB = 2¹⁰ 字节 = 1024字节,依此类推。
1 KB = 1024 B | 1 MB = 1024 KB | 1 GB = 1024 MB | 1 TB = 1024 GB
haracter. For ASCII, each character uses 1 byte; for extended character sets, it might be 2 or more bytes.
计算未压缩的纯文本文件大小时:大小(字节)= 字符数 × 每个字符的字节数。对于ASCII编码,每个字符占1字节;对于扩展字符集,可能是2字节或更多。
5. Image File Size Calculation | 图像文件大小计算
ze depends on the image dimensions (width × height) and the colour depth (bits per pixel).
位图图像由像素组成。文件大小取决于图像的分辨率(宽 × 高)以及颜色深度(每像素位数)。
Image size (bits) = width (pixels) × height (pixels) × colour depth (bits per pixel)
by 8, and to kilobytes by dividing by 1024 again. For example, an 800 × 600 image with 16‑bit colour has 800 × 600 × 16 = 7,680,000 bits = 960,000 bytes ≈ 937.5 KB.
将结果除以8得到字节数,再除以1024得到千字节。例如,一幅800×600、16位色的图像大小为800×600×16 = 7,680,000 位 = 960,000 字节 ≈ 937.5 KB。
If the image uses a lower colour depth, the file size drops proportionally. This is why reducing colour depth is one method of compression.
如果图像使用较低的色深,文件大小会成比例减小。这也是为什么降低色深是一种压缩方法。
6. Sound Recording Data Rate and Size | 录音数据速率与文件大小
Digital sound quality is determined by the sample rate (measured in Hz) and the bit depth (bits per sample). Stereo recordings have two channels, doubling the data.
数字音频的质量由采样率(单位 Hz)和采样分辨率(每个样本的位数)决定。立体声录音有两个声道,数据量会加倍。
Bit rate (bits per second) = sample rate × bit depth × number of channels
ration in seconds gives the total file size in bits. For example, 44.1 kHz sample rate, 16‑ pth, stereo (2 channels) for 60 seconds: 44,100 × 16 × 2 × 60 = 84,672,000 bits ≈ 10.6 MB.
将比特率乘以以秒为单位的时长就得到总文件大小(位)。例如,44.1 kHz 采样率、16位采样、立体声(2声道),录制60秒:44,100 × 16 × 2 × 60 = 84,672,000 位 ≈ 10.6 MB。
7. Data Compression Ratio | 数据压缩比
Compression reduces file size by removing redundant information. The compression ratio tells you how much smaller the compressed file is compared to the original.
压缩通过移除冗余信息来减小文件体积。压缩比可以告诉你压缩后的文件比原文件小了多少。
Compression ratio = uncompressed size ÷ compressed size
tance, if a 20 MB image becomes 5 MB after compression, the ratio is 20 ÷ 5 = 4:1 (read as 'four to one'). The space saving percentage is ((original – compressed) ÷ original) × 100% = 75%.
例如,一张20 MB的图片经压缩后变为5 MB,则压缩比为20 ÷ 5 = 4:1(读作“四比一”)。节省的空间百分比为 ((20 – 5) ÷ 20) × 100% = 75%。
Lossless compression (e.g., ZIP, PNG) retains all original data, while lossy compression (e.g., JPEG, MP3) discards some information to achieve higher ratios.
无损压缩(如ZIP、PNG)保留全部原始数据,而有损压缩(如JPEG、MP3)会丢弃部分信息以获得更高的压缩比。
8. Network Transmission Time | 网络传输时间
When a file is sent over a network, the transmission time depends on the file size in bits and the network transfer speed in bits per second (bps).
文件通过网络发送时,传输时间取决于以位为单位的文件大小和以每秒位数为单位的网络传输速率。
Transmission time (seconds) = file size (bits) ÷ transfer rate (bps)
ften needs converting from megabytes to bits. For a 10 MB file over a 100 Mbps connection: 10 MB = 10 × 8,000,000 = 80,000,000 bits. Time = 80,000,000 ÷ 100,000,000 = 0.8 seconds.
务必注意单位匹配:100 Mbps(兆位每秒)的速率需换算成每秒位(1 Mbps = 1,000,000 bps),而文件大小通常也要从兆字节换算成位。对于通过100 Mbps连接发送的10 MB文件:10 MB = 10 × 8,000,000 = 80,000,000 位。时间 = 80,000,000 ÷ 100,000,000 = 0.8 秒。
Remember that overheads like headers and network latency often increase the actual transfer time beyond this theoretical value.
要记住,像报文头这样的开销以及网络延迟通常会使实际传输时间超过这个理论值。
9. Parity Bits and Simple Error Checking | 奇偶校验位与简单的差错校验
Parity checking is a basic method for detecting single‑bit errors in transmitted data. A parity bit is appended to a group of data bits so that the total number of 1s is either even (even parity) or odd (odd parity).
奇偶校验是一种在传输数据中检测单个位错误的基本方法。在一组数据位后添加一个校验位,使得整个组中1的个数为偶数(偶校验)或奇数(奇校验)。
Even parity: total number of 1s is an even number. Odd parity: total number of 1s is an odd number.
For example, with even parity, the byte 1011001 has four 1s (even), so the parity bit would be 0, producing the transmitted byte 10110010. If a single bit flips during transmission, the parity count changes, and the receiver flags an error.
例如,采用偶校验时,字节 1011001 中有四个1(偶数),所以校验位为0,形成发送字节 10110010。如果在传输过程中有一个位发生翻转,1的个数变化,接收方就会检测到错误。
Parity can detect an odd number of bit errors but cannot detect an even number of errors. More advanced techniques like checksums and CRC provide stronger error detection.
奇偶校验能够检测奇数个位错误,但无法检测偶数个位错误。更高级的技术如校验和与循环冗余校验能提供更强的检错能力。
10. Binary Shifts and Hexadecimal Shorthand | 二进制移位与十六进制简写
Binary shifts are used to quickly multiply or divide by powers of two without performing arithmetic. A logical left shift moves every bit one place to the left, filling the rightmost bit with 0, which effectively multiplies the number by 2.
二进制移位用于在不进行算术运算的情况下快速乘以或除以2的幂。逻辑左移将每位向左移动一位,最右端补0,相当于乘以2。
(n places): value × 2ⁿ Right shift (n places): value ÷ 2ⁿ (integer division)
Multiple shifts multiply the effect. Shifting left twice multiplies by 4, three times by 8, and so on. Right shifting discards the bits that fall off the right side, which is equivalent to integer division.
多次移位效果累乘。左移两次相当于乘以4,三次乘以8,依此类推。右移时,从右侧移出的位被丢弃,等同于整数除法。
Because every hexadecimal digit represents exactly four binary digits, hex serves as a compact shorthand for binary. For example, the 16‑bit binary number 110110101001
Published by TutorHao | Year 9 Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)

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