← 返回资讯屏轩教育 · 行业资讯

IB Edexcel Computer Science: Formula Cheat Sheet | IB Edexcel 计算机:公式汇总手册

2026-07-13 14:36 · 本文部分内容由AI辅助创作

📚 IB Edexcel Computer Science: Formula Cheat Sheet | IB Edexcel 计算机:公式汇总手册

Welcome to your go-to formula compilation for IB and Edexcel Computer Science. This handbook gathers all the essential quantitative relationships you need to handle exam questions on data representation, file sizes, network performance, Boolean algebra, algorithm analysis, and more. Bookmark this page and use it as a quick revision reference.

欢迎查阅专为 IB 与 Edexcel 计算机科学整理的公式手册。本汇总涵盖数据处理、文件大小、网络性能、布尔代数、算法分析等常考定量关系,是考前快速回顾的最佳伴侣。建议收藏并反复翻阅。

1. Data Storage & File Size Basics | 数据存储与文件大小基础

The fundamental unit of digital data is the bit (b). Eight bits form one byte (B). For larger volumes, we use binary prefixes where each step multiplies by 1024. The size of any digital file is simply the number of bits or bytes required to store its content.

数字数据的基本单位是比特 (bit),8 比特构成 1 字节 (Byte)。更大的容量使用二进制前缀,每一步乘以 1024。任何数字文件的大小即存储其内容所需的总比特数或总字节数。

1 byte = 8 bits

1 KB = 1024 B, 1 MB = 1024 KB, 1 GB = 1024 MB, 1 TB = 1024 GB

UnitEquivalent in bytes单位等值字节数
1 KB2¹⁰ B = 1024 B1 KB1024 B
1 MB2²⁰ B = 1,048,576 B1 MB1,048,576 B
1 GB2³⁰ B = 1,073,741,824 B1 GB约 10.74 亿字节
1 TB2⁴⁰ B = 1,099,511,627,776 B1 TB约 1.1 万亿字节

2. Image File Size | 图像文件大小

A bitmap image is composed of a grid of pixels. Each pixel has a colour defined by a certain number of bits — the colour depth. The total image file size (in bits) is the product of width, height, and colour depth.

位图图像由像素网格组成。每个像素的颜色使用特定位数表示,即位深度。图像文件大小(以比特计)等于宽度、高度和位深度的乘积。

S = W × H × D

height in pixels, D = colour depth (bits per pixel). To obtain size in bytes, divide by 8.

其中 W = 图像宽度(像素),H = 高度(像素),D = 位深度(每像素比特数)。要得到以字节为单位的大小,再除以 8。


3. Audio File Size | 音频文件大小

Uncompressed audio size depends on the sample rate, bit depth, duration, and number of channels. The formula computes the total bits captured during recording.

未压缩音频的大小取决于采样率、位深度、时长和声道数。该公式计算录制过程中捕获的总比特数。

S = fₛ × b × t × c

r mono, 2 for stereo). Result is in bits; divide by 8 for bytes, then by 1024 for KB, etc.

fₛ = 采样率(Hz),b = 位深度(每样本比特数),t = 时长(秒),c = 声道数(单声道为 1,立体声为 2)。结果单位为比特;除以 8 得字节,再依次除以 1024 可得 KB 等。


4. Video File Size | 视频文件大小

Video combines a sequence of images (frames) with an audio track. The raw size is the sum of the image stream and the audio stream. Compression is heavily applied in practice, but this raw calculation gives the theoretical maximum.

视频由一系列图像(帧)与音频轨道组合而成。其原始大小等于图像流与音频流之和。实际应用会大幅压缩,但此原始计算给出理论上限。

Svideo = (W × H × D × r × t) + (fₛ × b × t × c)

n in seconds. The first part represents the image frames, the second part the audio. The result is in bits.

其中 r = 帧率(fps),t = 时长(秒)。前半部分代表图像帧,后半部分代表音频。结果以比特为单位。


5. Network Transmission Time | 网络传输时间

The time needed to transfer a file over a network depends on the file size and the available bandwidth (transfer speed). Always ensure units match — bits per second (bps) for speed and bits for file size.

通过网络传输文件所需的时间取决于文件大小和可用带宽(传输速率)。务必确保单位一致 — 速率用比特每秒(bps),文件大小用比特。

T = S / R

= transfer rate (bps). For practical speeds given in bytes per second, convert S to bytes.

T = 时间(秒),S = 文件大小(比特),R = 传输速率(bps)。若实际速率以字节每秒给出,需将 S 转换为字节后计算。


6. Compression Ratio | 压缩比

Compression reduces file size. The compression ratio measures effectiveness. A higher ratio means greater size reduction. Space saving percentage tells you how much storage is freed.

压缩可减小文件体积。压缩比用于衡量压缩效果。比值越高,尺寸减小越多。空间节省百分比则表示节省了多少存储空间。

Compression Ratio = Original Size / Compressed Size

