📚 Year 11 CIE Computer Science: Formula & Theorem Quick Reference | Year 11 CIE 计算机:公式定理速查手册
This handy reference collects all the essential formulas, conversions, and theorems you need for the CIE IGCSE Computer Science (0478) exam. Each formula is presented in a clear, step-by-step manner, with worked examples to help you apply them correctly in both paper-based theory and practical scenarios. Keep this guide by your side when revising data representation, file size calculations, logic circuits, and network performance.
这份速查手册汇集了 CIE IGCSE 计算机科学(0478)考试所需的所有核心公式、换算方法和定理。每一条公式都以清晰、分步的方式呈现,并配有应用示例,帮助你准确运用于理论笔试和实际分析。在复习数据表示、文件大小计算、逻辑电路和网络性能时,随时查阅本手册。
1. Data Storage Units & Conversions | 数据存储单位与换算
Data quantities are measured in bits and bytes. A bit is a single binary digit (0 or 1). A byte consists of 8 bits. Larger units are formed using powers of 2, though some storage manufacturers use powers of 10 for marketing. You must know both conventions as they appear in exam questions.
数据量用比特和字节衡量。1 比特是一个二进制位(0 或 1)。1 字节由 8 个比特组成。更大的单位基于 2 的幂次构成,但某些存储制造商在宣传中使用 10 的幂次。考试中这两套体系都会出现,你必须掌握。
ions: 1 KiB = 2¹⁰ bytes = 1024 B; 1 MiB = 2²⁰ bytes; 1 GiB = 2³⁰ bytes; 1 TiB = 2⁴⁰ bytes.
常用二进制(IEC)换算:1 KiB = 2¹⁰ 字节 = 1024 B;1 MiB = 2²⁰ 字节;1 GiB = 2³⁰ 字节;1 TiB = 2⁴⁰ 字节。
ersions: 1 kB = 10³ bytes = 1000 B; 1 MB = 10⁶ bytes; 1 GB = 10⁹ bytes; 1 TB = 10¹² bytes.
十进制(SI)换算:1 kB = 10³ 字节 = 1000 B;1 MB = 10⁶ 字节;1 GB = 10⁹ 字节;1 TB = 10¹² 字节。
n going from smaller to larger. For example, 5 MiB = 5 × 1024 KiB = 5 × 1024 × 1024 bytes.
大单位转小单位乘,小单位转大单位除。例如,5 MiB = 5 × 1024 KiB = 5 × 1024 × 1024 字节。
2. Binary, Denary & Hexadecimal Conversions | 二进制、十进制与十六进制转换
Computers use binary (base-2), but humans often work with denary (base-10) and hexadecimal (base-16). Hexadecimal is a compact way to represent binary values because one hex digit represents exactly 4 bits (a nibble).
计算机使用二进制,但人们常用十进制和十六进制。十六进制能紧凑表示二进制值,因为一位十六进制数字恰好代表 4 个比特(半字节)。
s where there is a 1. For 8-bit binary 10110101, the value is 128 + 32 + 16 + 4 + 1 = 181.
二进制转十进制:将出现 1 的位权值相加。8 位二进制 10110101 的值为 128 + 32 + 16 + 4 + 1 = 181。
: repeatedly divide by 2, record remainders bottom to top. Or use place value subtraction.
十进制转二进制:反复除以 2,从下往上记录余数;或使用位权值减法。
x digit with its 4-bit binary equivalent. 0-F correspond to 0000-1111. Hex A2 = 1010 0010.
十六进制与二进制互换:每位十六进制数字替换为对应的 4 位二进制。0-F 对应 0000-1111。十六进制 A2 = 1010 0010。
enary: multiply each hex digit by 16^position and sum. A2₁₆ = (10 × 16) + (2 × 1) = 162₁₀.
十六进制与十进制互换:每位十六进制数字乘以 16 的位权求和。A2₁₆ = (10×16) + (2×1) = 162₁₀。
3. Image File Size Calculation | 图像文件大小计算
th (bits per pixel). The formula gives the size in bits, which can be converted to bytes by dividing by 8.
未压缩位图图像的大小取决于分辨率(宽×高像素数)和色彩深度(每像素比特数)。公式得出的是比特数,除以 8 可转换为字节。
Image size (bits) = Width × Height × Colour depth
图像大小(比特)= 宽度 × 高度 × 色彩深度
e = 1920 × 1080 × 24 = 49,766,400 bits. In bytes: 49,766,400 ÷ 8 = 6,220,800 B ≈ 5.93 MiB.
例如,1920×1080 像素的 24 位色彩图像:大小 = 1920×1080×24 = 49,766,400 比特。字节数为 49,766,400÷8 = 6,220,800 B ≈ 5.93 MiB。
bits needed to address each colour. For 256 colours, you need 8 bits per pixel (2⁸ = 256).
若图像使用调色板(索引颜色),色彩深度等于寻址每种颜色所需的比特数。256 色需要每像素 8 比特(2⁸ = 256)。
4. Sound File Size Calculation | 声音文件大小计算
Uncompressed audio file size is determined by sample rate, bit depth, number of channels, and duration. Higher sample rate and bit depth improve quality but increase file size.
未压缩音频文件的大小由采样率、位深度、声道数和时长决定。采样率和位深度越高,音质越好,但文件越大。
Audio size (bits) = Sample rate × Bit depth × Channels × Duration (seconds)
音频大小(比特)= 采样率 × 位深度 × 声道数 × 时长(秒)
6, channels 2, duration 180 s. Size = 44,100 × 16 × 2 × 180 = 254,016,000 bits ≈ 30.3 MiB.
一段 3 分钟的 CD 品质立体声:采样率 44,100 Hz,位深度 16,声道 2,时长 180 秒。大小 = 44,100×16×2×180 = 254,016,000 比特 ≈ 30.3 MiB。
In exam answers, always state the units and show the conversion to bytes, KiB or MiB as required.
考试作答时务必注明单位,并按题目要求转换为字节、KiB 或 MiB。
5. Video & Animation File Size | 视频与动画文件大小
A video is a sequence of frames (images) plus an audio track. The size of an uncompressed video can be estimated by multiplying the size of one frame by the frame rate and duration, then adding the audio size.
视频由帧序列(图像)和音轨组成。未压缩视频的大小可估算为单帧大小乘以帧率和时长,再加上音频部分。
ideo size (bits) = Width × Height × Colour depth × Frame rate × Duration + Audio data size
视频大小(比特)= 宽度 × 高度 × 色彩深度 × 帧率 × 时长 + 音频数据大小
000 bits. Audio (44.1 kHz, 16-bit, mono, 10 s) = 44,100×16×1×10 = 7,056,000 bits. Total ≈ 2,218,896,000 bits ≈ 264.6 MiB.
一段 10 秒、640×480、24 位色彩、30 fps 的视频:帧大小 = 640×480×24 = 7,372,800 比特。总帧数 = 30×10 = 300。图像部分 = 2,211,840,000 比特。音频(44.1 kHz, 16 位, 单声道, 10 秒)= 44,100×16×1×10 = 7,056,000 比特。总计约 2,218,896,000 比特 ≈ 264.6 MiB。
This calculation illustrates why video compression is essential for storage and streaming. Without compression, even short clips would be unmanageably large.
这个计算揭示了为什么视频压缩对于存储和流媒体至关重要。没有压缩,哪怕很短的片段也会大到难以处理。
6. Text File Size & Character Encoding | 文本文件大小与字符编码
Plain text files store characters using a fixed number of bits per character. In ASCII, each character uses 7 bits (often stored as 8 bits). Extended ASCII uses 8 bits (1 byte) per character. Unicode systems like UTF-8 use 1–4 bytes per character, but for the Western alphabet they commonly use 1 byte.
纯文本文件使用每字符固定数量的比特来存储字符。ASCII 每个字符 7 比特(通常存储为 8 比特)。扩展 ASCII 每字符 8 比特(1 字节)。Unicode 系统如 UTF-8 每字符使用 1–4 字节,但对于西方字母表通常只用 1 字节。
Text size (bytes) = Number of characters × Bytes per character
文本大小(字节)= 字符数 × 每字符字节数
SCII occupies 1500 × 1 = 1500 B. If stored as 16-bit Unicode (UTF-16), it would be 3000 B.
例如,一份含 1500 个字符、使用 8 位扩展 ASCII 的文本文件占用 1500×1 = 1500 B。若用 16 位 Unicode (UTF-16) 存储,则为 3000 B。
Remember that line endings (CR, LF) and spaces also count as characters. Metadata in the file header adds a few extra bytes.
请记住,换行符(CR, LF)和空格也算作字符。文件头的元数据会增加少量额外字节。
7. Data Transfer Time & Network Speed | 数据传输时间与网络速度
When downloading or uploading files, the time taken depends on the size of the data and the transfer rate. Transfer rates are often given in bits per second (bps), so you must align the units.
下载或上传文件时,所用时间取决于数据大小和传输速率。传输速率通常以比特每秒(bps)为单位,因此必须统一单位。
Transfer time (seconds) = Data size (bits) / Transfer rate (bps)
传输时间(秒)= 数据大小(比特) / 传输速率(bps)
me = 16,777,216 / 10,000,000 ≈ 1.68 seconds. (Note: ISPs often use 10⁶ for Mbps, not 2²⁰.)
示例:一个 2 MiB 文件(2×2²⁰×8 比特)通过 10 Mbps 连接下载。数据大小 = 2×1,048,576×8 = 16,777,216 比特。时间 = 16,777,216 / 10,000,000 ≈ 1.68 秒。(注意:互联网服务商通常用 10⁶ 表示 Mbps,而非 2²⁰。)
Always check whether the question uses binary or decimal units for both file size and transfer rate. Convert everything to bits first to avoid mistakes.
做题时务必检查题目中对文件大小和传输速率使用的是二进制还是十进制单位。先将所有值转换为比特,以避免错误。
8. Processor Performance: Clock Speed & Execution Time | 处理器性能:时钟速度与执行时间
The clock speed of a CPU determines how many cycles it can perform per second. One cycle does not necessarily equal one instruction, but a simple relationship can be used to compare processors.
CPU 的时钟速度决定了它每秒能执行多少个周期。一个周期不一定等于一条指令,但可以用简单关系来比较处理器。
Number of cycles = Clock speed × Time
周期数 = 时钟速度 × 时间
cycles per instruction, an instruction takes (4 / 2.5×10⁹) = 1.6 × 10⁻⁹ seconds (1.6 ns).
若处理器运行于 2.5 GHz(2.5×10⁹ Hz),且每条指令需 4 个时钟周期,则一条指令耗时 (4 / 2.5×10⁹) = 1.6×10⁻⁹ 秒(1.6 ns)。
struction streams simultaneously, but the actual speedup is less than 2× due to overheads.
性能还受核心数量、缓存大小和架构的影响。双核处理器理论上可同时执行两路指令流,但由于开销,实际加速比小于 2 倍。
9. Logic Gates & Truth Tables | 逻辑门与真值表
Logic gates are the building blocks of digital circuits. The six basic gates you must know are: NOT, AND, OR, NAND, NOR, XOR. Their truth tables define the output for all possible inputs.
逻辑门是数字电路的基本构件。你必须掌握六种基本门:NOT、AND、OR、NAND、NOR、XOR。它们的真值表定义了所有可能输入下的输出。
NOT: Input A, output Z = NOT A. If A=0 then Z=1; A=1 then Z=0.
非门:输入 A,输出 Z = NOT A。A=0 则 Z=1;A=1 则 Z=0。
is 1 only if all inputs are 1. Two-input truth table: 0.0 → 0; 0.1 → 0; 1.0 → 0; 1.1 → 1.
与门:仅当所有输入均为 1 时输出为 1。两输入真值表:0·0 → 0;0·1 → 0;1·0 → 0;1·1 → 1。
OR: Output is 1 if at least one input is 1. 0.0 → 0; 0.1 → 1; 1.0 → 1; 1.1 → 1.
或门:至少一个输入为 1 时输出为 1。0·0 → 0;0·1 → 1;1·0 → 1;1·1 → 1。
NAND: NOT AND; output 0 only when all inputs are 1. NOR: NOT OR; output 1 only when all inputs are 0. XOR: output 1 when inputs differ.
与非门:AND 的否定;仅在所有输入为 1 时输出 0。或非门:OR 的否定;仅在所有输入为 0 时输出 1。异或门:输入相异时输出 1。
10. Boolean Algebra Laws & De Morgan's Theorems | 布尔代数定律与德摩根定理
Boolean algebra simplifies logic circuits. Key identities include commutativity, associativity, distributivity, and the laws of complementation and identity. De Morgan's theorems are especially important for transforming expressions.
布尔代数用于化简逻辑电路。核心恒等式包括交换律、结合律、分配律、互补律和同一律。德摩根定理在表达式变换中尤为重要。
De Morgan's laws:
德摩根定律:
NOT (A AND B) = (NOT A) OR (NOT B)
NOT (A AND B) = (NOT A) OR (NOT B)
NOT (A OR B) = (NOT A) AND (NOT B)
NOT (A OR B) = (NOT A) AND (NOT B)
ese allow you to convert an AND-NOT combination into OR-nots, and vice versa. For example, ¬(A·B) = ¬A + ¬B.
这些定律可将“与-非”组合转换为“或-非”形式,反之亦然。例如,¬(A·B) = ¬A + ¬B。
Other useful rules: A·0 = 0, A·1 = A, A+0 = A, A+1 = 1, A·A = A, A+¬A = 1, A·¬A = 0, and double negation ¬(¬A) = A.
其他常用规则:A·0 = 0,A·1 = A,A+0 = A,A+1 = 1,A·A = A,A+¬A = 1,A·¬A = 0,双重否定 ¬(¬A) = A。
11. Compression Ratio | 压缩比
Compression reduces the number of bits needed to store or transmit data. The compression ratio expresses the relationship between the original size and the compressed size.
压缩能减少存储或传输数据所需的比特数。压缩比描述了原始大小与压缩后大小之间的关系。
Compression ratio = Original size / Compressed size
压缩比 = 原始大小 / 压缩后大小
ple, a 500 MB file compressed to 100 MB gives a ratio of 5:1 (often written as 5:1 or 5×).
比值大于 1 表示压缩后文件变小。例如,500 MB 文件压缩到 100 MB,压缩比为 5:1(常写作 5:1 或 5 倍)。
e can also be calculated: Saving = (Original size − Compressed size) / Original size × 100%. In the example, (500−100)/500 × 100% = 80%.
也可计算节省空间的百分比:节省 = (原始大小 − 压缩后大小) / 原始大小 × 100%。上述示例中,(500−100)/500 × 100% = 80%。
Lossless compression (e.g., ZIP, PNG) allows exact reconstruction; lossy compression (JPEG, MP3) sacrifices some data for much higher compression ratios.
无损压缩(如 ZIP、PNG)可精确重建原始数据;有损压缩(JPEG、MP3)牺牲部分数据以换取更高的压缩比。
12. Error Detection: Parity & Checksum | 错误检测:奇偶校验与校验和
Error detection techniques help identify whether data has been corrupted during transmission or storage. Two simple methods are parity checks and checksums.
错误检测技术帮助识别数据在传输或存储过程中是否出错。两种简单的方法是奇偶校验和校验和。
Parity: An extra bit is added to each byte so that the total number of 1-bits is either even (even parity) or odd (odd parity). The receiver rechecks the parity; a mismatch indicates an error.
奇偶校验:为每个字节增加一个额外的比特,使“1”的总数为偶数(偶校验)或奇数(奇校验)。接收方重新计算校验位,不一致即表明出错。
Checksum: A block of data is divided into fixed-size segments. These are summed (using modulo arithmetic if needed) to produce a checksum value. The sender appends this; the receiver performs the same summation and compares.
校验和:数据块被分割为固定长度的片段,将其求和(需要时可使用模运算)得出校验和值。发送方附加该校验和;接收方执行相同的求和并比较。
If a single parity bit is used, it can only detect an odd number of bit errors. Two-dimensional parity (row and column) can sometimes correct single-bit errors.
若只使用单个奇偶校验位,它只能检测奇数个比特错误。二维奇偶校验(行和列)有时可以纠正单比特错误。
These techniques are not foolproof; checksums can miss errors if the sum remains the same. More robust methods include CRC (Cyclic Redundancy Check) and cryptographic hash functions, which are beyond the IGCSE syllabus.
这些技术并非万无一失;如果总和保持不变,校验和可能漏检错误。更健壮的方法包括 CRC(循环冗余校验)和密码哈希函数,但这些超出了 IGCSE 课程范围。
Published by TutorHao | Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)

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