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

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

This handbook compiles the key formulas, theorems and quick conversions required for the Year 10 CIE IGCSE Computer Science (0478/0984) and O Level (2210) syllabuses. Use it as a rapid reference during revision to solve numerical problems on data representation, logic simplification, networking and compression without searching through textbooks.

本手册汇编了 Year 10 CIE IGCSE 计算机科学 (0478/0984) 和 O Level (2210) 课程中最核心的公式、定理和快速换算,可作为复习时的速查工具,帮助你在数据表示、逻辑化简、网络和压缩等数值计算中快速定位,不再需要翻书查找。


1. Data Storage Unit Conversions | 数据存储单位转换

All file size calculations start with an understanding of storage units. The base unit is the bit (b). One byte (B) consists of 8 bits. Higher units follow powers of 2 for memory-related storage (KiB, MiB), but for data transfer and general calculations the International System of Units (SI) is often used, where 1 kB = 1000 bytes. In CIE IGCSE, both interpretations appear; always check the context. The most common conversions are shown below.

所有文件大小的计算都从理解存储单位开始。基本单位是位 (bit, b)。一个字节 (Byte, B) 由 8 个位组成。更高的单位在内存相关存储中通常基于 2 的幂次 (KiB, MiB),但在数据传输和一般计算中常使用国际单位制 (SI),即 1 kB = 1000 字节。在 CIE IGCSE 考试中两种解释都可能出现,一定要看清上下文。最常见的换算关系如下表所示。

1 byte (B) = 8 bits (b)   1 kB = 1000 B   1 MB = 1000 kB   1 GB = 1000 MB

When working with memory capacities, you may also encounter binary prefixes: 1 KiB = 1024 B, 1 MiB = 1024 KiB. Always apply the relationship given in the exam question.

在处理存储容量时,你可能还会遇到二进制前缀:1 KiB = 1024 B,1 MiB = 1024 KiB。务必使用题目给出的换算关系。


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

The size of a bitmap image is determined by its dimensions and colour depth. Colour depth (bit depth) is the number of bits used to represent the colour of a single pixel. The formula is straightforward:

位图图像的大小由分辨率尺寸和颜色深度决定。颜色深度(位深度)是表示单个像素颜色所用的位数。计算公式非常简单:

Image file size (bits) = width (pixels) × height (pixels) × colour depth (bits per pixel)

If the result needs to be expressed in bytes, divide by 8. For example, an image of 1024 × 768 pixels with 24‑bit colour depth has a size of 1024 × 768 × 24 = 18 874 368 bits, which is 2 359 296 bytes (≈ 2.36 MB if using 1 MB = 1 000 000 B).

如果结果需要以字节为单位,除以 8 即可。例如,一幅 1024 × 768 像素、24 位颜色的图像大小为 1024 × 768 × 24 = 18 874 368 位,即 2 359 296 字节(若按 1 MB = 1 000 000 B 计算,约 2.36 MB)。


3. Sound File Size Calculation | 声音文件大小计算

Audio storage size depends on the sample rate, sample resolution, duration and number of channels. A higher sample rate or larger resolution improves quality but increases file size significantly. The formula is:

音频文件的大小取决于采样频率、采样分辨率、时长和声道数。采样频率越高、分辨率越大,音质越好,但文件体积也会显著增大。计算公式为:

Sound file size (bits) = sample rate (Hz) × sample resolution (bits) × duration (seconds) × number of channels

For a 10‑second stereo recording (2 channels) at 44.1 kHz with 16‑bit resolution, the size = 44 100 × 16 × 10 × 2 = 14 112 000 bits. Dividing by 8 gives 1 764 000 bytes, often expressed as 1.764 MB (SI) or 1.68 MiB.

对于一段 10 秒的立体声录音(2 声道),采样频率 44.1 kHz,16 位分辨率,大小 = 44 100 × 16 × 10 × 2 = 14 112 000 位。除以 8 得到 1 764 000 字节,通常表示为 1.764 MB(SI)或 1.68 MiB。


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

Video is essentially a sequence of images played rapidly, often accompanied by audio. The raw size of a video file without compression can be estimated by combining the frame size and frame rate:

视频实质上是一系列快速播放的图像,通常还伴有音频。无压缩的视频文件原始大小可通过结合帧大小和帧率来估算:

Video file size (bits) = frame rate (fps) × width (px) × height (px) × colour depth (bits) × duration (s)

If separate audio is stored, the audio file size (from Section 3) must be added. For a 30‑second video at 30 fps with a resolution of 1920×1080 and 24‑bit colour depth, the image portion alone would be 30 × 30 × 1920 × 1080 × 24 bits, which is enormous, illustrating why compression is essential.

如果同时存储独立的音轨,还需要加上按第3节计算出的音频大小。一段 30 秒、30 fps、分辨率 1920×1080、24 位颜色的视频,仅图像部分就需 30 × 30 × 1920 × 1080 × 24 位,数值巨大,这也说明了压缩为何如此必要。


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

When a file is sent across a network, the transmission time depends on the file size and the network bandwidth. Bandwidth is usually quoted in bits per second (bps). Make sure both file size and bandwidth are in the same unit (bits). The core formula is:

文件通过网络传输时,所需时间取决于文件大小和网络带宽。带宽通常以比特每秒 (bps) 为单位。计算时务必确保文件大小与带宽使用相同的单位(位)。核心公式为:

Transmission time (seconds) = file size (bits) ÷ bandwidth (bits per second)

Alternatively, if bandwidth is given in MB/s (megabytes per second), file size must be in MB. For example, a 100 MB file transmitted over a 100 Mbps (megabits per second) link: convert file to bits = 100 × 8 × 1 000 000 = 800 000 000 bits; bandwidth = 100 × 1 000 000 = 100 000 000 bps. Time = 8 seconds.

或者,如果带宽以 MB/s(兆字节每秒)为单位,文件大小也必须用 MB。例如,一个 100 MB 的文件通过 100 Mbps(兆比特每秒)的链路传输:将文件转换为位 = 100 × 8 × 1 000 000 = 800 000 000 位;带宽 = 100 × 1 000 000 = 100 000 000 bps。时间 = 8 秒。


6. Boolean Algebra Laws & Theorems | 布尔代数定律与定理

Boolean algebra simplifies logic circuits and expressions. The fundamental laws and theorems are tabulated below. In the expressions, A and B represent binary variables (0 or 1). The operators are ‘.’ for AND, ‘+’ for OR, and an overbar or prime for NOT. Here we denote NOT A as A̅.

布尔代数用于简化逻辑电路和表达式。基本定律和定理如下表所示。表达式中,A 和 B 代表二进制变量(0 或 1)。运算符 ‘.’ 表示与(AND),’+’ 表示或(OR),上划线或撇号表示非(NOT)。这里我们用 A̅ 表示 NOT A。

Law AND form OR form
Commutative A·B = B·A A+B = B+A
Associative (A·B)·C = A·(B·C) (A+B)+C = A+(B+C)
Distributive A·(B+C) = (A·B)+(A·C) A+(B·C) = (A+B)·(A+C)
Identity A·1 = A A+0 = A
Complement A·A̅ = 0 A+A̅ = 1
Idempotent A·A = A A+A = A
Involution A̅̅ = A
Absorption A·(A+B) = A A+(A·B) = A
De Morgan’s (A·B)̅ = A̅ + B̅ (A+B)̅ = A̅ · B̅

De Morgan’s laws are particularly important for converting between NAND/NOR and their equivalent AND/OR/NOT forms. They allow a single gate type to implement any logic function.

德摩根定律在 NAND/NOR 与等价的 AND/OR/NOT 形式之间转换时尤为重要。利用它们,仅用单一门类型就能实现任何逻辑函数。


7. Logic Gate Symbols & Truth Tables | 逻辑门符号与真值表

These are the standard logic gates required by the CIE syllabus. Each gate’s Boolean expression and truth table are given for two inputs (except NOT which has one input).

以下是 CIE 考纲要求掌握的标准逻辑门。每种门的布尔表达式和真值表均以两个输入为例(NOT 门仅有一个输入)。

Gate Boolean Expression Truth Table (A, B → Output)
AND A · B 0,0→0; 0,1→0; 1,0→0; 1,1→1
OR A + B 0,0→0; 0,1→1; 1,0→1; 1,1→1
NOT 0→1; 1→0
NAND (A · B)̅ 0,0→1; 0,1→1; 1,0→1; 1,1→0
NOR (A + B)̅ 0,0→1; 0,1→0; 1,0→0; 1,1→0
XOR A ⊕ B (or A·B̅ + A̅·B) 0,0→0; 0,1→1; 1,0→1; 1,1→0
XNOR A ⊙ B (or A·B + A̅·B̅) 0,0→1; 0,1→0; 1,0→0; 1,1→1