Space Saving (%) = (1 − (Compressed Size / Original Size)) × 100%


7. Number Systems & Conversions | 数制与转换

Computers use binary (base‑2), and we often work with decimal (base‑10) and hexadecimal (base‑16). Conversions follow place‑value weighting. No single numeric formula exists, but the process is systematic.

计算机使用二进制(基数为 2),我们常处理十进制(基数为 10)和十六进制(基数为 16)。转换遵循位权展开,虽无单一公式但步骤系统化。


广告 / Sponsored

8. Boolean Algebra Laws | 布尔代数定律

Boolean algebra deals with binary variables and logic operations (AND, OR, NOT). The laws simplify logic circuits and expressions. Key identities are listed below (using ∧ for AND, ∨ for OR, ¬ for NOT).

布尔代数处理二元变量及逻辑运算(与、或、非)。以下定律用于简化逻辑电路和表达式(使用 ∧ 表示与,∨ 表示或,¬ 表示非)。

Law (English)Expression定律(中文)
IdentityA ∨ 0 = A, A ∧ 1 = A恒等律
Null (Domination)A ∨ 1 = 1, A ∧ 0 = 0零一律(支配律)
IdempotentA ∨ A = A, A ∧ A = A幂等律
ComplementA ∨ ¬A = 1, A ∧ ¬A = 0互补律
Double Negation¬(¬A) = A双重否定律
CommutativeA ∨ B = B ∨ A, A ∧ B = B ∧ A交换律
Associative(A ∨ B) ∨ C = A ∨ (B ∨ C), (A ∧ B) ∧ C = A ∧ (B ∧ C)结合律
DistributiveA ∧ (B ∨ C) = (A ∧ B) ∨ (A ∧ C), A ∨ (B ∧ C) = (A ∨ B) ∧ (A ∨ C)分配律
AbsorptionA ∨ (A ∧ B) = A, A ∧ (A ∨ B) = A吸收律
De Morgan's¬(A ∧ B) = ¬A ∨ ¬B, ¬(A ∨ B) = ¬A ∧ ¬B德摩根定律

9. Logic Simplification (Karnaugh Maps) | 逻辑化简(卡诺图)

Karnaugh maps (K‑maps) are a visual tool to minimise Boolean functions. The grouping rule is: group adjacent 1s in powers of two (1,2,4,8…) to form the largest possible rectangles. Each group corresponds to a product term where variables that change are eliminated.

卡诺图(K‑map)是化简布尔函数的可视化工具。其分组规则为:将相邻的 1 按 2 的幂次(1,2,4,8…)圈成尽可能大的矩形。每组对应一个乘积项,其中发生变化的变量被消去。


10. Algorithm Complexity (Big O Notation) | 算法复杂度(大 O 表示法)

Big O notation expresses the upper bound of an algorithm's running time or space usage as a function of input size n. It describes how performance scales.

大 O 表示法表达算法运行时间或空间占用随输入规模 n 增长的上界,描述性能的伸缩趋势。

ComplexityNameExample复杂度名称示例
O(1)ConstantArray access by index常数常数时间按索引访问数组
O(log n)LogarithmicBinary search对数对数时间二分查找
O(n)LinearLinear search线性线性时间顺序查找
O(n log n)LinearithmicMerge sort, heap sort线性对数线性对数时间归并排序、堆排序
O(n²)QuadraticBubble sort, selection sort平方平方时间冒泡排序、选择排序
O(2ⁿ)ExponentialRecursive Fibonacci指数指数时间递归计算斐波那契

11. Data Transfer Rate & Bandwidth | 数据传输率与带宽

Bandwidth refers to the maximum data transfer capacity of a network connection, measured in bits per second (bps). The effective throughput is often lower due to protocol overhead and network conditions. The relationship between data volume, time, and rate mirrors the transmission time formula.

带宽指网络连接的最大数据传输能力,单位为比特每秒 (bps)。受协议开销和网络状况影响,实际吞吐量常低于理论值。数据量、时间与速率的关系与传输时间公式一致。

Bandwidth = Data Transferred / Time (in seconds)

lways use consistent units. A common pitfall is mixing bytes (B) with bits (b): 1 B = 8 b.

此外,根据文件大小和带宽计算下载时间时,务必保持单位一致。常见错误是混淆字节 (B) 与比特 (b):1 B = 8 b。


12. Error Detection: Parity & Checksum | 错误检测:奇偶校验与校验和

Simple error‑detection methods use mathematical formulas to generate a check value. A parity bit ensures the total number of 1s in a byte is even (even parity) or odd (odd parity). A checksum sums data blocks and transmits the sum; the receiver compares the recalculated sum with the received checksum.

简单的错误检测方法借助数学运算生成校验值。奇偶校验位确保一个字节中 1 的个数为偶数(偶校验)或奇数(奇校验)。校验和则对数据块求和并传输该和值;接收方重新计算和并与收到的校验和比对。