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

Year 9 CIE Computer Science Formula & Theorem Quick Reference | CIE 计算机公式定理速查手册

2026-07-18 21:46 · 本文部分内容由AI辅助创作

📚 Year 9 CIE Computer Science Formula & Theorem Quick Reference | CIE 计算机公式定理速查手册

This quick-reference handbook provides all the essential formulas, laws, and key mathematical relationships that Year 9 students need for the CIE Computer Science curriculum. From data storage units to logic gate truth tables, from file size estimation to compression ratios, every core concept is presented with clear English explanations followed by equivalent Chinese translations. Use this guide to revise key quantitative ideas quickly and accurately.

这本速查手册提供了 CIE 计算机科学课程中 Year 9 学生需要掌握的所有基本公式、定律和关键数学关系。从数据存储单位到逻辑门真值表,从文件大小估算到压缩比,每个核心概念都以清晰的英文说明配以对应的中文翻译呈现。利用本指南可以快速准确地复习关键量化概念。

1. Units of Data Storage | 数据存储单位

s, gigabyte (GB) is 10⁹ bytes, and terabyte (TB) is 10¹² bytes. In computing, binary prefixes are also used: kibibyte (KiB) = 2¹⁰ bytes, mebibyte (MiB) = 2²⁰ bytes, gibibyte (GiB) = 2³⁰ bytes, tebibyte (TiB) = 2⁴⁰ bytes.

比特是数据的最小单位,表示 0 或 1。半字节是 4 比特,一个字节是 8 比特。千字节 (KB) 是 10³ 字节,兆字节 (MB) 是 10⁶ 字节,吉字节 (GB) 是 10⁹ 字节,太字节 (TB) 是 10¹² 字节。在计算中也会使用二进制前缀:kibibyte (KiB) = 2¹⁰ 字节,mebibyte (MiB) = 2²⁰ 字节,gibibyte (GiB) = 2³⁰ 字节,tebibyte (TiB) = 2⁴⁰ 字节。

en calculating storage requirements, always check whether the specification uses powers of 10 or powers of 2.

十进制前缀和二进制前缀之间的换算为:1 KiB ≈ 1.024 KB,1 MiB ≈ 1.049 MB,1 GiB ≈ 1.074 GB。在计算存储需求时,务必确认规格使用 10 的幂还是 2 的幂。

1 byte = 8 bits
1 KB = 1000 bytes  |  1 KiB = 1024 bytes


2. Binary, Denary, and Hexadecimal Conversions | 二进制、十进制与十六进制转换

Binary numbers use base 2 with digits 0 and 1. Denary (decimal) uses base 10 with digits 0–9. Hexadecimal uses base 16 with digits 0–9 and letters A (10) to F (15). To convert binary to denary, multiply each bit by its place value (powers of 2) and sum the results.

二进制数使用底数为 2,数字为 0 和 1。十进制使用底数为 10,数字为 0–9。十六进制使用底数为 16,数字为 0–9 和字母 A (10) 到 F (15)。将二进制转换为十进制时,将每个比特乘以其位值(2 的幂)并求和。

ert denary to binary, repeatedly divide by 2 and record the remainders. Hexadecimal to denary: multiply each digit by its place value (16ⁿ). Denary to hexadecimal: repeatedly divide by 16 and use remainders (10–15 as A–F).

例如,二进制 1011₂ = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1 = 11₁₀。将十进制转换为二进制时,反复除以 2 并记录余数。十六进制转十进制:将每一位乘以其位值 (16ⁿ)。十进制转十六进制:反复除以 16 并使用余数 (10–15 记为 A–F)。

Between binary and hexadecimal, each hex digit maps directly to a 4-bit nibble. This makes conversions quick: group binary digits into nibbles from the right, then replace each with its hex equivalent.

在二进制和十六进制之间,每个十六进制数字直接对应一个 4 比特的半字节。这使得转换很快:将二进制数字从右向左每 4 位分为一组,然后用相应的十六进制数字替换。