Remember that NAND and NOR are universal gates — any logic circuit can be built using only NAND gates or only NOR gates.

记住,NAND 和 NOR 是通用逻辑门——任何逻辑电路都可以仅用 NAND 门或仅用 NOR 门来构建。


8. Binary and Hexadecimal Conversions | 二进制与十六进制转换方法

Digital computers use binary (base 2) while hex (base 16) is a compact way to represent binary values. One hex digit corresponds exactly to four binary bits, making conversion between them trivial.

数字计算机使用二进制 (基数为2),而十六进制 (基数为16) 是表示二进制值的一种紧凑方式。一个十六进制位恰好对应四个二进制位,使得它们之间的转换非常简单。

Binary (4 bits) → Hex: split binary into groups of 4 from right, pad with leading zeros, convert each group. Hex → Binary: replace each hex digit with its 4‑bit equivalent.

二进制 (4位) → 十六进制:从右往左每4位分组,不够的前面补零,然后逐组转换。十六进制 → 二进制:将每个十六进制数字替换为对应的4位二进制数。

Example: binary 1101 0111 equals hex D7. Decimal to binary is done by repeated division by 2 (record remainders). Decimal to hex uses repeated division by 16. Denary value 215 → hex: 215 ÷ 16 = 13 remainder 7; 13 is D in hex, so D7.

示例:二进制 1101 0111 等于十六进制 D7。十进制转二进制通过反复除以2取余数实现;十进制转十六进制则反复除以16取余数。十进制数 215 → 十六进制:215 ÷ 16 = 13 余 7;13 对应十六进制 D,结果为 D7。


9. Compression Savings Calculation | 压缩节省计算

Compression reduces file size and is often tested as a calculation of the compression ratio or the percentage saving. Lossless and lossy compression use different techniques, but the savings formulas are the same.

压缩可以减小文件大小,考试中常涉及压缩比或节省百分比的运算。无损压缩和有损压缩采用不同技术,但计算节省量的公式是相同的。

Compression ratio = Original file size ÷ Compressed file size

Space saving (%) = ( (Original size − Compressed size) ÷ Original size ) × 100%

If a 500 kB image is compressed to 125 kB, the compression ratio is 500 ÷ 125 = 4:1 (often written 4 to 1). The space saved = (375 ÷ 500) × 100% = 75%. Note: when using these formulas, both sizes must be in the same unit.

如果一张 500 kB 的图像被压缩到 125 kB,压缩比为 500 ÷ 125 = 4:1(常写作 4 比 1)。节省的空间 = (375 ÷ 500) × 100% = 75%。注意:使用这些公式时,两个大小必须使用相同的单位。


10. Text File Size and Character Encodings | 文本文件大小与字符编码

Plain text file size depends on the number of characters and the encoding scheme. Standard ASCII uses 7 bits per character (often stored as 8 bits with a leading zero), while extended ASCII and UTF‑8 can use 8 bits or more. Unicode uses 16 or 32 bits per character. The simplest formula is:

纯文本文件的大小取决于字符数量和编码方案。标准 ASCII 每字符使用 7 位(通常以 8 位存储,最高位置零),扩展 ASCII 和 UTF‑8 可能使用 8 位或更多字节,Unicode 则使用 16 或 32 位。最简单的计算公式为:

Text file size (bits) = number of characters × bits per character

For example, ‘Hello!’ has 6 characters. With 8‑bit ASCII, this requires 6 × 8 = 48 bits = 6 bytes. If metadata or control characters (like EOF) are included, they add to the count. Always read the exam question carefully to determine which encoding is assumed.

例如,“Hello!”共6个字符。使用8位ASCII编码,需要 6 × 8 = 48 位 = 6 字节。如果包含元数据或控制字符(如EOF),则会增加计数。考试时务必仔细审题,明确题目假定使用哪种编码。


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

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

Comments

屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from aleveler.com

Subscribe now to keep reading and get access to the full archive.

Continue reading