Binary → Denary: Σ (bit × 2^position)
Hex → Denary: Σ (digit × 16^position)


3. File Size Calculation for Text and Images | 文本与图像文件大小计算

8, characters may take 1 to 4 bytes. For fixed encoding like UTF-16, each character takes 2 bytes. The general formula: File size (bytes) = number of characters × bytes per character.

纯文本文件的大小(以字节计)等于字符数,前提是每个字符使用一个字节编码(例如 ASCII)。对于使用 UTF-8 的 Unicode,字符可能占用 1 到 4 个字节。对于像 UTF-16 这样的固定编码,每个字符占 2 个字节。通用公式为:文件大小(字节)= 字符数 × 每个字符的字节数。

h in pixels × height in pixels × colour depth in bits. In bytes, divide by 8. For example, a 100×100 pixel image with 24-bit colour depth uses 100×100×24 = 240,000 bits = 30,000 bytes (30 KB).

对于位图图像,文件大小取决于分辨率(像素)和颜色深度(每像素比特数)。未压缩图像文件大小(以比特计)= 像素宽度 × 像素高度 × 颜色深度(比特)。换算为字节时,除以 8。例如,一幅 100×100 像素、24 位颜色深度的图像占用 100×100×24 = 240,000 比特 = 30,000 字节 (30 KB)。

Colour depth determines the number of available colours: 2b, where b is bits per pixel. 1 bit gives 2 colours (black/white), 8 bits give 256 colours, 24 bits give about 16.7 million colours.

颜色深度决定可用颜色数量:2b,其中 b 是每像素比特数。1 比特产生 2 种颜色(黑/白),8 比特产生 256 种颜色,24 比特产生约 1670 万种颜色。

Image file size (bits) = width(pixels) × height(pixels) × bit depth
Number of colours = 2bit depth


4. Sound File Size and Sampling | 声音文件大小与采样

e), and number of channels (e.g., mono=1, stereo=2). The uncompressed sound file size (bits) = sample rate (Hz) × bit depth × duration (seconds) × number of channels.

声音数字化涉及以固定间隔对振幅进行采样。关键参数包括采样率 (Hz)、比特深度(每样本比特数)和声道数(例如单声道=1,立体声=2)。未压缩声音文件大小(比特)= 采样率 (Hz) × 比特深度 × 时长(秒)× 声道数。

it, stereo) requires: 44,100 × 16 × 60 × 2 = 84,672,000 bits = 10,584,000 bytes ≈ 10.1 MB.

要获得以字节为单位的大小,除以 8。例如,一分钟 CD 质量音频 (44,100 Hz,16 比特,立体声) 需要:44,100 × 16 × 60 × 2 = 84,672,000 比特 = 10,584,000 字节 ≈ 10.1 MB。

Higher sample rate or bit depth gives better quality but larger files. Nyquist theorem states the sample rate must be at least twice the highest frequency to avoid aliasing.

更高的采样率或比特深度带来更好的质量,但文件更大。奈奎斯特定理指出,采样率必须至少为最高频率的两倍才能避免混叠。

Sound size (bits) = sample rate × bit depth × time(s) × channels
Sample rate ≥ 2 × max frequency


5. Data Transfer Rate and Time | 数据传输速率与时间

r bytes per second (Bps). 1 Bps = 8 bps. Common units: kbps (10³ bps), Mbps (10⁶ bps), Gbps (10⁹ bps). Transfer time (seconds) = file size (bits) / transfer rate (bps).

数据传输速率衡量在给定时间内从一个地方移动到另一个地方的数字数据量。通常以每秒比特数 (bps) 或每秒字节数 (Bps) 表示。1 Bps = 8 bps。常用单位有:kbps (10³ bps)、Mbps (10⁶ bps)、Gbps (10⁹ bps)。传输时间(秒)= 文件大小(比特)/ 传输速率 (bps)。

for MiB). Using decimal: time = 400,000,000 / 4,000,000 = 100 seconds. Always ensure units match.

例如,通过 4 Mbps 连接下载一个 50 MB 的文件:先换算 50 MB 为比特(若使用 10⁶ 则为 50 × 8 × 10⁶ = 4 亿比特;若使用 MiB 则为 50 × 8 × 1024²)。使用十进制:时间 = 400,000,000 / 4,000,000 = 100 秒。务必确保单位一致。

Time (s) = Data size (bits) / Transfer rate (bps)

For network throughput, real-world speeds are often lower due to overheads. Bandwidth is the maximum theoretical transfer rate.

对于网络吞吐量,由于开销,实际速度往往较低。带宽是最大理论传输速率。


6. Logic Gates and Truth Tables | 逻辑门与真值表

Logic gates are the building blocks of digital circuits. The fundamental gates are NOT, AND, OR. Derived gates include NAND, NOR, XOR, and XNOR. Each gate performs a Boolean function on one or more binary inputs (0/1 or FALSE/TRUE). Truth tables list all possible input combinations and the resulting outputs.

逻辑门是数字电路的基本构建块。基本门包括非门 (NOT)、与门 (AND)、或门 (OR)。衍生门包括与非门 (NAND)、或非门 (NOR)、异或门 (XOR) 和同或门 (XNOR)。每个门对一个或多个二进制输入 (0/1 或 FALSE/TRUE) 执行布尔函数。真值表列出了所有可能的输入组合及其输出。

Key truth tables:

关键真值表:

GateSymbolBoolean ExpressionTruth Table
NOT─▷o─Q = ¬AA:0→1; A:1→0
AND─▷─Q = A ∧ B0,0→0; 0,1→0; 1,0→0; 1,1→1
OR─▷≥1─Q = A ∨ B0,0→0; 0,1→1; 1,0→1; 1,1→1
NAND─▷o─Q = ¬(A ∧ B)0,0→1; 0,1→1; 1,0→1; 1,1→0
NOR─▷≥1o─Q = ¬(A ∨ B)0,0→1; 0,1→0; 1,0→0; 1,1→0
XOR─▷=1─Q = A ⊕ B0,0→0; 0,1→1; 1,0→1; 1,1→0
XNOR─▷=1o─Q = A ⊙ B0,0→1; 0,1→0; 1,0→0; 1,1→1

Logic circuits are built by combining gates. A combination of NAND gates can create any other gate; NAND is a universal gate. Similarly, NOR is universal.

逻辑电路通过组合门来搭建。与非门的组合可以创建任何其他门;与非门是通用门。同样,或非门也是通用门。


广告 / Sponsored

7. Boolean Algebra Laws and Simplification | 布尔代数定律与化简

Boolean algebra is used to simplify logic expressions and reduce the number of gates in a circuit. The main laws include Identity, Null, Idempotent, Complement, Commutative, Associative, Distributive, Absorption, and DeMorgan's theorems. Each law can be proved using truth tables.

布尔代数用于化简逻辑表达式并减少电路中的门数量。主要定律包括同一律、零律、幂等律、互补律、交换律、结合律、分配律、吸收律和德摩根定理。每个定律都可以用真值表证明。

LawAND formOR form
IdentityA ∧ 1 = AA ∨ 0 = A
NullA ∧ 0 = 0A ∨ 1 = 1
IdempotentA ∧ A = AA ∨ A = A
ComplementA ∧ ¬A = 0A ∨ ¬A = 1
Double Negation¬(¬A) = A
DeMorgan 1¬(A ∧ B) = ¬A ∨ ¬B
DeMorgan 2¬(A ∨ B) = ¬A ∧ ¬B
AbsorptionA ∧ (A ∨ B) = AA ∨ (A ∧ B) = A
DistributiveA ∧ (B ∨ C) = (A ∧ B) ∨ (A ∧ C)A ∨ (B ∧ C) = (A ∨ B) ∧ (A ∨ C)

To simplify an expression, apply these laws step by step. For instance, to simplify A ∧ B ∨ A ∧ ¬B: use distributive to get A ∧ (B ∨ ¬B) = A ∧ 1 = A. Simplifying circuits saves cost and improves speed.

化简表达式时,逐步应用这些定律。例如,化简 A ∧ B ∨ A ∧ ¬B:使用分配律得到 A ∧ (B ∨ ¬B) = A ∧ 1 = A。化简电路可以节省成本并提高速度。


8. Compression Ratio | 压缩比

File compression reduces the number of bits needed to represent data. Lossless compression allows exact reconstruction (e.g., ZIP, PNG), while lossy compression discards some data for greater reduction (e.g., JPEG, MP3). The compression ratio compares original size to compressed size.

文件压缩减少表示数据所需的比特数。无损压缩允许精确重建(例如 ZIP、PNG),而有损压缩则丢弃部分数据以获得更大的缩减(例如 JPEG、MP3)。压缩比将原始大小与压缩后大小进行比较。

sed file is one quarter of the original. The space saving percentage = (1 - 1/ratio) × 100%.

公式为:压缩比 = 原始文件大小 / 压缩后文件大小。比率为 4:1 意味着压缩文件是原始文件的四分之一。空间节省百分比 = (1 - 1/比率) × 100%。

ed to 50 MB gives a compression ratio of 200/50 = 4:1, and space saving of (1 - 1/4) × 100% = 75%. Lossy compression typically gives higher ratios but with quality loss.

例如,一个 200 MB 的视频压缩到 50 MB,压缩比为 200/50 = 4:1,空间节省为 (1 - 1/4) × 100% = 75%。有损压缩通常提供更高的比率,但质量会有损失。

Compression ratio = Original size / Compressed size
Saving % = (1 - 1/ratio) × 100%


9. Memory Addressing and Storage Capacity | 存储器寻址与存储容量

dressable locations is determined by the address bus width (n bits). A 16-bit address bus can address 2¹⁶ = 65,536 different locations (often 64 KB). Formula: addressable locations = 2n.

诸如 RAM 和 ROM 之类的存储设备被组织成可寻址的位置,每个位置存储固定数量的比特(通常 8 比特 = 1 字节)。可寻址位置的数量由地址总线宽度(n 比特)决定。16 位地址总线可以寻址 2¹⁶ = 65,536 个不同位置(通常为 64 KB)。公式:可寻址位置 = 2n。

locations × size per location. If each location stores 1 byte, then capacity in bytes = 2n. If using word addressing with a different word size, multiply 2n by word size in bytes.

总存储容量 = 位置数量 × 每个位置的大小。如果每个位置存储 1 字节,那么容量(字节)= 2n。如果使用不同字大小的字寻址,则将 2n 乘以以字节为单位的字大小。

GB. However, some systems use bank switching or segmentation to address more memory than the native bus width allows.

例如,32 位地址总线可以寻址 2³² ≈ 4,294,967,296 字节 = 4 GB。但是,某些系统使用存储体切换或分段来寻址超过原生总线宽度允许的内存。

Memory locations = 2address bus width
Capacity (bytes) = 2n × bytes per location


10. IPv4 Addressing and Subnets | IPv4 地址与子网

IPv4 addresses is 2³² ≈ 4.3 billion. An IP address has two parts: network ID and host ID, determined by the subnet mask.

IPv4 地址是 32 位数字,通常以点分十进制表示法书写:四个 8 位字节,例如 192.168.1.5。可能的 IPv4 地址总数为 2³² ≈ 43 亿。IP 地址分为两部分:网络 ID 和主机 ID,由子网掩码决定。

ns the first 24 bits are network, and the last 8 bits are host. Number of usable hosts = 2host bits - 2 (subtracting network and broadcast addresses).

子网掩码使用连续的 1 表示网络部分,0 表示主机部分。例如,掩码 255.255.255.0 表示前 24 位是网络,后 8 位是主机。可用主机数 = 2主机位数 - 2(减去网络地址和广播地址)。

otation like 192.168.1.0/24 indicates the prefix length directly. Subnetting allows efficient allocation of IP addresses.

对于 /24 子网 (255.255.255.0),主机位 = 8,因此主机数 = 2⁸ - 2 = 254。像 192.168.1.0/24 这样的 CIDR 表示法直接指示前缀长度。子网划分允许高效分配 IP 地址。

Number of usable hosts = 2host bits - 2


11. Sampling Resolution in Analogue-to-Digital Conversion | 模数转换中的采样分辨率

When converting analogue signals (sound, light, temperature) to digital, the resolution of the ADC (analogue-to-digital converter) determines how precisely the analogue value is represented. Resolution is the number of bits used per sample. A higher bit count gives more levels and smaller quantisation error.

将模拟信号(声音、光线、温度)转换为数字信号时,模数转换器 (ADC) 的分辨率决定了模拟值被表示的精确程度。分辨率是每个样本使用的比特数。更高的比特数提供更多的电平,量化误差更小。

The number of discrete levels = 2bits values. The voltage resolution (step size) = reference voltage / number of levels. For a 0–5V reference and 10-bit ADC, step size = 5 / 1024 ≈ 0.00488 V = 4.88 mV.

离散电平数 = 2^比特数。对于 10 位 ADC,有 2¹⁰ = 1024 个可能值。电压分辨率(步长)= 参考电压 / 电平数。对于 0–5V 参考电压和 10 位 ADC,步长 = 5 / 1024 ≈ 0.00488 V = 4.88 mV。

olution gives more accurate digital representation but requires more storage or bandwidth.

一般而言,量化误差最多为 ±½ 步长。更高的分辨率提供更准确的数字表示,但需要更多的存储或带宽。

Levels = 2bits
Step size = Vref / 2bits


12. Error Detection and Parity Bits | 错误检测与奇偶校验位

Parity checking is a simple error detection method where an extra bit is added to a binary word to make the total number of 1s either even (even parity) or odd (odd parity). The parity bit is calculated before transmission and verified at the receiver. It can detect single-bit errors and any odd number of errors but cannot correct them.

奇偶校验是一种简单的错误检测方法,在二进制字中添加一个额外的比特,使得 1 的总数为偶数(偶校验)或奇数(奇校验)。奇偶校验位在传输前计算,在接收端验证。它可以检测单比特错误和任何奇数个错误,但不能纠正错误。

Formula for even parity bit: P = b₁ ⊕ b₂ ⊕ ... ⊕ bₙ (XOR of all data bits). For odd parity, P = ¬(b₁ ⊕ b₂ ⊕ ... ⊕ bₙ). If a parity error is detected, the receiver requests retransmission.

偶校验位公式:P = b₁ ⊕ b₂ ⊕ ... ⊕ bₙ(所有数据比特的异或)。对于奇校验,P = ¬(b₁ ⊕ b₂ ⊕ ... ⊕ bₙ)。如果检测到奇偶校验错误,接收方请求重传。

Other error detection methods include checksums and cyclic redundancy checks (CRC). They provide more robust detection of burst errors. Parity is taught as an introductory concept in Year 9.

其他错误检测方法包括校验和以及循环冗余校验 (CRC)。它们提供更强大的突发错误检测能力。奇偶校验作为入门概念在 Year 9 教授。

Even parity bit = XOR of all data bits
Odd parity bit = NOT (XOR of all data bits)


Published by TutorHao | Computer Science Revision Series | aleveler.com

广告 / Sponsored
现货 Cambridge International AS & ALevel IT Coursebook剑桥国际IGC…
计算机 备考教辅 · 正版现货 · 与本文内容相关
查看详情 / View on Taobao参考价 ¥467.0

更多咨询请联系16621398022(同微信)

备考资讯每日更新,关注不错过
考纲变化 · 科目分析 · 学习方法
扫码关注公众号 tutorhao
在微信里长按二维码识别关注
或截图后用「扫一扫 → 相册」选择本图
公众号:tutorhao